o
    O`y=                     @   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	 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
      /       /
    )deserialize)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 )SimListk 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 SimList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.supersim.v1.sim.SimList
        :rtype: twilio.rest.supersim.v1.sim.SimList
        z/SimsN )superr   __init__	_solutionformat_uri)selfversion	__class__r
   _/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/twilio/rest/supersim/v1/sim.pyr      s   	zSimList.__init__Nc                 C   s6   | j ||}| j||||d d}| j ||d S )a  
        Streams SimInstance 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 SimInstance.Status status: The status of the Sim resources to read
        :param unicode fleet: The SID or unique name of the Fleet to which a list of Sims are assigned
        :param unicode iccid: The ICCID associated with a Super SIM to filter the list by
        :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.sim.SimInstance]
        	page_size)statusfleeticcidr   limit)_versionread_limitspagestream)r   r   r   r   r   r   limitsr   r
   r
   r   r   $   s   zSimList.streamc                 C   s   t | j|||||dS )ab  
        Lists SimInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param SimInstance.Status status: The status of the Sim resources to read
        :param unicode fleet: The SID or unique name of the Fleet to which a list of Sims are assigned
        :param unicode iccid: The ICCID associated with a Super SIM to filter the list by
        :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.sim.SimInstance]
        )r   r   r   r   r   )listr   )r   r   r   r   r   r   r
   r
   r   r   ?   s   zSimList.listc           	   	   C   s<   t ||||||d}| jjd| j|d}t| j|| jS )a  
        Retrieve a single page of SimInstance records from the API.
        Request is executed immediately

        :param SimInstance.Status status: The status of the Sim resources to read
        :param unicode fleet: The SID or unique name of the Fleet to which a list of Sims are assigned
        :param unicode iccid: The ICCID associated with a Super SIM to filter the list by
        :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 SimInstance
        :rtype: twilio.rest.supersim.v1.sim.SimPage
        )StatusFleetIccid	PageTokenr   PageSizeGET)methoduriparams)r   ofr   r   r   SimPager   )	r   r   r   r   
page_tokenpage_numberr   dataresponser
   r
   r   r   U   s   	zSimList.pagec                 C   s"   | j jjd|}t| j || jS )a#  
        Retrieve a specific page of SimInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SimInstance
        :rtype: twilio.rest.supersim.v1.sim.SimPage
        r%   )r   domaintwiliorequestr*   r   )r   
target_urlr.   r
   r
   r   get_pages   s
   

zSimList.get_pagec                 C      t | j|dS z
        Constructs a SimContext

        :param sid: The SID that identifies the resource to fetch

        :returns: twilio.rest.supersim.v1.sim.SimContext
        :rtype: twilio.rest.supersim.v1.sim.SimContext
        sid
SimContextr   r   r7   r
   r
   r   get      	zSimList.getc                 C   r4   r5   r8   r:   r
   r
   r   __call__   r<   zSimList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Supersim.V1.SimList>r
   r   r
   r
   r   __repr__      zSimList.__repr__)__name__
__module____qualname____doc__r   r   unsetr   r   r   r3   r;   r=   rA   __classcell__r
   r
   r   r   r      s"    


r   c                       s0   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 SimPage

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

        :returns: twilio.rest.supersim.v1.sim.SimPage
        :rtype: twilio.rest.supersim.v1.sim.SimPage
        N)r   r*   r   r   )r   r   r.   solutionr   r
   r   r      s   

zSimPage.__init__c                 C   s   t | j|S )z
        Build an instance of SimInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.supersim.v1.sim.SimInstance
        :rtype: twilio.rest.supersim.v1.sim.SimInstance
        )SimInstancer   r   payloadr
   r
   r   get_instance   s   	zSimPage.get_instancec                 C   r>   )r?   z<Twilio.Supersim.V1.SimPage>r
   r@   r
   r
   r   rA      rB   zSimPage.__repr__)rC   rD   rE   rF   r   rM   rA   rH   r
   r
   r   r   r*      s
    r*   c                       sR   e Zd ZdZ fddZdd ZejejejejejejfddZdd	 Z	  Z
S )
r9   r	   c                    s2   t t| | d|i| _djdi | j| _dS )a"  
        Initialize the SimContext

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

        :returns: twilio.rest.supersim.v1.sim.SimContext
        :rtype: twilio.rest.supersim.v1.sim.SimContext
        r7   z/Sims/{sid}Nr
   )r   r9   r   r   r   r   )r   r   r7   r   r
   r   r      s   

zSimContext.__init__c                 C   s(   | j jd| jd}t| j || jd dS )
        Fetch the SimInstance

        :returns: The fetched SimInstance
        :rtype: twilio.rest.supersim.v1.sim.SimInstance
        r%   )r&   r'   r7   r6   )r   fetchr   rJ   r   rK   r
   r
   r   rO      s   zSimContext.fetchc           	   	   C   sB   t ||||||d}| jjd| j|d}t| j|| jd dS )  
        Update the SimInstance

        :param unicode unique_name: An application-defined string that uniquely identifies the resource
        :param SimInstance.StatusUpdate status: The new status of the Super SIM
        :param unicode fleet: The SID or unique name of the Fleet to which the SIM resource should be assigned
        :param unicode callback_url: The URL we should call after the update has finished
        :param unicode callback_method: The HTTP method we should use to call callback_url
        :param unicode account_sid: The SID of the Account to which the Sim resource should belong

        :returns: The updated SimInstance
        :rtype: twilio.rest.supersim.v1.sim.SimInstance
        )
UniqueNamer    r!   CallbackUrlCallbackMethod
AccountSidPOST)r&   r'   r-   r7   r6   )r   r)   r   updater   rJ   r   )	r   unique_namer   r   callback_urlcallback_methodaccount_sidr-   rL   r
   r
   r   rV      s   	zSimContext.updatec                 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&SimContext.__repr__.<locals>.<genexpr>z"<Twilio.Supersim.V1.SimContext {}>joinr   itemsr   r   contextr
   r
   r   rA        
zSimContext.__repr__)rC   rD   rE   rF   r   rO   r   rG   rV   rA   rH   r
   r
   r   r   r9      s    
r9   c                       s   e Zd ZdZG dd deZG dd de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edd Zedd Zedd Zedd Zdd Zejejejejejejfdd Zd!d" Z  ZS )$rJ   r	   c                   @   s    e Zd ZdZdZdZdZdZdS )zSimInstance.Statusnewreadyactiveinactive	scheduledN)rC   rD   rE   NEWREADYACTIVEINACTIVE	SCHEDULEDr
   r
   r
   r   r      s    r    c                   @   s   e Zd ZdZdZdZdS )zSimInstance.StatusUpdaterm   rn   ro   N)rC   rD   rE   rr   rs   rt   r
   r
   r
   r   StatusUpdate  s    rv   Nc                    s   t t| | |d|d|d|d|d|dt|dt|d|d	d
	| _d| _d|p@| jd i| _dS )z
        Initialize the SimInstance

        :returns: twilio.rest.supersim.v1.sim.SimInstance
        :rtype: twilio.rest.supersim.v1.sim.SimInstance
        r7   rW   rZ   r   r   	fleet_siddate_createddate_updatedurl)	r7   rW   rZ   r   r   rw   rx   ry   rz   N)	r   rJ   r   r;   r   iso8601_datetime_properties_contextr   )r   r   rL   r7   r   r
   r   r   #  s   zSimInstance.__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: SimContext for this SimInstance
        :rtype: twilio.rest.supersim.v1.sim.SimContext
        Nr7   r6   )r}   r9   r   r   r@   r
   r
   r   _proxy=  s   
	zSimInstance._proxyc                 C   
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        r7   r|   r@   r
   r
   r   r7   J     
zSimInstance.sidc                 C   r   )zw
        :returns: An application-defined string that uniquely identifies the resource
        :rtype: unicode
        rW   r   r@   r
   r
   r   rW   R  r   zSimInstance.unique_namec                 C   r   )zh
        :returns: The SID of the Account that the Super SIM belongs to
        :rtype: unicode
        rZ   r   r@   r
   r
   r   rZ   Z  r   zSimInstance.account_sidc                 C   r   )zU
        :returns: The ICCID associated with the SIM
        :rtype: unicode
        r   r   r@   r
   r
   r   r   b  r   zSimInstance.iccidc                 C   r   )zZ
        :returns: The status of the Super SIM
        :rtype: SimInstance.Status
        r   r   r@   r
   r
   r   r   j  r   zSimInstance.statusc                 C   r   )zf
        :returns: The unique ID of the Fleet configured for this SIM
        :rtype: unicode
        rw   r   r@   r
   r
   r   rw   r  r   zSimInstance.fleet_sidc                 C   r   )zt
        :returns: The ISO 8601 date and time in GMT when the resource was created
        :rtype: datetime
        rx   r   r@   r
   r
   r   rx   z  r   zSimInstance.date_createdc                 C   r   )zy
        :returns: The ISO 8601 date and time in GMT when the resource was last updated
        :rtype: datetime
        ry   r   r@   r
   r
   r   ry     r   zSimInstance.date_updatedc                 C   r   )zX
        :returns: The absolute URL of the Sim Resource
        :rtype: unicode
        rz   r   r@   r
   r
   r   rz     r   zSimInstance.urlc                 C   s
   | j  S )rN   )r~   rO   r@   r
   r
   r   rO     s   
zSimInstance.fetchc                 C   s   | j j||||||dS )rP   )rW   r   r   rX   rY   rZ   )r~   rV   )r   rW   r   r   rX   rY   rZ   r
   r
   r   rV     s   zSimInstance.updatec                 C   r[   )r?   r\   c                 s   r]   r^   r_   r`   r
   r
   r   rd     re   z'SimInstance.__repr__.<locals>.<genexpr>z#<Twilio.Supersim.V1.SimInstance {}>rf   ri   r
   r
   r   rA     rk   zSimInstance.__repr__)N)rC   rD   rE   rF   objectr    rv   r   propertyr~   r7   rW   rZ   r   r   rw   rx   ry   rz   rO   r   rG   rV   rA   rH   r
   r
   r   r   rJ     s>    









	
rJ   N)rF   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r*   r9   rJ   r
   r
   r
   r   <module>   s    (G