o
    eJ/                     @   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
 G dd de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
      /       /
    )values)InstanceContext)InstanceResource)ListResource)Pagec                       s   e Zd ZdZ fddZejejejddfddZejejejddfddZejejejejejejfd	d
Z	dd Z
dd Zdd Zdd Z  ZS )NetworkListk PLEASE NOTE that this class contains beta products that are subject to
    change. Use them with caution. c                    s.   t t| | i | _djdi | j| _dS )z
        Initialize the NetworkList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.supersim.v1.network.NetworkList
        :rtype: twilio.rest.supersim.v1.network.NetworkList
        z	/NetworksN )superr   __init__	_solutionformat_uri)selfversion	__class__r	   R/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/supersim/v1/network.pyr      s   	zNetworkList.__init__Nc                 C   s6   | j ||}| j||||d d}| 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 unicode iso_country: The ISO country code of the Network resources to read
        :param unicode mcc: The MCC of Network resource identifiers to be read
        :param unicode mnc: The MNC of Network resource identifiers to be read
        :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.supersim.v1.network.NetworkInstance]
        	page_size)iso_countrymccmncr   limit)_versionread_limitspagestream)r   r   r   r   r   r   limitsr   r	   r	   r   r   #   s   zNetworkList.streamc                 C   s   t | j|||||dS )aS  
        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 unicode iso_country: The ISO country code of the Network resources to read
        :param unicode mcc: The MCC of Network resource identifiers to be read
        :param unicode mnc: The MNC of Network resource identifiers to be read
        :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.supersim.v1.network.NetworkInstance]
        )r   r   r   r   r   )listr   )r   r   r   r   r   r   r	   r	   r   r   >   s   zNetworkList.listc           	   	   C   s<   t ||||||d}| jjd| j|d}t| j|| jS )a  
        Retrieve a single page of NetworkInstance records from the API.
        Request is executed immediately

        :param unicode iso_country: The ISO country code of the Network resources to read
        :param unicode mcc: The MCC of Network resource identifiers to be read
        :param unicode mnc: The MNC of Network resource identifiers to be read
        :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 NetworkInstance
        :rtype: twilio.rest.supersim.v1.network.NetworkPage
        )
IsoCountryMccMnc	PageTokenr   PageSizeGET)methoduriparams)r   ofr   r   r   NetworkPager   )	r   r   r   r   
page_tokenpage_numberr   dataresponser	   r	   r   r   Z   s   	zNetworkList.pagec                 C   s"   | j jjd|}t| j || jS )a3  
        Retrieve a specific page of NetworkInstance records from the API.
        Request is executed immediately

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

        :returns: Page of NetworkInstance
        :rtype: twilio.rest.supersim.v1.network.NetworkPage
        r$   )r   domaintwiliorequestr)   r   )r   
target_urlr-   r	   r	   r   get_pagex   s
   

zNetworkList.get_pagec                 C      t | j|dS z
        Constructs a NetworkContext

        :param sid: The SID of the Network resource to fetch

        :returns: twilio.rest.supersim.v1.network.NetworkContext
        :rtype: twilio.rest.supersim.v1.network.NetworkContext
        sidNetworkContextr   r   r6   r	   r	   r   get      	zNetworkList.getc                 C   r3   r4   r7   r9   r	   r	   r   __call__   r;   zNetworkList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z <Twilio.Supersim.V1.NetworkList>r	   r   r	   r	   r   __repr__      zNetworkList.__repr__)__name__
__module____qualname____doc__r   r   unsetr   r   r   r2   r:   r<   r@   __classcell__r	   r	   r   r   r      s"    


r   c                       0   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 NetworkPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API

        :returns: twilio.rest.supersim.v1.network.NetworkPage
        :rtype: twilio.rest.supersim.v1.network.NetworkPage
        N)r
   r)   r   r   )r   r   r-   solutionr   r	   r   r      s   

zNetworkPage.__init__c                 C   s   t | j|S )z
        Build an instance of NetworkInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.supersim.v1.network.NetworkInstance
        :rtype: twilio.rest.supersim.v1.network.NetworkInstance
        )NetworkInstancer   r   payloadr	   r	   r   get_instance   s   	zNetworkPage.get_instancec                 C   r=   )r>   z <Twilio.Supersim.V1.NetworkPage>r	   r?   r	   r	   r   r@      rA   zNetworkPage.__repr__)rB   rC   rD   rE   r   rM   r@   rG   r	   r	   r   r   r)      s
    r)   c                       rH   )r8   r   c                    s2   t t| | d|i| _djdi | j| _dS )a1  
        Initialize the NetworkContext

        :param Version version: Version that contains the resource
        :param sid: The SID of the Network resource to fetch

        :returns: twilio.rest.supersim.v1.network.NetworkContext
        :rtype: twilio.rest.supersim.v1.network.NetworkContext
        r6   z/Networks/{sid}Nr	   )r
   r8   r   r   r   r   )r   r   r6   r   r	   r   r      s   

zNetworkContext.__init__c                 C   s(   | j jd| jd}t| j || jd dS )
        Fetch the NetworkInstance

        :returns: The fetched NetworkInstance
        :rtype: twilio.rest.supersim.v1.network.NetworkInstance
        r$   )r%   r&   r6   r5   )r   fetchr   rJ   r   rK   r	   r	   r   rO      s   zNetworkContext.fetchc                 C   $   d dd | j D }d|S )r>    c                 s        | ]\}}d  ||V  qdS z{}={}Nr   .0kvr	   r	   r   	<genexpr>       z*NetworkContext.__repr__.<locals>.<genexpr>z&<Twilio.Supersim.V1.NetworkContext {}>joinr   itemsr   r   contextr	   r	   r   r@         
zNetworkContext.__repr__)rB   rC   rD   rE   r   rO   r@   rG   r	   r	   r   r   r8      s
    r8   c                       sz   e Zd ZdZd 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dd Zdd Z  ZS )rJ   r   Nc                    s^   t t| | |d|d|d|d|dd| _d| _d|p*| jd i| _dS )z
        Initialize the NetworkInstance

        :returns: twilio.rest.supersim.v1.network.NetworkInstance
        :rtype: twilio.rest.supersim.v1.network.NetworkInstance
        r6   friendly_nameurlr   identifiers)r6   ra   rb   r   rc   N)r
   rJ   r   r:   _properties_contextr   )r   r   rL   r6   r   r	   r   r      s   	zNetworkInstance.__init__c                 C   s&   | j du rt| j| jd d| _ | j S )a)  
        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
        :rtype: twilio.rest.supersim.v1.network.NetworkContext
        Nr6   r5   )re   r8   r   r   r?   r	   r	   r   _proxy  s   
	zNetworkInstance._proxyc                 C   
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        r6   rd   r?   r	   r	   r   r6   "     
zNetworkInstance.sidc                 C   rg   )z`
        :returns: A human readable identifier of this resource
        :rtype: unicode
        ra   rh   r?   r	   r	   r   ra   *  ri   zNetworkInstance.friendly_namec                 C   rg   )z\
        :returns: The absolute URL of the Network resource
        :rtype: unicode
        rb   rh   r?   r	   r	   r   rb   2  ri   zNetworkInstance.urlc                 C   rg   )z`
        :returns: The ISO country code of the Network resource
        :rtype: unicode
        r   rh   r?   r	   r	   r   r   :  ri   zNetworkInstance.iso_countryc                 C   rg   )zd
        :returns: The MCC/MNCs included in the Network resource
        :rtype: list[dict]
        rc   rh   r?   r	   r	   r   rc   B  ri   zNetworkInstance.identifiersc                 C   s
   | j  S )rN   )rf   rO   r?   r	   r	   r   rO   J  s   
zNetworkInstance.fetchc                 C   rP   )r>   rQ   c                 s   rR   rS   rT   rU   r	   r	   r   rY   Z  rZ   z+NetworkInstance.__repr__.<locals>.<genexpr>z'<Twilio.Supersim.V1.NetworkInstance {}>r[   r^   r	   r	   r   r@   S  r`   zNetworkInstance.__repr__)N)rB   rC   rD   rE   r   propertyrf   r6   ra   rb   r   rc   rO   r@   rG   r	   r	   r   r   rJ      s"    





	rJ   N)rE   twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r)   r8   rJ   r	   r	   r	   r   <module>   s    (*