o
    e                     @   sh   d Z ddlmZ ddlmZ ddlmZ ddlmZ G dd deZ	G dd	 d	eZ
G d
d deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )values)InstanceResource)ListResource)Pagec                       sV   e Zd Z fddZdddZdddZejejejfdd	Zd
d Z	dd Z
  ZS )	EventListc                    s4   t t| | ||d| _djdi | j| _dS )a  
        Initialize the EventList

        :param Version version: Version that contains the resource
        :param account_sid: The SID of the Account that created this resource
        :param call_sid: The unique string that identifies this resource

        :returns: twilio.rest.api.v2010.account.call.event.EventList
        :rtype: twilio.rest.api.v2010.account.call.event.EventList
        account_sidcall_sidz4/Accounts/{account_sid}/Calls/{call_sid}/Events.jsonN )superr   __init__	_solutionformat_uri)selfversionr   r	   	__class__r
   [/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/api/v2010/account/call/event.pyr      s   zEventList.__init__Nc                 C   s0   | j ||}| j|d d}| 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 int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int 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
        :rtype: list[twilio.rest.api.v2010.account.call.event.EventInstance]
        	page_size)r   limit)_versionread_limitspagestream)r   r   r   limitsr   r
   r
   r   r   "   s   zEventList.streamc                 C   s   t | j||d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 int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int 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: Generator that will yield up to limit results
        :rtype: list[twilio.rest.api.v2010.account.call.event.EventInstance]
        )r   r   )listr   )r   r   r   r
   r
   r   r   9   s   zEventList.listc                 C   s6   t |||d}| jjd| j|d}t| j|| jS )a  
        Retrieve a single page of EventInstance records from the API.
        Request is executed immediately

        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of EventInstance
        :rtype: twilio.rest.api.v2010.account.call.event.EventPage
        )	PageTokenr   PageSizeGET)methoduriparams)r   ofr   r   r   	EventPager   )r   
page_tokenpage_numberr   dataresponser
   r
   r   r   K   s   zEventList.pagec                 C   s"   | j jjd|}t| j || jS )a6  
        Retrieve a specific page of EventInstance records from the API.
        Request is executed immediately

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

        :returns: Page of EventInstance
        :rtype: twilio.rest.api.v2010.account.call.event.EventPage
        r   )r   domaintwiliorequestr$   r   )r   
target_urlr(   r
   r
   r   get_page^   s
   

zEventList.get_pagec                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Api.V2010.EventList>r
   r   r
   r
   r   __repr__o      zEventList.__repr__)NN)__name__
__module____qualname__r   r   r   r   unsetr   r-   r1   __classcell__r
   r
   r   r   r      s    


r   c                       s,   e Zd Z fddZdd Zdd Z  ZS )r$   c                    s   t t| || || _dS )a  
        Initialize the EventPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param account_sid: The SID of the Account that created this resource
        :param call_sid: The unique string that identifies this resource

        :returns: twilio.rest.api.v2010.account.call.event.EventPage
        :rtype: twilio.rest.api.v2010.account.call.event.EventPage
        N)r   r$   r   r   )r   r   r(   solutionr   r
   r   r   {   s   
zEventPage.__init__c                 C   s   t | j|| jd | jd dS )a  
        Build an instance of EventInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.api.v2010.account.call.event.EventInstance
        :rtype: twilio.rest.api.v2010.account.call.event.EventInstance
        r   r	   r   )EventInstancer   r   )r   payloadr
   r
   r   get_instance   s   	zEventPage.get_instancec                 C   r.   )r/   z<Twilio.Api.V2010.EventPage>r
   r0   r
   r
   r   r1      r2   zEventPage.__repr__)r3   r4   r5   r   r;   r1   r7   r
   r
   r   r   r$   y   s    r$   c                       s<   e Zd Z fddZedd Zedd Zdd Z  ZS )	r9   c                    s>   t t| | |d|dd| _d| _||d| _dS )z
        Initialize the EventInstance

        :returns: twilio.rest.api.v2010.account.call.event.EventInstance
        :rtype: twilio.rest.api.v2010.account.call.event.EventInstance
        r+   r(   )r+   r(   Nr   )r   r9   r   get_properties_contextr   )r   r   r:   r   r	   r   r
   r   r      s   zEventInstance.__init__c                 C   
   | j d S )z>
        :returns: Call Request.
        :rtype: dict
        r+   r=   r0   r
   r
   r   r+         
zEventInstance.requestc                 C   r?   )zK
        :returns: Call Response with Events.
        :rtype: dict
        r(   r@   r0   r
   r
   r   r(      rA   zEventInstance.responsec                 C   r.   )r/   z <Twilio.Api.V2010.EventInstance>r
   r0   r
   r
   r   r1      r2   zEventInstance.__repr__)	r3   r4   r5   r   propertyr+   r(   r1   r7   r
   r
   r   r   r9      s    

r9   N)__doc__twilio.baser   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r$   r9   r
   r
   r
   r   <module>   s   j-