o
    et-                     @   st   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	 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)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 )DataSessionListc                    s2   t t| | d|i| _djdi | j| _dS )aZ  
        Initialize the DataSessionList

        :param Version version: Version that contains the resource
        :param sim_sid: The SID of the Sim resource that the 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	   [/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/wireless/v1/sim/data_session.pyr      s   

zDataSessionList.__init__Nc                 C   s0   | j ||}| j|d d}| j ||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 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)r   limit)_versionread_limitspagestream)r   r   r   limitsr   r	   r	   r   r   "   s   zDataSessionList.streamc                 C   s   t | j||dS )al  
        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 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   )listr   )r   r   r   r	   r	   r   r   9   s   zDataSessionList.listc                 C   s6   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 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
        )	PageTokenr   PageSizeGET)methoduriparams)r   ofr   r   r   DataSessionPager   )r   
page_tokenpage_numberr   dataresponser	   r	   r   r   K   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_page^   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__o      zDataSessionList.__repr__)NN)__name__
__module____qualname__r   r   r   r   unsetr   r,   r0   __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 DataSessionPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param sim_sid: The SID of the Sim resource that the 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   r-   )r.   z$<Twilio.Wireless.V1.DataSessionPage>r	   r/   r	   r	   r   r0      r1   zDataSessionPage.__repr__)r2   r3   r4   r   r:   r0   r6   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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 )%r8   c                    s  t t| | i d|dd|dd|dd|dd|dd|dd|dd|dd	|d	d
|d
dt|ddt|ddt|ddt|ddt|d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_updatedstartendimeiN)
r
   r8   r   getr   integeriso8601_datetime_properties_contextr   )r   r   r9   r   r   r	   r   r      sH   








	


zDataSessionInstance.__init__c                 C   
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        r;   rM   r/   r	   r	   r   r;         
zDataSessionInstance.sidc                 C   rO   )zl
        :returns: The SID of the Sim resource that the Data Session is for
        :rtype: unicode
        r   rP   r/   r	   r	   r   r      rQ   zDataSessionInstance.sim_sidc                 C   rO   )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        r<   rP   r/   r	   r	   r   r<      rQ   zDataSessionInstance.account_sidc                 C   rO   )zs
        :returns: The generation of wireless technology that the device was using
        :rtype: unicode
        r=   rP   r/   r	   r	   r   r=      rQ   zDataSessionInstance.radio_linkc                 C   rO   )z
        :returns: The 'mobile country code' is the unique ID of the home country where the Data Session took place
        :rtype: unicode
        r>   rP   r/   r	   r	   r   r>      rQ   z DataSessionInstance.operator_mccc                 C   rO   )z
        :returns: The 'mobile network code' is the unique ID specific to the mobile operator network where the Data Session took place
        :rtype: unicode
        r?   rP   r/   r	   r	   r   r?      rQ   z DataSessionInstance.operator_mncc                 C   rO   )z
        :returns: The three letter country code representing where the device's Data Session took place
        :rtype: unicode
        r@   rP   r/   r	   r	   r   r@      rQ   z$DataSessionInstance.operator_countryc                 C   rO   )z
        :returns: The friendly name of the mobile operator network that the SIM-connected device is attached to
        :rtype: unicode
        rA   rP   r/   r	   r	   r   rA      rQ   z!DataSessionInstance.operator_namec                 C   rO   )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
        rB   rP   r/   r	   r	   r   rB     rQ   zDataSessionInstance.cell_idc                 C   rO   )z
        :returns: An object with the estimated location where the device's Data Session took place
        :rtype: dict
        rC   rP   r/   r	   r	   r   rC     rQ   z*DataSessionInstance.cell_location_estimatec                 C   rO   )z
        :returns: The number of packets uploaded by the device between the start time and when the Data Session was last updated
        :rtype: unicode
        rD   rP   r/   r	   r	   r   rD     rQ   z$DataSessionInstance.packets_uploadedc                 C   rO   )z
        :returns: The number of packets downloaded by the device between the start time and when the Data Session was last updated
        :rtype: unicode
        rE   rP   r/   r	   r	   r   rE     rQ   z&DataSessionInstance.packets_downloadedc                 C   rO   )z
        :returns: The date that the resource was last updated, given as GMT in ISO 8601 format
        :rtype: datetime
        rF   rP   r/   r	   r	   r   rF   #  rQ   z DataSessionInstance.last_updatedc                 C   rO   )z|
        :returns: The date that the Data Session started, given as GMT in ISO 8601 format
        :rtype: datetime
        rG   rP   r/   r	   r	   r   rG   +  rQ   zDataSessionInstance.startc                 C   rO   )zt
        :returns: The date that the record ended, given as GMT in ISO 8601 format
        :rtype: datetime
        rH   rP   r/   r	   r	   r   rH   3  rQ   zDataSessionInstance.endc                 C   rO   )zh
        :returns: The unique ID of the device using the SIM to connect
        :rtype: unicode
        rI   rP   r/   r	   r	   r   rI   ;  rQ   zDataSessionInstance.imeic                 C   r-   )r.   z(<Twilio.Wireless.V1.DataSessionInstance>r	   r/   r	   r	   r   r0   C  r1   zDataSessionInstance.__repr__)r2   r3   r4   r   propertyr;   r   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   r0   r6   r	   r	   r   r   r8      sF    !















r8   N)__doc__twilio.baser   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r#   r8   r	   r	   r	   r   <module>   s   i'