
    d{iF                         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 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)ApiResponse)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        f/home/sas/my/fyp/ringai/.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>2   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_instance8   s3     MM}5^^J/	
 	
r!   c                      y)r$   z<Twilio.Api.V2010.EventPage> r   s    r    r/   zEventPage.__repr__E        .r!   N)	r0   r1   r2   r   r4   r   r   r;   r/   r=   r!   r    r8   r8   6   s)    
DcN 
} 
.# .r!   r8   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fd
Z	 	 ddee   dee   d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fdZ	 	 ddee   dee   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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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__P   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
        rE   rE   rD   )r:   read_limitspagestreamr   rD   rE   limitsrI   s        r    rJ   zEventList.streamd   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
        rE   rG   NrD   )r:   rH   
page_asyncstream_asyncrK   s        r    rO   zEventList.stream_async}   sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                     | j                   j                  ||      }| j                  |d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams EventInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        rE   rG   rD   )r:   rH   page_with_http_inforJ   datastatus_codeheadersr   rD   rE   rL   page_response	generators         r    stream_with_http_infozEventList.stream_with_http_info   sk    $ **5)<006+;N0OMM((););VG_M	=44m6K6KLLr!   c                   K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams EventInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        rE   rG   NrD   )r:   rH   page_with_http_info_asyncrO   rR   rS   rT   rU   s         r    stream_with_http_info_asyncz%EventList.stream_with_http_info_async   s     $ **5)<"<<[) = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   5B A>AB 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
        rD   rE   )listrJ   )r   rD   rE   s      r    r^   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
        r]   N)rO   )r   rD   rE   records       r    
list_asynczEventList.list_async   sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;c                 b    | j                  ||      \  }}}t        |      }t        |||      S )a  
        Lists EventInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r]   rR   rS   rT   )rX   r^   r   )r   rD   rE   rW   rS   rT   r-   s          r    list_with_http_infozEventList.list_with_http_info   sA    $ +/*D*D +E +
'	; Y;PPr!   c                    K   | j                  ||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }}t        |||      S w)a  
        Asynchronously lists EventInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r]   Nrc   )r[   r   )r   rD   rE   rW   rS   rT   r`   r-   s           r    list_with_http_info_asyncz#EventList.list_with_http_info_async  sf     $ 150P0P 1Q 1
 +
'	; -666&	+
 7666;PPs4   A4A:86
8:A8:A
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paramsrT   )r
   ofr:   rI   rC   r8   r   r   rg   rh   rE   rR   rT   r   s          r    rI   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
        rj   rm   rn   ro   rp   rq   rr   N)r
   rv   r:   rN   rC   r8   r   rw   s          r    rN   zEventList.page_asyncP  s       yy'#%
 ))^-PQR.11diig 2 
 
 $..AA
s   A"B$B
%&Bc                 $   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }}}t        | j                  || j                        }	t        |	||      S )	aW  
        Retrieve a single page with response metadata


        :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: ApiResponse with EventPage, status code, and headers
        rj   rm   rn   ro   rp   rq   rr   rc   )r
   rv   r:   page_with_response_inforC   r8   r   r   
r   rg   rh   rE   rR   rT   r   rS   response_headersrI   s
             r    rQ   zEventList.page_with_http_infoq  s      yy'#%
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ $..A+GWXXr!   c                 @  K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }}}t        | j                  || j                        }	t        |	||	      S 7 7w)
af  
        Asynchronously retrieve a single page with response metadata


        :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: ApiResponse with EventPage, status code, and headers
        rj   rm   rn   ro   rp   rq   rr   Nrc   )r
   rv   r:   page_with_response_info_asyncrC   r8   r   r   r{   s
             r    rZ   z#EventList.page_with_http_info_async  s       yy'#%
 ))^-PQR. --==$))D' >   	0+/
 $..A+GWXXs   A"B$B%8B
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
        rq   )r:   domaintwilior   r8   r   r   r   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
        rq   N)r:   r   r   request_asyncr8   r   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.Api.V2010.EventList>r=   r>   s    r    r/   zEventList.__repr__  r?   r!   )NN)#r0   r1   r2   r   r4   r   r   intr   r   rJ   r	   rO   tuplerX   r[   r   r^   ra   r   rd   rf   r
   unsetr   objectr8   rI   rN   rQ   rZ   r   r   r/   r5   r6   s   @r    rA   rA   N   s   
 
c 
S 
,  $#';}; C=; 
-	 	;6  $#'A}A C=A 
}	%	A6  $#'M}M C=M 
	M4  $#'M}M C=M 
	M8  $#'
}
 C=
 
m		
8  $#'
}
 C=
 
m		
:  $#'Q}Q C=Q 
	Q6  $#'Q}Q C=Q 
	Q6 *0*0,,(.	B#v+&B 3;'B f%	B
 
BF *0*0,,(.	B#v+&B 3;'B f%	B
 
BF *0*0,,(.	 Y#v+& Y 3;' Y f%	 Y
 
 YH *0*0,,(.	"Y#v+&"Y 3;'"Y f%	"Y
 
"YH
B3 
B9 
B
Bs 
By 
B.# .r!   rA   N)r3   typingr   r   r   r   r   r   r	   twilio.baser
   twilio.base.api_responser   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r8   rA   r=   r!   r    <module>r      sQ    M L L  0 : 2 ' !E$ E:. .0G. G.r!   