o
    �¨Êh{/  ã                   @   s€   d 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	„ 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
      /       /
é    )Údeserialize)Ú	serialize)Úvalues)ÚInstanceResource)ÚListResource)ÚPagec                       sz   e Zd ZdZ‡ fdd„Zejejddfdd„Zejejddfdd„Zejejejejejfd	d
„Z	dd„ Z
dd„ Z‡  ZS )ÚDataSessionListú  c                    s2   t t| ƒ |¡ d|i| _djdi | j¤Ž| _dS )ab  
        Initialize the DataSessionList

        :param Version version: Version that contains the resource
        :param sim_sid: The unique id of the SIM resource that this Data Session is for.

        :returns: twilio.rest.wireless.v1.sim.data_session.DataSessionList
        :rtype: twilio.rest.wireless.v1.sim.data_session.DataSessionList
        Úsim_sidz/Sims/{sim_sid}/DataSessionsN© )Úsuperr   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr
   ©Ú	__class__r   úZ/var/www/html/env/lib/python3.10/site-packages/twilio/rest/wireless/v1/sim/data_session.pyr      s   

zDataSessionList.__init__Nc                 C   s:   | j  ||¡}| j|||d d�}| j  ||d |d ¡S )a  
        Streams DataSessionInstance 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 datetime end: The end
        :param datetime start: The start
        :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.wireless.v1.sim.data_session.DataSessionInstance]
        Ú	page_size)ÚendÚstartr   ÚlimitÚ
page_limit)Ú_versionÚread_limitsÚpageÚstream)r   r   r   r   r   Úlimitsr   r   r   r   r   $   s   zDataSessionList.streamc                 C   s   t | j||||d�ƒS )aº  
        Lists DataSessionInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param datetime end: The end
        :param datetime start: The start
        :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.wireless.v1.sim.data_session.DataSessionInstance]
        )r   r   r   r   )Úlistr   )r   r   r   r   r   r   r   r   r    >   s   zDataSessionList.listc                 C   sF   t  t |¡t |¡|||dœ¡}| jjd| j|d�}t| j|| jƒS )a  
        Retrieve a single page of DataSessionInstance records from the API.
        Request is executed immediately

        :param datetime end: The end
        :param datetime start: The start
        :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 DataSessionInstance
        :rtype: twilio.rest.wireless.v1.sim.data_session.DataSessionPage
        )ÚEndÚStartÚ	PageTokenr   ÚPageSizeÚGET)Úparams)	r   Úofr   Úiso8601_datetimer   r   r   ÚDataSessionPager   )r   r   r   Ú
page_tokenÚpage_numberr   r&   Úresponser   r   r   r   S   s   ûýzDataSessionList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )aH  
        Retrieve a specific page of DataSessionInstance records from the API.
        Request is executed immediately

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

        :returns: Page of DataSessionInstance
        :rtype: twilio.rest.wireless.v1.sim.data_session.DataSessionPage
        r%   )r   ÚdomainÚtwilioÚrequestr)   r   )r   Ú
target_urlr,   r   r   r   Úget_pager   s
   

þzDataSessionList.get_pagec                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z$<Twilio.Wireless.V1.DataSessionList>r   ©r   r   r   r   Ú__repr__ƒ   ó   zDataSessionList.__repr__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úunsetr   r    r   r1   r5   Ú__classcell__r   r   r   r   r      s    

ÿ

ÿ
ÿr   c                       s0   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Z‡  ZS )r)   r	   c                    s   t t| ƒ ||¡ || _dS )aš  
        Initialize the DataSessionPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param sim_sid: The unique id of the SIM resource that this Data Session is for.

        :returns: twilio.rest.wireless.v1.sim.data_session.DataSessionPage
        :rtype: twilio.rest.wireless.v1.sim.data_session.DataSessionPage
        N)r   r)   r   r   )r   r   r,   Úsolutionr   r   r   r   �   s   
zDataSessionPage.__init__c                 C   s   t | j|| jd d�S )a  
        Build an instance of DataSessionInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.wireless.v1.sim.data_session.DataSessionInstance
        :rtype: twilio.rest.wireless.v1.sim.data_session.DataSessionInstance
        r
   )r
   )ÚDataSessionInstancer   r   )r   Úpayloadr   r   r   Úget_instance    s   	zDataSessionPage.get_instancec                 C   r2   )r3   z$<Twilio.Wireless.V1.DataSessionPage>r   r4   r   r   r   r5   «   r6   zDataSessionPage.__repr__)r7   r8   r9   r:   r   r@   r5   r<   r   r   r   r   r)   �   s
    r)   c                       sÜ   e Zd ZdZ‡ fdd„Zedd„ ƒZedd„ ƒZedd	„ ƒZed
d„ ƒZ	edd„ ƒZ
edd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZed d!„ ƒZd"d#„ Z‡  ZS )$r>   r	   c                    s¤   t t| ƒ |¡ |d |d |d |d |d |d |d |d |d	 |d
 t |d ¡t |d ¡t |d ¡t |d ¡t |d ¡dœ| _d| _d|i| _dS )zÑ
        Initialize the DataSessionInstance

        :returns: twilio.rest.wireless.v1.sim.data_session.DataSessionInstance
        :rtype: twilio.rest.wireless.v1.sim.data_session.DataSessionInstance
        Úsidr
   Úaccount_sidÚ
radio_linkÚoperator_mccÚoperator_mncÚoperator_countryÚoperator_nameÚcell_idÚcell_location_estimateÚpackets_uploadedÚpackets_downloadedÚlast_updatedr   r   )rA   r
   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   r   r   N)	r   r>   r   r   Úintegerr(   Ú_propertiesÚ_contextr   )r   r   r?   r
   r   r   r   r   ¸   s&   ñzDataSessionInstance.__init__c                 C   ó
   | j d S )z|
        :returns: The unique id of the Data Session resource that this Data Record is for.
        :rtype: unicode
        rA   ©rN   r4   r   r   r   rA   Ø   ó   
zDataSessionInstance.sidc                 C   rP   )zt
        :returns: The unique id of the SIM resource that this Data Session is for.
        :rtype: unicode
        r
   rQ   r4   r   r   r   r
   à   rR   zDataSessionInstance.sim_sidc                 C   rP   )zi
        :returns: The unique id of the Account that the SIM belongs to.
        :rtype: unicode
        rB   rQ   r4   r   r   r   rB   è   rR   zDataSessionInstance.account_sidc                 C   rP   )z“
        :returns: The generation of wireless technology that the device was attached to the cellular tower using.
        :rtype: unicode
        rC   rQ   r4   r   r   r   rC   ð   rR   zDataSessionInstance.radio_linkc                 C   rP   )z•
        :returns: The 'mobile country code' is the unique id of the home country where the Data Session took place.
        :rtype: unicode
        rD   rQ   r4   r   r   r   rD   ø   rR   z DataSessionInstance.operator_mccc                 C   rP   )z©
        :returns: The 'mobile network code' is the unique id specific to the mobile operator network where the Data Session took place.
        :rtype: unicode
        rE   rQ   r4   r   r   r   rE      rR   z DataSessionInstance.operator_mncc                 C   rP   )zŠ
        :returns: The three letter country code representing where the device's Data Session took place.
        :rtype: unicode
        rF   rQ   r4   r   r   r   rF     rR   z$DataSessionInstance.operator_countryc                 C   rP   )z’
        :returns: The friendly name of the mobile operator network that the SIM-connected device is attached to.
        :rtype: unicode
        rG   rQ   r4   r   r   r   rG     rR   z!DataSessionInstance.operator_namec                 C   rP   )z­
        :returns: The unique id of the cellular tower that the device was attached to at the moment when the Data Session was last updated.
        :rtype: unicode
        rH   rQ   r4   r   r   r   rH     rR   zDataSessionInstance.cell_idc                 C   rP   )zŠ
        :returns: An object representing the estimated location where the device's Data Session took place.
        :rtype: dict
        rI   rQ   r4   r   r   r   rI      rR   z*DataSessionInstance.cell_location_estimatec                 C   rP   )z£
        :returns: The number of packets uploaded by the device between the start time and when the Data Session was last updated.
        :rtype: unicode
        rJ   rQ   r4   r   r   r   rJ   (  rR   z$DataSessionInstance.packets_uploadedc                 C   rP   )z¥
        :returns: The number of packets downloaded by the device between the start time and when the Data Session was last updated.
        :rtype: unicode
        rK   rQ   r4   r   r   r   rK   0  rR   z&DataSessionInstance.packets_downloadedc                 C   rP   )zƒ
        :returns: The date that this resource was last updated, given as GMT in ISO 8601 format.
        :rtype: datetime
        rL   rQ   r4   r   r   r   rL   8  rR   z DataSessionInstance.last_updatedc                 C   rP   )z~
        :returns: The date that this Data Session started, given as GMT in ISO 8601 format.
        :rtype: datetime
        r   rQ   r4   r   r   r   r   @  rR   zDataSessionInstance.startc                 C   rP   )zv
        :returns: The date that this record ended, given as GMT in ISO 8601 format.
        :rtype: datetime
        r   rQ   r4   r   r   r   r   H  rR   zDataSessionInstance.endc                 C   r2   )r3   z(<Twilio.Wireless.V1.DataSessionInstance>r   r4   r   r   r   r5   P  r6   zDataSessionInstance.__repr__)r7   r8   r9   r:   r   ÚpropertyrA   r
   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   r   r   r5   r<   r   r   r   r   r>   µ   sD     














r>   N)r:   Útwilio.baser   r   r   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r)   r>   r   r   r   r   Ú<module>   s   |(