o
    O`3G                     @   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ejejejfddZejddfddZejddfd	d
Z	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 )	FleetListk 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 FleetList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.supersim.v1.fleet.FleetList
        :rtype: twilio.rest.supersim.v1.fleet.FleetList
        z/FleetsN )superr   __init__	_solutionformat_uri)selfversion	__class__r
   a/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/twilio/rest/supersim/v1/fleet.pyr      s   	zFleetList.__init__c           
   
   C   s:   t |||||||d}| jjd| j|d}	t| j|	S )a2  
        Create the FleetInstance

        :param unicode network_access_profile: The SID or unique name of the Network Access Profile of the Fleet
        :param unicode unique_name: An application-defined string that uniquely identifies the resource
        :param bool data_enabled: Defines whether SIMs in the Fleet are capable of using data connectivity
        :param unicode data_limit: The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume
        :param bool commands_enabled: Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands
        :param unicode commands_url: The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the Commands number
        :param unicode commands_method: A string representing the HTTP method to use when making a request to `commands_url`

        :returns: The created FleetInstance
        :rtype: twilio.rest.supersim.v1.fleet.FleetInstance
        )NetworkAccessProfile
UniqueNameDataEnabled	DataLimitCommandsEnabledCommandsUrlCommandsMethodPOSTmethoduridata)r   of_versioncreater   FleetInstance)
r   network_access_profileunique_namedata_enabled
data_limitcommands_enabledcommands_urlcommands_methodr    payloadr
   r
   r   r#   $   s   
zFleetList.createNc                 C   s2   | j ||}| j||d d}| j ||d S )a&  
        Streams FleetInstance 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 network_access_profile: The SID or unique name of the Network Access Profile of the Fleet
        :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.fleet.FleetInstance]
        	page_size)r%   r-   limit)r"   read_limitspagestream)r   r%   r.   r-   limitsr0   r
   r
   r   r1   D   s   zFleetList.streamc                 C   s   t | j|||dS )a  
        Lists FleetInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param unicode network_access_profile: The SID or unique name of the Network Access Profile of the Fleet
        :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.fleet.FleetInstance]
        )r%   r.   r-   )listr1   )r   r%   r.   r-   r
   r
   r   r3   ]   s
   zFleetList.listc                 C   s8   t ||||d}| jjd| j|d}t| j|| jS )a$  
        Retrieve a single page of FleetInstance records from the API.
        Request is executed immediately

        :param unicode network_access_profile: The SID or unique name of the Network Access Profile of the Fleet
        :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 FleetInstance
        :rtype: twilio.rest.supersim.v1.fleet.FleetPage
        )r   	PageTokenr   PageSizeGET)r   r   params)r   r!   r"   r0   r   	FleetPager   )r   r%   
page_tokenpage_numberr-   r    responser
   r
   r   r0   t   s   zFleetList.pagec                 C   s"   | j jjd|}t| j || jS )a+  
        Retrieve a specific page of FleetInstance records from the API.
        Request is executed immediately

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

        :returns: Page of FleetInstance
        :rtype: twilio.rest.supersim.v1.fleet.FleetPage
        r6   )r"   domaintwiliorequestr8   r   )r   
target_urlr;   r
   r
   r   get_page   s
   

zFleetList.get_pagec                 C      t | j|dS z
        Constructs a FleetContext

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

        :returns: twilio.rest.supersim.v1.fleet.FleetContext
        :rtype: twilio.rest.supersim.v1.fleet.FleetContext
        sidFleetContextr"   r   rD   r
   r
   r   get      	zFleetList.getc                 C   rA   rB   rE   rG   r
   r
   r   __call__   rI   zFleetList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Supersim.V1.FleetList>r
   r   r
   r
   r   __repr__      zFleetList.__repr__)__name__
__module____qualname____doc__r   r   unsetr#   r1   r3   r0   r@   rH   rJ   rN   __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 )r8   r	   c                    s   t t| || || _dS )a  
        Initialize the FleetPage

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

        :returns: twilio.rest.supersim.v1.fleet.FleetPage
        :rtype: twilio.rest.supersim.v1.fleet.FleetPage
        N)r   r8   r   r   )r   r   r;   solutionr   r
   r   r      s   

zFleetPage.__init__c                 C   s   t | j|S )z
        Build an instance of FleetInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.supersim.v1.fleet.FleetInstance
        :rtype: twilio.rest.supersim.v1.fleet.FleetInstance
        )r$   r"   r   r,   r
   r
   r   get_instance   s   	zFleetPage.get_instancec                 C   rK   )rL   z<Twilio.Supersim.V1.FleetPage>r
   rM   r
   r
   r   rN      rO   zFleetPage.__repr__)rP   rQ   rR   rS   r   rX   rN   rU   r
   r
   r   r   r8      s
    r8   c                       sJ   e Zd ZdZ fddZdd ZejejejejfddZdd	 Z	  Z
S )
rF   r	   c                    s2   t t| | d|i| _djdi | j| _dS )a,  
        Initialize the FleetContext

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

        :returns: twilio.rest.supersim.v1.fleet.FleetContext
        :rtype: twilio.rest.supersim.v1.fleet.FleetContext
        rD   z/Fleets/{sid}Nr
   )r   rF   r   r   r   r   )r   r   rD   r   r
   r   r      s   

zFleetContext.__init__c                 C   s(   | j jd| jd}t| j || jd dS )
        Fetch the FleetInstance

        :returns: The fetched FleetInstance
        :rtype: twilio.rest.supersim.v1.fleet.FleetInstance
        r6   )r   r   rD   rC   )r"   fetchr   r$   r   rW   r
   r
   r   rZ      s   zFleetContext.fetchc                 C   s>   t ||||d}| jjd| j|d}t| j|| jd dS )  
        Update the FleetInstance

        :param unicode unique_name: An application-defined string that uniquely identifies the resource
        :param unicode network_access_profile: The SID or unique name of the Network Access Profile of the Fleet
        :param unicode commands_url: The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the Commands number
        :param unicode commands_method: A string representing the HTTP method to use when making a request to `commands_url`

        :returns: The updated FleetInstance
        :rtype: twilio.rest.supersim.v1.fleet.FleetInstance
        )r   r   r   r   r   r   rD   rC   )r   r!   r"   updater   r$   r   )r   r&   r%   r*   r+   r    r,   r
   r
   r   r\     s   zFleetContext.updatec                 C   $   d dd | j D }d|S )rL    c                 s        | ]\}}d  ||V  qdS z{}={}Nr   .0kvr
   r
   r   	<genexpr>$      z(FleetContext.__repr__.<locals>.<genexpr>z$<Twilio.Supersim.V1.FleetContext {}>joinr   itemsr   r   contextr
   r
   r   rN        
zFleetContext.__repr__)rP   rQ   rR   rS   r   rZ   r   rT   r\   rN   rU   r
   r
   r   r   rF      s    
rF   c                       s  e Zd Zd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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fd%d&Zd'd( Z  ZS )*r$   r	   c                   @   s   e Zd ZdZdS )zFleetInstance.DataMeteringpaygN)rP   rQ   rR   PAYGr
   r
   r
   r   DataMetering,  s    rp   Nc                    s   t t| | |d|d|dt|dt|d|d|dt|d|d	|d
|d|d|dd| _d| _d|pS| jd i| _	dS )z
        Initialize the FleetInstance

        :returns: twilio.rest.supersim.v1.fleet.FleetInstance
        :rtype: twilio.rest.supersim.v1.fleet.FleetInstance
        account_sidrD   r&   date_createddate_updatedurlr'   r(   data_meteringr)   r*   r+   network_access_profile_sid)rq   rD   r&   rr   rs   rt   r'   r(   ru   r)   r*   r+   rv   N)
r   r$   r   rH   r   iso8601_datetimeinteger_properties_contextr   )r   r   r,   rD   r   r
   r   r   /  s"   zFleetInstance.__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: FleetContext for this FleetInstance
        :rtype: twilio.rest.supersim.v1.fleet.FleetContext
        NrD   rC   )rz   rF   r"   r   rM   r
   r
   r   _proxyM  s   
	zFleetInstance._proxyc                 C   
   | j d S )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        rq   ry   rM   r
   r
   r   rq   Z     
zFleetInstance.account_sidc                 C   r|   )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        rD   r}   rM   r
   r
   r   rD   b  r~   zFleetInstance.sidc                 C   r|   )zw
        :returns: An application-defined string that uniquely identifies the resource
        :rtype: unicode
        r&   r}   rM   r
   r
   r   r&   j  r~   zFleetInstance.unique_namec                 C   r|   )zt
        :returns: The ISO 8601 date and time in GMT when the resource was created
        :rtype: datetime
        rr   r}   rM   r
   r
   r   rr   r  r~   zFleetInstance.date_createdc                 C   r|   )zy
        :returns: The ISO 8601 date and time in GMT when the resource was last updated
        :rtype: datetime
        rs   r}   rM   r
   r
   r   rs   z  r~   zFleetInstance.date_updatedc                 C   r|   )zZ
        :returns: The absolute URL of the Fleet resource
        :rtype: unicode
        rt   r}   rM   r
   r
   r   rt     r~   zFleetInstance.urlc                 C   r|   )zy
        :returns: Defines whether SIMs in the Fleet are capable of using data connectivity
        :rtype: bool
        r'   r}   rM   r
   r
   r   r'     r~   zFleetInstance.data_enabledc                 C   r|   )z
        :returns: The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume
        :rtype: unicode
        r(   r}   rM   r
   r
   r   r(     r~   zFleetInstance.data_limitc                 C   r|   )zu
        :returns: The model by which a SIM is metered and billed
        :rtype: FleetInstance.DataMetering
        ru   r}   rM   r
   r
   r   ru     r~   zFleetInstance.data_meteringc                 C   r|   )z
        :returns: Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands
        :rtype: bool
        r)   r}   rM   r
   r
   r   r)     r~   zFleetInstance.commands_enabledc                 C   r|   )z
        :returns: The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the Commands number
        :rtype: unicode
        r*   r}   rM   r
   r
   r   r*     r~   zFleetInstance.commands_urlc                 C   r|   )z
        :returns: A string representing the HTTP method to use when making a request to `commands_url`
        :rtype: unicode
        r+   r}   rM   r
   r
   r   r+     r~   zFleetInstance.commands_methodc                 C   r|   )zf
        :returns: The SID of the Network Access Profile of the Fleet
        :rtype: unicode
        rv   r}   rM   r
   r
   r   rv     r~   z(FleetInstance.network_access_profile_sidc                 C   s
   | j  S )rY   )r{   rZ   rM   r
   r
   r   rZ     s   
zFleetInstance.fetchc                 C   s   | j j||||dS )r[   )r&   r%   r*   r+   )r{   r\   )r   r&   r%   r*   r+   r
   r
   r   r\     s   zFleetInstance.updatec                 C   r]   )rL   r^   c                 s   r_   r`   ra   rb   r
   r
   r   rf     rg   z)FleetInstance.__repr__.<locals>.<genexpr>z%<Twilio.Supersim.V1.FleetInstance {}>rh   rk   r
   r
   r   rN     rm   zFleetInstance.__repr__)N)rP   rQ   rR   rS   objectrp   r   propertyr{   rq   rD   r&   rr   rs   rt   r'   r(   ru   r)   r*   r+   rv   rZ   r   rT   r\   rN   rU   r
   r
   r   r   r$   (  sJ    













	
r$   N)rS   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r8   rF   r$   r
   r
   r
   r   <module>   s    .(B