
    pi6                         d Z ddlmZmZmZmZmZmZmZ ddl	m
Z
 ddlmZ ddlmZ ddlmZ ddlmZ  G d d	e      Z G d
 de      Z G d de      Zy)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                   p     e Zd Z G d de      Z G d de      Z	 dedeee	f   def fdZ
d	efd
Z xZS )EventInstancec                        e Zd ZdZdZdZdZdZy)EventInstance.LevelUNKNOWNDEBUGINFOWARNINGERRORN)__name__
__module____qualname__r   r   r   r   r        d/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/insights/v1/call/event.pyLevelr      s    r   r   c                        e Zd ZdZdZdZdZdZy)EventInstance.TwilioEdgeunknown_edgecarrier_edgesip_edgesdk_edgeclient_edgeN)r   r   r   UNKNOWN_EDGECARRIER_EDGESIP_EDGESDK_EDGECLIENT_EDGEr   r   r   
TwilioEdger    !   s    %%#r   r+   versionpayloadcall_sidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        |j                  d	      | _        |j                  d
      | _        |j                  d      | _        d|i| _        y )N	timestampr.   account_sidedgegrouplevelnamer"   r#   r$   r%   )super__init__getr0   r.   r1   r2   r3   r4   r5   r"   r#   r$   r%   	_solution)selfr,   r-   r.   	__class__s       r   r7   zEventInstance.__init__6   s    !(/K(@'.{{:'>*1++m*D:A++f:M	$+KK$8
6=kk'6J
#*;;v#6	9@^9T5<[[5L5<[[5L8?M8R 
r   returnc                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        yw)z{}={}N)format).0kvs      r   	<genexpr>z)EventInstance.__repr__.<locals>.<genexpr>O   s     SDAq7>>!Q/Ss   !z%<Twilio.Insights.V1.EventInstance {}>)joinr9   itemsrA   )r:   contexts     r   __repr__zEventInstance.__repr__I   s6     ((SDNN<P<P<RSS6==gFFr   )r   r   r   objectr   r+   r   r   strr   r7   rI   __classcell__r;   s   @r   r   r      sP     $V $
 
$sCx. 
C 
&G# Gr   r   c                   2    e Zd Zdeeef   defdZdefdZy)	EventPager-   r<   c                 L    t        | j                  || j                  d         S )zk
        Build an instance of EventInstance

        :param payload: Payload response from the API
        r.   )r.   )r   _versionr9   )r:   r-   s     r   get_instancezEventPage.get_instanceU   s%     MM7T^^J-G
 	
r   c                      y)r>   z<Twilio.Insights.V1.EventPage>r   r:   s    r   rI   zEventPage.__repr___        0r   N)	r   r   r   r   rK   r   r   rR   rI   r   r   r   rO   rO   S   s)    
DcN 
} 
0# 0r   rO   c                       e Zd Zdedef fdZej                  ddfdede	f   de
e   de
e   d	ee   fd
Zej                  ddfdede	f   de
e   de
e   d	ee   fdZej                  ddfdede	f   de
e   de
e   d	ee   fdZej                  ddfdede	f   de
e   de
e   d	ee   fdZej                  ej                  ej                  ej                  fdede	f   deee	f   deee	f   deee	f   d	ef
dZej                  ej                  ej                  ej                  fdede	f   deee	f   deee	f   deee	f   d	ef
dZded	efdZded	efdZd	efdZ xZS )	EventListr,   r.   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the EventList

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

        r.   z/Voice/{call_sid}/EventsNr   )r6   r7   r9   rA   _uri)r:   r,   r.   r;   s      r   r7   zEventList.__init__j   s@     	! 
 6.55GG	r   Nr2   r    limit	page_sizer<   c                     | j                   j                  ||      }| j                  ||d         }| j                   j                  ||d         S )a  
        Streams EventInstance 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;EventInstance.TwilioEdge&quot; edge: The Edge of this Event. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
        :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
        r[   r2   r[   rZ   )rQ   read_limitspagestreamr:   r2   rZ   r[   limitsr_   s         r   r`   zEventList.streamz   sL    , **5)<yydf[.AyB}}##D&/::r   c                    K   | j                   j                  ||      }| j                  ||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams EventInstance 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;EventInstance.TwilioEdge&quot; edge: The Edge of this Event. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
        :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
        r[   r]   NrZ   )rQ   r^   
page_asyncstream_asyncra   s         r   re   zEventList.stream_async   sY     , **5)<__$&:M_NN}}))$w@@ Os   6AA$Ac                 <    t        | j                  |||            S )a  
        Lists EventInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param &quot;EventInstance.TwilioEdge&quot; edge: The Edge of this Event. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
        :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
        r2   rZ   r[   )listr`   )r:   r2   rZ   r[   s       r   rh   zEventList.list   s+    * KK#  
 	
r   c                 |   K   | j                  |||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists EventInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param &quot;EventInstance.TwilioEdge&quot; edge: The Edge of this Event. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
        :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
        rg   N)re   )r:   r2   rZ   r[   records        r   
list_asynczEventList.list_async   sW     . '+&7&7# '8 ' !
 
 !
 
 	
 
s0   </<731
37<37<
page_tokenpage_numberc                    t        j                  ||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                        S )a  
        Retrieve a single page of EventInstance records from the API.
        Request is executed immediately

        :param edge: The Edge of this Event. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
        :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 EventInstance
        Edge	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r
   ofrQ   r_   rY   rO   r9   r:   r2   rl   rm   r[   datar|   responses           r   r_   zEventList.page   s    $ yy'#%	
 ))^-PQR.==%%diig & 
 $..AAr   c                   K   t        j                  ||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                        S 7 %w)	a  
        Asynchronously retrieve a single page of EventInstance records from the API.
        Request is executed immediately

        :param edge: The Edge of this Event. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
        :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 EventInstance
        ro   rs   rt   ru   rv   rw   rx   N)r
   r}   rQ   rd   rY   rO   r9   r~   s           r   rd   zEventList.page_async  s     $ yy'#%	
 ))^-PQR.11diig 2 
 
 $..AA
s   A#B%B&&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of EventInstance records from the API.
        Request is executed immediately

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

        :returns: Page of EventInstance
        rw   )rQ   domaintwiliorequestrO   r9   r:   r   r   s      r   get_pagezEventList.get_page3  s=     ==''..66ujI$..AAr   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)z
        Asynchronously retrieve a specific page of EventInstance records from the API.
        Request is executed immediately

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

        :returns: Page of EventInstance
        rw   N)rQ   r   r   request_asyncrO   r9   r   s      r   get_page_asynczEventList.get_page_async?  sJ      --44BB5*UU$..AA Vs   4AA&Ac                      y)r>   z<Twilio.Insights.V1.EventList>r   rT   s    r   rI   zEventList.__repr__K  rU   r   )r   r   r   r   rK   r7   r
   unsetr   rJ   r   intr   r   r`   r	   re   r   rh   rk   rO   r_   rd   r   r   rI   rL   rM   s   @r   rW   rW   h   s   H H3 H$ ;A,,##'	;.67; }; C=	;
 
-	 ;: ;A,,##'	A.67A }A C=	A
 
}	%A: ;A,,##'	
.67
 }
 C=	

 
m	
> ;A,,##'	
.67
 }
 C=	

 
m	
@ ;A,,)/*0,,(."B.67"B #v+&"B 3;'	"B
 f%"B 
"BL ;A,,)/*0,,(."B.67"B #v+&"B 3;'	"B
 f%"B 
"BH
B3 
B9 
B
Bs 
By 
B0# 0r   rW   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   rO   rW   r   r   r   <module>r      sO    M L L  : 2 ' !8G$ 8Gv0 0*i0 i0r   