
    g(;                         S r SSKJrJrJrJrJrJrJr  SSK	J
r
  SSKJr  SSKJr  SSKJr  SSKJr   " S S	\5      r " S
 S\5      r " S S\5      rg)a  
 This code was generated by
___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
 |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
 |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

 Twilio - Insights
 This is the public Twilio REST API.

 NOTE: This class is auto generated by OpenAPI Generator.
 https://openapi-generator.tech
 Do not edit the class manually.
    )AnyDictListOptionalUnionIteratorAsyncIterator)values)InstanceResource)ListResource)Version)Pagec                   ~   ^  \ rS rSr " S S\5      r " S S\5      r S\S\\	\
4   S\	4U 4S	 jjrS
\	4S jrSrU =r$ )MetricInstance   c                   $    \ rS rSrSrSrSrSrSrg)MetricInstance.StreamDirection   unknowninboundoutboundboth N)	__name__
__module____qualname____firstlineno__UNKNOWNINBOUNDOUTBOUNDBOTH__static_attributes__r       k/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/twilio/rest/insights/v1/call/metric.pyStreamDirectionr      s    r#   r%   c                   (    \ rS rSrSrSrSrSrSrSr	g)	MetricInstance.TwilioEdge    unknown_edgecarrier_edgesip_edgesdk_edgeclient_edger   N)
r   r   r   r   UNKNOWN_EDGECARRIER_EDGESIP_EDGESDK_EDGECLIENT_EDGEr"   r   r#   r$   
TwilioEdger'       s    %%#r#   r3   versionpayloadcall_sidc                   > [         TU ]  U5        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l	        UR                  S5      U l
        UR                  S	5      U l        SU0U l        g )
N	timestampr6   account_sidedge	directionr*   r+   r,   r-   )super__init__getr8   r6   r9   r:   r;   r*   r+   r,   r-   	_solution)selfr4   r5   r6   	__class__s       r$   r=   MetricInstance.__init__3   s    !(/K(@'.{{:'>*1++m*D;B;;v;N	EL[[F
 :A^9T5<[[5L5<[[5L8?M8R 
r#   returnc                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )N
Provide a friendly representation

:returns: Machine friendly representation
 c              3   H   #    U  H  u  pS R                  X5      v   M     g7f)z{}={}N)format).0kvs      r$   	<genexpr>*MetricInstance.__repr__.<locals>.<genexpr>L   s      S<RDA7>>!//<Rs    "z&<Twilio.Insights.V1.MetricInstance {}>)joinr?   itemsrH   )r@   contexts     r$   __repr__MetricInstance.__repr__F   s6     ((SDNN<P<P<RSS7>>wGGr#   )
r?   r9   r6   r*   r-   r;   r:   r,   r+   r8   )r   r   r   r   objectr%   r3   r   r   strr   r=   rQ   r"   __classcell__rA   s   @r$   r   r      sV    & $V $

 
$sCx. 
C 
&H# H Hr#   r   c                   >    \ rS rSrS\\\4   S\4S jrS\4S jr	Sr
g)
MetricPageP   r5   rC   c                 D    [        U R                  XR                  S   S9$ )zT
Build an instance of MetricInstance

:param payload: Payload response from the API
r6   )r6   )r   _versionr?   )r@   r5   s     r$   get_instanceMetricPage.get_instanceR   s#     MM7^^J-G
 	
r#   c                     g)rE   z<Twilio.Insights.V1.MetricPage>r   r@   s    r$   rQ   MetricPage.__repr__\        1r#   r   N)r   r   r   r   r   rT   r   r   r\   rQ   r"   r   r#   r$   rX   rX   P   s)    
DcN 
~ 
1# 1r#   rX   c                     ^  \ rS rSrS\S\4U 4S jjr\R                  \R                  SS4S\	S\
4   S\	S	\
4   S
\\   S\\   S\\   4
S jjr\R                  \R                  SS4S\	S\
4   S\	S	\
4   S
\\   S\\   S\\   4
S jjr\R                  \R                  SS4S\	S\
4   S\	S	\
4   S
\\   S\\   S\\   4
S jjr\R                  \R                  SS4S\	S\
4   S\	S	\
4   S
\\   S\\   S\\   4
S jjr\R                  \R                  \R                  \R                  \R                  4S\	S\
4   S\	S	\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\4S jjr\R                  \R                  \R                  \R                  \R                  4S\	S\
4   S\	S	\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\4S jjrS\S\4S jrS\S\4S jrS\4S jrSrU =r$ )
MetricListe   r4   r6   c                 x   > [         TU ]  U5        SU0U l        SR                  " S0 U R                  D6U l        g)z
Initialize the MetricList

:param version: Version that contains the resource
:param call_sid: The unique SID identifier of the Call.

r6   z/Voice/{call_sid}/MetricsNr   )r<   r=   r?   rH   _uri)r@   r4   r6   rA   s      r$   r=   MetricList.__init__g   s=     	! 
 066HH	r#   Nr:   r'   r;   r   limit	page_sizerC   c                     U R                   R                  X45      nU R                  XUS   S9nU R                   R                  XeS   5      $ )a&  
Streams MetricInstance records from the API as a generator stream.
This operation lazily loads records as efficiently as possible until the limit
is reached.
The results are returned as a generator, so this operation is memory efficient.

:param &quot;MetricInstance.TwilioEdge&quot; edge: The Edge of this Metric. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
:param &quot;MetricInstance.StreamDirection&quot; direction: The Direction of this Metric. One of `unknown`, `inbound`, `outbound` or `both`.
:param limit: Upper limit for the number of records to return. stream()
              guarantees to never return more than limit.  Default is no limit
:param page_size: Number of records to fetch per request, when not set will use
                  the default value of 50 records.  If no page_size is defined
                  but a limit is defined, stream() will attempt to read the
                  limit with the most efficient page size, i.e. min(limit, 1000)

:returns: Generator that will yield up to limit results
ri   r:   r;   ri   rh   )r[   read_limitspagestreamr@   r:   r;   rh   ri   limitsrm   s          r$   rn   MetricList.streamw   sH    0 **5<yyd6+CVyW}}##D/::r#   c                    #    U R                   R                  X45      nU R                  XUS   S9I Sh  vN nU R                   R                  XeS   5      $  N"7f)a5  
Asynchronously streams MetricInstance records from the API as a generator stream.
This operation lazily loads records as efficiently as possible until the limit
is reached.
The results are returned as a generator, so this operation is memory efficient.

:param &quot;MetricInstance.TwilioEdge&quot; edge: The Edge of this Metric. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
:param &quot;MetricInstance.StreamDirection&quot; direction: The Direction of this Metric. One of `unknown`, `inbound`, `outbound` or `both`.
:param limit: Upper limit for the number of records to return. stream()
              guarantees to never return more than limit.  Default is no limit
:param page_size: Number of records to fetch per request, when not set will use
                  the default value of 50 records.  If no page_size is defined
                  but a limit is defined, stream() will attempt to read the
                  limit with the most efficient page size, i.e. min(limit, 1000)

:returns: Generator that will yield up to limit results
ri   rk   Nrh   )r[   rl   
page_asyncstream_asyncro   s          r$   rt   MetricList.stream_async   s]     0 **5<__f[6I % 
 
 }}))$w@@	
s   2AA#Ac           	      8    [        U R                  UUUUS95      $ )a  
Lists MetricInstance records from the API as a list.
Unlike stream(), this operation is eager and will load `limit` records into
memory before returning.

:param &quot;MetricInstance.TwilioEdge&quot; edge: The Edge of this Metric. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
:param &quot;MetricInstance.StreamDirection&quot; direction: The Direction of this Metric. One of `unknown`, `inbound`, `outbound` or `both`.
:param limit: Upper limit for the number of records to return. list() guarantees
              never to return more than limit.  Default is no limit
:param page_size: Number of records to fetch per request, when not set will use
                  the default value of 50 records.  If no page_size is defined
                  but a limit is defined, list() will attempt to read the limit
                  with the most efficient page size, i.e. min(limit, 1000)

:returns: list that will contain up to limit results
r:   r;   rh   ri   )listrn   )r@   r:   r;   rh   ri   s        r$   rx   MetricList.list   s.    . KK##	  
 	
r#   c                 z   #    U R                  UUUUS9I Sh  vN  Vs/ s Sh  vN nUPM   N N

 sn$ s  snf 7f)a  
Asynchronously lists MetricInstance records from the API as a list.
Unlike stream(), this operation is eager and will load `limit` records into
memory before returning.

:param &quot;MetricInstance.TwilioEdge&quot; edge: The Edge of this Metric. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
:param &quot;MetricInstance.StreamDirection&quot; direction: The Direction of this Metric. One of `unknown`, `inbound`, `outbound` or `both`.
:param limit: Upper limit for the number of records to return. list() guarantees
              never to return more than limit.  Default is no limit
:param page_size: Number of records to fetch per request, when not set will use
                  the default value of 50 records.  If no page_size is defined
                  but a limit is defined, list() will attempt to read the limit
                  with the most efficient page size, i.e. min(limit, 1000)

:returns: list that will contain up to limit results
rw   N)rt   )r@   r:   r;   rh   ri   records         r$   
list_asyncMetricList.list_async   sW     2 '+&7&7##	 '8 ' ! !
 
 !
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     [         R                  " UUUUUS.5      n[         R                  " SS05      nSUS'   U R                  R                  SU R                  XgS9n[        U R                  XR                  5      $ )a  
Retrieve a single page of MetricInstance records from the API.
Request is executed immediately

:param edge: The Edge of this Metric. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
:param direction: The Direction of this Metric. One of `unknown`, `inbound`, `outbound` or `both`.
:param page_token: PageToken provided by the API
:param page_number: Page Number, this value is simply for client state
:param page_size: Number of records to return, defaults to 50

:returns: Page of MetricInstance
Edge	Direction	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r
   ofr[   rm   rf   rX   r?   	r@   r:   r;   r~   r   ri   datar   responses	            r$   rm   MetricList.page   s    ( yy&'#%
 ))^-PQR.==%%dii & 
 $-->>BBr#   c                   #    [         R                  " UUUUUS.5      n[         R                  " SS05      nSUS'   U R                  R                  SU R                  XgS9I Sh  vN n[        U R                  XR                  5      $  N$7f)	a!  
Asynchronously retrieve a single page of MetricInstance records from the API.
Request is executed immediately

:param edge: The Edge of this Metric. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
:param direction: The Direction of this Metric. One of `unknown`, `inbound`, `outbound` or `both`.
:param page_token: PageToken provided by the API
:param page_number: Page Number, this value is simply for client state
:param page_size: Number of records to return, defaults to 50

:returns: Page of MetricInstance
r   r   r   r   r   r   r   N)r
   r   r[   rs   rf   rX   r?   r   s	            r$   rs   MetricList.page_async  s     ( yy&'#%
 ))^-PQR.11dii 2 
 
 $-->>BB
s   A"B$B	%%B
target_urlc                     U R                   R                  R                  R                  SU5      n[	        U R                   X R
                  5      $ )z
Retrieve a specific page of MetricInstance records from the API.
Request is executed immediately

:param target_url: API-generated URL for the requested results page

:returns: Page of MetricInstance
r   )r[   domaintwiliorequestrX   r?   r@   r   r   s      r$   get_pageMetricList.get_pageB  s;     ==''..66ujI$-->>BBr#   c                    #    U R                   R                  R                  R                  SU5      I Sh  vN n[	        U R                   X R
                  5      $  N$7f)z
Asynchronously retrieve a specific page of MetricInstance records from the API.
Request is executed immediately

:param target_url: API-generated URL for the requested results page

:returns: Page of MetricInstance
r   N)r[   r   r   request_asyncrX   r?   r   s      r$   get_page_asyncMetricList.get_page_asyncN  sG      --44BB5*UU$-->>BB Vs   4AA%Ac                     g)rE   z<Twilio.Insights.V1.MetricList>r   r_   s    r$   rQ   MetricList.__repr__Z  ra   r#   )r?   rf   )r   r   r   r   r   rT   r=   r
   unsetr   rS   r   intr   r   rn   r	   rt   r   rx   r|   rX   rm   rs   r   r   rQ   r"   rU   rV   s   @r$   rc   rc   e   sW   I I3 I$ <B<<EK\\##';/78; 96AB; }	;
 C=; 
.	!;> <B<<EK\\##'A/78A 96ABA }	A
 C=A 
~	&AB <B<<EK\\##'
/78
 96AB
 }	

 C=
 
n	
D <B<<EK\\##'
/78
 96AB
 }	

 C=
 
n	
F <B<<EK\\)/*0,,(.%C/78%C 96AB%C #v+&	%C
 3;'%C f%%C 
%CR <B<<EK\\)/*0,,(.%C/78%C 96AB%C #v+&	%C
 3;'%C f%%C 
%CN
C3 
C: 
C
Cs 
Cz 
C1# 1 1r#   rc   N)__doc__typingr   r   r   r   r   r   r	   twilio.baser
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   rX   rc   r   r#   r$   <module>r      sO    M L L  : 2 ' !5H% 5Hp1 1*{1 {1r#   