
    d{i@U                         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 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)ApiResponse)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       f/home/sas/my/fyp/ringai/.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>V   s     SDAq7>>!Q/Ss   !z+<Twilio.Wireless.V1.DataSessionInstance {}>)joinr,   itemsr6   )r-   contexts     r/   __repr__zDataSessionInstance.__repr__P   s6     ((SDNN<P<P<RSS<CCGLLr0   )__name__
__module____qualname____doc__r   r   strr   r(   r>   __classcell__r.   s   @r/   r   r      s9    & 
  
$sCx.  
3  
DM# Mr0   r   c                   2    e Zd Zdeeef   defdZdefdZy)DataSessionPager   r1   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
 	
r0   c                      y)r3   z$<Twilio.Wireless.V1.DataSessionPage> r-   s    r/   r>   zDataSessionPage.__repr__f        6r0   N)	r?   r@   rA   r   rC   r   r   rJ   r>   rL   r0   r/   rG   rG   Z   s*    
DcN 
7J 
6# 6r0   rG   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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 )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}/DataSessionsNrL   )r'   r(   r,   r6   _uri)r-   r   r   r.   s      r/   r(   zDataSessionList.__init__q   s@     	! w
 :299KDNNK	r0   limit	page_sizer1   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
        rT   rT   rS   )rI   read_limitspagestreamr-   rS   rT   limitsrX   s        r/   rY   zDataSessionList.stream   sJ    ( **5)<yy6+#6y7}}##D&/::r0   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
        rT   rV   NrS   )rI   rW   
page_asyncstream_asyncrZ   s        r/   r^   zDataSessionList.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 DataSessionInstance 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
        rT   rV   rS   )rI   rW   page_with_http_inforY   datastatus_codeheadersr-   rS   rT   r[   page_response	generators         r/   stream_with_http_infoz%DataSessionList.stream_with_http_info   sk    $ **5)<006+;N0OMM((););VG_M	=44m6K6KLLr0   c                   K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams DataSessionInstance 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
        rT   rV   NrS   )rI   rW   page_with_http_info_asyncr^   ra   rb   rc   rd   s         r/   stream_with_http_info_asyncz+DataSessionList.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 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
        rS   rT   )listrY   )r-   rS   rT   s      r/   rm   zDataSessionList.list   s(    & KK#  
 	
r0   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
        rl   N)r^   )r-   rS   rT   records       r/   
list_asynczDataSessionList.list_async   sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;c                 b    | j                  ||      \  }}}t        |      }t        |||      S )a  
        Lists DataSessionInstance 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
        rl   ra   rb   rc   )rg   rm   r   )r-   rS   rT   rf   rb   rc   r<   s          r/   list_with_http_infoz#DataSessionList.list_with_http_info  sA    $ +/*D*D +E +
'	; Y;PPr0   c                    K   | j                  ||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }}t        |||      S w)a  
        Asynchronously lists DataSessionInstance 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
        rl   Nrr   )rj   r   )r-   rS   rT   rf   rb   rc   ro   r<   s           r/   list_with_http_info_asyncz)DataSessionList.list_with_http_info_async3  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 )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paramsrc   )r   ofrI   rX   rR   rG   r,   r-   rv   rw   rT   ra   rc   responses          r/   rX   zDataSessionList.pageL  s      yy'#%
 ))^-PQR.==%%diig & 
 t}}hGGr0   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
        ry   r|   r}   r~   r   r   r   N)r   r   rI   r]   rR   rG   r,   r   s          r/   r]   zDataSessionList.page_asyncm  s       yy'#%
 ))^-PQR.11diig 2 
 
 t}}hGG
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 )	a]  
        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 DataSessionPage, status code, and headers
        ry   r|   r}   r~   r   r   r   rr   )r   r   rI   page_with_response_inforR   rG   r,   r   
r-   rv   rw   rT   ra   rc   r   rb   response_headersrX   s
             r/   r`   z#DataSessionList.page_with_http_info  s      yy'#%
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ t}}hG+GWXXr0   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)
al  
        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 DataSessionPage, status code, and headers
        ry   r|   r}   r~   r   r   r   Nrr   )r   r   rI   page_with_response_info_asyncrR   rG   r,   r   r   s
             r/   ri   z)DataSessionList.page_with_http_info_async  s       yy'#%
 ))^-PQR. --==$))D' >   	0+/
 t}}hG+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 DataSessionInstance records from the API.
        Request is executed immediately

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

        :returns: Page of DataSessionInstance
        r   )rI   domaintwiliorequestrG   r,   r-   r   r   s      r/   get_pagezDataSessionList.get_page  s=     ==''..66ujIt}}hGGr0   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
        r   N)rI   r   r   request_asyncrG   r,   r   s      r/   get_page_asynczDataSessionList.get_page_async  sJ      --44BB5*UUt}}hGG Vs   4AA&Ac                      y)r3   z$<Twilio.Wireless.V1.DataSessionList>rL   rM   s    r/   r>   zDataSessionList.__repr__  rN   r0   )NN)#r?   r@   rA   r   rC   r(   r   intr	   r   rY   r
   r^   tuplerg   rj   r   rm   rp   r   rs   ru   r   unsetr   objectrG   rX   r]   r`   ri   r   r   r>   rD   rE   s   @r/   rP   rP   o   s   L L# L$  $#';}; C=; 
%	&	;6  $#'A}A C=A 
*	+	A6  $#'M}M C=M 
	M4  $#'M}M C=M 
	M8  $#'
}
 C=
 
!	"	
8  $#'
}
 C=
 
!	"	
:  $#'Q}Q C=Q 
	Q6  $#'Q}Q C=Q 
	Q6 *0*0,,(.	H#v+&H 3;'H f%	H
 
HF *0*0,,(.	H#v+&H 3;'H f%	H
 
HF *0*0,,(.	 Y#v+& Y 3;' Y f%	 Y
 
 YH *0*0,,(.	"Y#v+&"Y 3;'"Y f%	"Y
 
"YH
H3 
H? 
H
Hs 
H 
H6# 6r0   rP   N)rB   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.api_responser   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   rG   rP   rL   r0   r/   <module>r      sT     L L L + 0 : 2 ' !=M* =M@6d 6*C6l C6r0   