
    piF                         d Z ddlmZmZmZmZmZ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 ddlmZ  G d	 d
e      Z G d de      Z G d de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Supersim
    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.
    )AnyDictListOptionalUnionIteratorAsyncIterator)values)InstanceContext)InstanceResource)ListResource)Version)Pagec                   r     e Zd ZdZ	 ddedeeef   dee   f fdZ	e
dd       ZddZdd	Zdefd
Z xZS )NetworkInstancea  
    :ivar sid: The unique string that we created to identify the Network resource.
    :ivar friendly_name: A human readable identifier of this resource.
    :ivar url: The absolute URL of the Network resource.
    :ivar iso_country: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resource.
    :ivar identifiers: Array of objects identifying the [MCC-MNCs](https://en.wikipedia.org/wiki/Mobile_country_code) that are included in the Network resource.
    versionpayloadsidc                 <   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        d|xs | j                  i| _        d | _	        y )Nr   friendly_nameurliso_countryidentifiers)
super__init__getr   r   r   r   r   	_solution_context)selfr   r   r   	__class__s       a/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/supersim/v1/network.pyr   zNetworkInstance.__init__!   s     	!")++e"4,3KK,H")++e"4*1++m*D>Ekk->X 3?$((
 37    returnc                     | j                   )t        | j                  | j                  d         | _         | j                   S )z
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: NetworkContext for this NetworkInstance
        r   r   )r   NetworkContext_versionr   r   s    r!   _proxyzNetworkInstance._proxy1   s9     == *NN5)DM }}r"   c                 6    | j                   j                         S )[
        Fetch the NetworkInstance


        :returns: The fetched NetworkInstance
        )r)   fetchr(   s    r!   r,   zNetworkInstance.fetch@   s     {{  ""r"   c                 R   K   | j                   j                          d{   S 7 w)u
        Asynchronous coroutine to fetch the NetworkInstance


        :returns: The fetched NetworkInstance
        N)r)   fetch_asyncr(   s    r!   r/   zNetworkInstance.fetch_asyncI   s!      [[,,....s   '%'c                     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+NetworkInstance.__repr__.<locals>.<genexpr>X        SDAq7>>!Q/S   !z'<Twilio.Supersim.V1.NetworkInstance {}>joinr   itemsr6   r   contexts     r!   __repr__zNetworkInstance.__repr__R   s6     ((SDNN<P<P<RSS8??HHr"   )N)r#   r&   )r#   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr)   r,   r/   rC   __classcell__r    s   @r!   r   r      sd     OS77)-c3h7>Fsm7   #/I# Ir"   r   c                   L     e Zd Zdedef fdZdefdZdefdZdefdZ	 xZ
S )r&   r   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the NetworkContext

        :param version: Version that contains the resource
        :param sid: The SID of the Network resource to fetch.
        r   z/Networks/{sid}N )r   r   r   r6   _uri)r   r   r   r    s      r!   r   zNetworkContext.__init__^   s@     	! 3
 -%,,>t~~>	r"   r#   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )r+   application/jsonAcceptGETmethoduriheadersr   r%   )r
   ofr'   r,   rO   r   r   r   rW   r   s      r!   r,   zNetworkContext.fetchm   s]     ))B-.--%%U		7%SMMu%
 	
r"   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)r.   rQ   rR   rS   rT   Nr   r%   )r
   rX   r'   r/   rO   r   r   rY   s      r!   r/   zNetworkContext.fetch_async   sr      ))B-.11dii 2 
 
 MMu%
 	
	
s   AA4A2	*A4c                     dj                  d | j                  j                         D              }dj                  |      S )r1   r2   c              3   F   K   | ]  \  }}d j                  ||        ywr4   r5   r7   s      r!   r;   z*NetworkContext.__repr__.<locals>.<genexpr>   r<   r=   z&<Twilio.Supersim.V1.NetworkContext {}>r>   rA   s     r!   rC   zNetworkContext.__repr__   s6     ((SDNN<P<P<RSS7>>wGGr"   )rD   rE   rF   r   rH   r   r   r,   r/   rC   rJ   rK   s   @r!   r&   r&   \   s<    ? ?c ?
 
(
? 
,H# Hr"   r&   c                   2    e Zd Zdeeef   defdZdefdZy)NetworkPager   r#   c                 .    t        | j                  |      S )zm
        Build an instance of NetworkInstance

        :param payload: Payload response from the API
        )r   r'   )r   r   s     r!   get_instancezNetworkPage.get_instance   s     t}}g66r"   c                      y)r1   z <Twilio.Supersim.V1.NetworkPage>rN   r(   s    r!   rC   zNetworkPage.__repr__        2r"   N)	rD   rE   rF   r   rH   r   r   r`   rC   rN   r"   r!   r^   r^      s)    7DcN 7 72# 2r"   r^   c                       e Zd Zdef fdZej                  ej                  ej                  ddfdeee	f   deee	f   deee	f   de
e   de
e   d	ee   fd
Zej                  ej                  ej                  ddfdeee	f   deee	f   deee	f   de
e   de
e   d	ee   fdZej                  ej                  ej                  ddfdeee	f   deee	f   deee	f   de
e   de
e   d	ee   fdZej                  ej                  ej                  ddfdeee	f   deee	f   deee	f   de
e   de
e   d	ee   fdZej                  ej                  ej                  ej                  ej                  ej                  fdeee	f   deee	f   deee	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                  ej                  ej                  ej                  fdeee	f   deee	f   deee	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d	efdZded	efdZd	efdZ xZS )NetworkListr   c                 2    t         |   |       d| _        y)zi
        Initialize the NetworkList

        :param version: Version that contains the resource

        z	/NetworksN)r   r   rO   )r   r   r    s     r!   r   zNetworkList.__init__   s     	!	r"   Nr   mccmnclimit	page_sizer#   c                     | j                   j                  ||      }| j                  ||||d         }| j                   j                  ||d         S )a  
        Streams NetworkInstance 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 str iso_country: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources to read.
        :param str mcc: The 'mobile country code' of a country. Network resources with this `mcc` in their `identifiers` will be read.
        :param str mnc: The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read.
        :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
        ri   r   rf   rg   ri   rh   )r'   read_limitspagestreamr   r   rf   rg   rh   ri   limitsrm   s           r!   rn   zNetworkList.stream   sX    4 **5)<yy##AT  
 }}##D&/::r"   c                    K   | j                   j                  ||      }| j                  ||||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams NetworkInstance 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 str iso_country: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources to read.
        :param str mcc: The 'mobile country code' of a country. Network resources with this `mcc` in their `identifiers` will be read.
        :param str mnc: The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read.
        :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
        ri   rk   Nrh   )r'   rl   
page_asyncstream_asyncro   s           r!   rs   zNetworkList.stream_async   sf     4 **5)<__##AT % 
 
 }}))$w@@	
s   8A A$A c           	      @    t        | j                  |||||            S )a  
        Lists NetworkInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str iso_country: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources to read.
        :param str mcc: The 'mobile country code' of a country. Network resources with this `mcc` in their `identifiers` will be read.
        :param str mnc: The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read.
        :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   rf   rg   rh   ri   )listrn   )r   r   rf   rg   rh   ri   s         r!   rv   zNetworkList.list  s1    2 KK'#  
 	
r"   c                    K   | j                  |||||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists NetworkInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str iso_country: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources to read.
        :param str mcc: The 'mobile country code' of a country. Network resources with this `mcc` in their `identifiers` will be read.
        :param str mnc: The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read.
        :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
        ru   N)rs   )r   r   rf   rg   rh   ri   records          r!   
list_asynczNetworkList.list_async&  s]     6 '+&7&7'# '8 ' !	
 	
 !	
 	
 		
 	
s0   >1>953
59>59>
page_tokenpage_numberc           	          t        j                  ||||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }	t        | j                  |	      S )a  
        Retrieve a single page of NetworkInstance records from the API.
        Request is executed immediately

        :param iso_country: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources to read.
        :param mcc: The 'mobile country code' of a country. Network resources with this `mcc` in their `identifiers` will be read.
        :param mnc: The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read.
        :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 NetworkInstance
        
IsoCountryMccMnc	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedrQ   rR   rS   rU   rV   paramsrW   )r
   rX   r'   rm   rO   r^   
r   r   rf   rg   rz   r{   ri   datarW   responses
             r!   rm   zNetworkList.pageJ  s    , yy)'#%	
 ))^-PQR.==%%diig & 
 4==(33r"   c           	        K   t        j                  ||||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }	t        | j                  |	      S 7 w)	a  
        Asynchronously retrieve a single page of NetworkInstance records from the API.
        Request is executed immediately

        :param iso_country: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources to read.
        :param mcc: The 'mobile country code' of a country. Network resources with this `mcc` in their `identifiers` will be read.
        :param mnc: The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read.
        :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 NetworkInstance
        r}   r   r   rQ   rR   rS   r   N)r
   rX   r'   rr   rO   r^   r   s
             r!   rr   zNetworkList.page_asynct  s     , yy)'#%	
 ))^-PQR.11diig 2 
 
 4==(33
s   A%B'B(B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )z
        Retrieve a specific page of NetworkInstance records from the API.
        Request is executed immediately

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

        :returns: Page of NetworkInstance
        rS   )r'   domaintwiliorequestr^   r   r   r   s      r!   get_pagezNetworkList.get_page  s7     ==''..66ujI4==(33r"   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a  
        Asynchronously retrieve a specific page of NetworkInstance records from the API.
        Request is executed immediately

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

        :returns: Page of NetworkInstance
        rS   N)r'   r   r   request_asyncr^   r   s      r!   get_page_asynczNetworkList.get_page_async  sD      --44BB5*UU4==(33 Vs   4AAAr   c                 0    t        | j                  |      S zl
        Constructs a NetworkContext

        :param sid: The SID of the Network resource to fetch.
        r%   r&   r'   r   r   s     r!   r   zNetworkList.get       dmm55r"   c                 0    t        | j                  |      S r   r   r   s     r!   __call__zNetworkList.__call__  r   r"   c                      y)r1   z <Twilio.Supersim.V1.NetworkList>rN   r(   s    r!   rC   zNetworkList.__repr__  rb   r"   )rD   rE   rF   r   r   r
   unsetr   rH   objectr   intr   r   rn   r	   rs   r   rv   ry   r^   rm   rr   r   r   r&   r   r   rC   rJ   rK   s   @r!   rd   rd      s   	  	  +1,,"(,,"(,,##';3;'; 3;; 3;	;
 }; C=; 
/	";F +1,,"(,,"(,,##'A3;'A 3;A 3;	A
 }A C=A 
	'AF +1,,"(,,"(,,##'!
3;'!
 3;!
 3;	!

 }!
 C=!
 
o	!
J +1,,"(,,"(,,##'"
3;'"
 3;"
 3;	"

 }"
 C="
 
o	"
L +1,,"(,,"(,,)/*0,,(.(43;'(4 3;(4 3;	(4
 #v+&(4 3;'(4 f%(4 
(4X +1,,"(,,"(,,)/*0,,(.(43;'(4 3;(4 3;	(4
 #v+&(4 3;'(4 f%(4 
(4T
43 
4; 
4
4s 
4{ 
46s 6~ 66C 6N 62# 2r"   rd   N)rG   typingr   r   r   r   r   r   r	   twilio.baser
   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r&   r^   rd   rN   r"   r!   <module>r      se    M L L  8 : 2 ' !AI& AIHBH_ BHJ2$ 2&X2, X2r"   