
    pi*                         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 - Api
    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                   J     e Zd ZdZdedeeef   dedef fdZdefdZ	 xZ
S )	EventInstancez
    :ivar request: Contains a dictionary representing the request of the call.
    :ivar response: Contains a dictionary representing the call response, including a list of the call events.
    versionpayloadaccount_sidcall_sidc                     t         |   |       |j                  d      | _        |j                  d      | _        ||d| _        y )Nrequestresponser   r   )super__init__getr   r   	_solution)selfr   r   r   r   	__class__s        j/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/api/v2010/account/call/event.pyr   zEventInstance.__init__   sC     	!4;KK	4J5<[[5L ' 
    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>1   s     SDAq7>>!Q/Ss   !z#<Twilio.Api.V2010.EventInstance {}>)joinr   itemsr&   )r   contexts     r   __repr__zEventInstance.__repr__+   s6     ((SDNN<P<P<RSS4;;GDDr    )__name__
__module____qualname____doc__r   r   strr   r   r.   __classcell__r   s   @r   r   r      sC    


)-c3h
FI
UX
E# E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                 h    t        | j                  || j                  d   | j                  d         S )zk
        Build an instance of EventInstance

        :param payload: Payload response from the API
        r   r   r   )r   _versionr   )r   r   s     r   get_instancezEventPage.get_instance7   s3     MM}5^^J/	
 	
r    c                      y)r#   z<Twilio.Api.V2010.EventPage> r   s    r   r.   zEventPage.__repr__D        .r    N)	r/   r0   r1   r   r3   r   r   r:   r.   r<   r    r   r7   r7   5   s)    
DcN 
} 
.# .r    r7   c            	           e Zd Zdededef fdZ	 	 ddee   dee   dee	   fdZ
	 	 ddee   dee   dee	   fd	Z	 	 ddee   dee   dee	   fd
Z	 	 ddee   dee   dee	   fdZej"                  ej"                  ej"                  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"                  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   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)z
        Initialize the EventList

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

        r   z4/Accounts/{account_sid}/Calls/{call_sid}/Events.jsonNr<   )r   r   r   r&   _uri)r   r   r   r   r   s       r   r   zEventList.__init__O   sG     	! ' 
 RJQQ 
nn
	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 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
        rD   rD   rC   )r9   read_limitspagestreamr   rC   rD   limitsrH   s        r   rI   zEventList.streamc   sJ    ( **5)<yy6+#6y7}}##D&/::r    c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)aj  
        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 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
        rD   rF   NrC   )r9   rG   
page_asyncstream_asyncrJ   s        r   rN   zEventList.stream_async|   sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5A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 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
        rC   rD   )listrI   )r   rC   rD   s      r   rQ   zEventList.list   s(    & KK#  
 	
r    c                 z   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 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
        rP   N)rN   )r   rC   rD   records       r   
list_asynczEventList.list_async   sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                        S )ao  
        Retrieve a single page of EventInstance records from the API.
        Request is executed immediately

        :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
        	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r
   ofr9   rH   rB   r7   r   r   rU   rV   rD   datard   r   s          r   rH   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 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
        rX   r[   r\   r]   r^   r_   r`   N)r
   re   r9   rM   rB   r7   r   rf   s          r   rM   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
        r_   )r9   domaintwilior   r7   r   r   ri   r   s      r   get_pagezEventList.get_page  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
        r_   N)r9   rk   rl   request_asyncr7   r   rm   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.Api.V2010.EventList>r<   r=   s    r   r.   zEventList.__repr__$  r>   r    )NN)r/   r0   r1   r   r3   r   r   intr   r   rI   r	   rN   r   rQ   rT   r
   unsetr   objectr7   rH   rM   rn   rq   r.   r4   r5   s   @r   r@   r@   M   s   
 
c 
S 
,  $#';}; C=; 
-	 	;6  $#'A}A C=A 
}	%	A6  $#'
}
 C=
 
m		
8  $#'
}
 C=
 
m		
: *0*0,,(.	B#v+&B 3;'B f%	B
 
BF *0*0,,(.	B#v+&B 3;'B f%	B
 
BB
B3 
B9 
B
Bs 
By 
B.# .r    r@   N)r2   typingr   r   r   r   r   r   r	   twilio.baser
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r7   r@   r<   r    r   <module>r|      sN    M L L  : 2 ' !E$ E:. .0]. ].r    