
    pi39                         d Z ddlmZ ddlmZmZmZmZmZmZm	Z	 ddl
mZ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 - Wireless
    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.
    )datetime)AnyDictListOptionalUnionIteratorAsyncIterator)deserializevalues)InstanceResource)ListResource)Version)Pagec                   F     e Zd ZdZdedeeef   def fdZdefdZ	 xZ
S )DataSessionInstanceaR
  
    :ivar sid: The unique string that we created to identify the DataSession resource.
    :ivar sim_sid: The SID of the [Sim resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource) that the Data Session is for.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the DataSession resource.
    :ivar radio_link: The generation of wireless technology that the device was using.
    :ivar operator_mcc: The 'mobile country code' is the unique ID of the home country where the Data Session took place. See: [MCC/MNC lookup](http://mcc-mnc.com/).
    :ivar operator_mnc: The 'mobile network code' is the unique ID specific to the mobile operator network where the Data Session took place.
    :ivar operator_country: The three letter country code representing where the device's Data Session took place. This is determined by looking up the `operator_mcc`.
    :ivar operator_name: The friendly name of the mobile operator network that the [SIM](https://www.twilio.com/docs/iot/wireless/api/sim-resource)-connected device is attached to. This is determined by looking up the `operator_mnc`.
    :ivar cell_id: The unique ID of the cellular tower that the device was attached to at the moment when the Data Session was last updated.
    :ivar cell_location_estimate: An object that describes the estimated location in latitude and longitude where the device's Data Session took place. The location is derived from the `cell_id` when the Data Session was last updated. See [Cell Location Estimate Object](https://www.twilio.com/docs/iot/wireless/api/datasession-resource#cell-location-estimate-object).
    :ivar packets_uploaded: The number of packets uploaded by the device between the `start` time and when the Data Session was last updated.
    :ivar packets_downloaded: The number of packets downloaded by the device between the `start` time and when the Data Session was last updated.
    :ivar last_updated: The date that the resource was last updated, given as GMT in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
    :ivar start: The date that the Data Session started, given as GMT in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
    :ivar end: The date that the record ended, given as GMT in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
    :ivar imei: The 'international mobile equipment identity' is the unique ID of the device using the SIM to connect. An IMEI is a 15-digit string: 14 digits for the device identifier plus a check digit calculated using the Luhn formula.
    versionpayloadsim_sidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        |j                  d	      | _        |j                  d
      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        t        j"                  |j                  d            | _        t        j"                  |j                  d            | _        t        j"                  |j                  d            | _        |j                  d      | _        d|i| _        y )N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imei)super__init__getr   r   r   r   r   r   r   r   r   r   r   integerr    r!   iso8601_datetimer"   r#   r$   r%   	_solution)selfr   r   r   	__class__s       j/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/wireless/v1/sim/data_session.pyr'   zDataSessionInstance.__init__-   s~   !")++e"4&-kk)&<*1++m*D)0\)B+2;;~+F+2;;~+F/6{{;M/N,3KK,H&-kk)&<CJ;;$D
# 0;/B/BKK*+0
 2=1D1DKK,-2
 1<0L0LKK'1
 *5)E)EKK *

 (3'C'CGKKPUDV'W#*;;v#6	 w
    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/DataSessionInstance.__repr__.<locals>.<genexpr>U   s     SDAq7>>!Q/Ss   !z+<Twilio.Wireless.V1.DataSessionInstance {}>)joinr+   itemsr5   )r,   contexts     r.   __repr__zDataSessionInstance.__repr__O   s6     ((SDNN<P<P<RSS<CCGLLr/   )__name__
__module____qualname____doc__r   r   strr   r'   r=   __classcell__r-   s   @r.   r   r      s9    & 
  
$sCx.  
3  
DM# Mr/   r   c                   2    e Zd Zdeeef   defdZdefdZy)DataSessionPager   r0   c                 L    t        | j                  || j                  d         S )zq
        Build an instance of DataSessionInstance

        :param payload: Payload response from the API
        r   )r   )r   _versionr+   )r,   r   s     r.   get_instancezDataSessionPage.get_instance[   s%     #MM7DNN9,E
 	
r/   c                      y)r2   z$<Twilio.Wireless.V1.DataSessionPage> r,   s    r.   r=   zDataSessionPage.__repr__e        6r/   N)	r>   r?   r@   r   rB   r   r   rI   r=   rK   r/   r.   rF   rF   Y   s*    
DcN 
7J 
6# 6r/   rF   c            	           e Zd Z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 )DataSessionListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the DataSessionList

        :param version: Version that contains the resource
        :param sim_sid: The SID of the [Sim resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource) with the Data Sessions to read.

        r   z/Sims/{sim_sid}/DataSessionsNrK   )r&   r'   r+   r5   _uri)r,   r   r   r-   s      r.   r'   zDataSessionList.__init__p   s@     	! w
 :299KDNNK	r/   limit	page_sizer0   c                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )aa  
        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 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
        rS   rS   rR   )rH   read_limitspagestreamr,   rR   rS   limitsrW   s        r.   rX   zDataSessionList.stream   sJ    ( **5)<yy6+#6y7}}##D&/::r/   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ap  
        Asynchronously 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 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
        rS   rU   NrR   )rH   rV   
page_asyncstream_asyncrY   s        r.   r]   zDataSessionList.stream_async   sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            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 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
        rR   rS   )listrX   )r,   rR   rS   s      r.   r`   zDataSessionList.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 DataSessionInstance 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)r]   )r,   rR   rS   records       r.   
list_asynczDataSessionList.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 )a{  
        Retrieve a single page of DataSessionInstance 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 DataSessionInstance
        	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r   ofrH   rW   rQ   rF   r+   r,   rd   re   rS   datars   responses          r.   rW   zDataSessionList.page   s      yy'#%
 ))^-PQR.==%%diig & 
 t}}hGGr/   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 DataSessionInstance 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 DataSessionInstance
        rg   rj   rk   rl   rm   rn   ro   N)r   rt   rH   r\   rQ   rF   r+   ru   s          r.   r\   zDataSessionList.page_async  s       yy'#%
 ))^-PQR.11diig 2 
 
 t}}hGG
s   A"B$B
%&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of DataSessionInstance records from the API.
        Request is executed immediately

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

        :returns: Page of DataSessionInstance
        rn   )rH   domaintwiliorequestrF   r+   r,   ry   rw   s      r.   get_pagezDataSessionList.get_page)  s=     ==''..66ujIt}}hGGr/   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a
  
        Asynchronously retrieve a specific page of DataSessionInstance records from the API.
        Request is executed immediately

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

        :returns: Page of DataSessionInstance
        rn   N)rH   r{   r|   request_asyncrF   r+   r~   s      r.   get_page_asynczDataSessionList.get_page_async5  sJ      --44BB5*UUt}}hGG Vs   4AA&Ac                      y)r2   z$<Twilio.Wireless.V1.DataSessionList>rK   rL   s    r.   r=   zDataSessionList.__repr__A  rM   r/   )NN)r>   r?   r@   r   rB   r'   r   intr	   r   rX   r
   r]   r   r`   rc   r   unsetr   objectrF   rW   r\   r   r   r=   rC   rD   s   @r.   rO   rO   n   s   L L# L$  $#';}; C=; 
%	&	;6  $#'A}A C=A 
*	+	A6  $#'
}
 C=
 
!	"	
8  $#'
}
 C=
 
!	"	
: *0*0,,(.	H#v+&H 3;'H f%	H
 
HF *0*0,,(.	H#v+&H 3;'H f%	H
 
HB
H3 
H? 
H
Hs 
H 
H6# 6r/   rO   N)rA   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   rF   rO   rK   r/   r.   <module>r      sQ     L L L + : 2 ' !=M* =M@6d 6*Y6l Y6r/   