o
    eO                     @   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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
   P/var/www/html/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 )ab  
        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 unicode ip_commands_url: The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
        :param unicode ip_commands_method: A string representing the HTTP method to use when making a request to `ip_commands_url`
        :param bool sms_commands_enabled: Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands
        :param unicode sms_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 SMS Commands number
        :param unicode sms_commands_method: A string representing the HTTP method to use when making a request to `sms_commands_url`

        :returns: The created FleetInstance
        :rtype: twilio.rest.supersim.v1.fleet.FleetInstance
        )	NetworkAccessProfile
UniqueNameDataEnabled	DataLimitIpCommandsUrlIpCommandsMethodSmsCommandsEnabledSmsCommandsUrlSmsCommandsMethodPOSTmethoduridata)r   of_versioncreater   FleetInstance)r   network_access_profileunique_namedata_enabled
data_limitip_commands_urlip_commands_methodsms_commands_enabledsms_commands_urlsms_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'   r1   limit)r$   read_limitspagestream)r   r'   r2   r1   limitsr4   r
   r
   r   r5   I   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'   r2   r1   )listr5   )r   r'   r2   r1   r
   r
   r   r7   b   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$   r4   r   	FleetPager   )r   r'   
page_tokenpage_numberr1   r"   responser
   r
   r   r4   y   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
        r:   )r$   domaintwiliorequestr<   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   rH   r
   r
   r   get      	zFleetList.getc                 C   rE   rF   rI   rK   r
   r
   r   __call__   rM   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%   r5   r7   r4   rD   rL   rN   rR   __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 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   r<   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   r0   r
   r
   r   get_instance   s   	zFleetPage.get_instancec                 C   rO   )rP   z<Twilio.Supersim.V1.FleetPage>r
   rQ   r
   r
   r   rR      rS   zFleetPage.__repr__)rT   rU   rV   rW   r   r\   rR   rY   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 )
rJ   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
        rH   z/Fleets/{sid}Nr
   )r   rJ   r   r   r   r   )r   r   rH   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
        r:   )r    r!   rH   rG   )r$   fetchr   r&   r   r[   r
   r
   r   r^      s   zFleetContext.fetchc           	   	   C   sB   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 ip_commands_url: The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
        :param unicode ip_commands_method: A string representing the HTTP method to use when making a request to `ip_commands_url`
        :param unicode sms_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 SMS Commands number
        :param unicode sms_commands_method: A string representing the HTTP method to use when making a request to `sms_commands_url`

        :returns: The updated FleetInstance
        :rtype: twilio.rest.supersim.v1.fleet.FleetInstance
        )r   r   r   r   r   r   r   r   rH   rG   )r   r#   r$   updater   r&   r   )	r   r(   r'   r+   r,   r.   r/   r"   r0   r
   r
   r   r`   
  s   	zFleetContext.updatec                 C   $   d dd | j D }d|S )rP    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   rR   '     
zFleetContext.__repr__)rT   rU   rV   rW   r   r^   r   rX   r`   rR   rY   r
   r
   r   r   rJ      s    
rJ   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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 ).r&   r	   c                   @   s   e Zd ZdZdS )zFleetInstance.DataMeteringpaygN)rT   rU   rV   PAYGr
   r
   r
   r   DataMetering6  s    rt   Nc                    s   t t| | |d|d|dt|dt|d|d|dt|d|d	|d
|d|d|d|d|dd| _d| _d|p[| jd i| _	dS )z
        Initialize the FleetInstance

        :returns: twilio.rest.supersim.v1.fleet.FleetInstance
        :rtype: twilio.rest.supersim.v1.fleet.FleetInstance
        account_sidrH   r(   date_createddate_updatedurlr)   r*   data_meteringr-   r.   r/   network_access_profile_sidr+   r,   )ru   rH   r(   rv   rw   rx   r)   r*   ry   r-   r.   r/   rz   r+   r,   N)
r   r&   r   rL   r   iso8601_datetimeinteger_properties_contextr   )r   r   r0   rH   r   r
   r   r   9  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
        NrH   rG   )r~   rJ   r$   r   rQ   r
   r
   r   _proxyY  s   
	zFleetInstance._proxyc                 C   
   | j d S )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        ru   r}   rQ   r
   r
   r   ru   f     
zFleetInstance.account_sidc                 C   r   )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        rH   r   rQ   r
   r
   r   rH   n  r   zFleetInstance.sidc                 C   r   )zw
        :returns: An application-defined string that uniquely identifies the resource
        :rtype: unicode
        r(   r   rQ   r
   r
   r   r(   v  r   zFleetInstance.unique_namec                 C   r   )zt
        :returns: The ISO 8601 date and time in GMT when the resource was created
        :rtype: datetime
        rv   r   rQ   r
   r
   r   rv   ~  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
        rw   r   rQ   r
   r
   r   rw     r   zFleetInstance.date_updatedc                 C   r   )zZ
        :returns: The absolute URL of the Fleet resource
        :rtype: unicode
        rx   r   rQ   r
   r
   r   rx     r   zFleetInstance.urlc                 C   r   )zy
        :returns: Defines whether SIMs in the Fleet are capable of using data connectivity
        :rtype: bool
        r)   r   rQ   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   rQ   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
        ry   r   rQ   r
   r
   r   ry     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   rQ   r
   r
   r   r-     r   z"FleetInstance.sms_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 SMS Commands number
        :rtype: unicode
        r.   r   rQ   r
   r
   r   r.     r   zFleetInstance.sms_commands_urlc                 C   r   )z
        :returns: A string representing the HTTP method to use when making a request to `sms_commands_url`
        :rtype: unicode
        r/   r   rQ   r
   r
   r   r/     r   z!FleetInstance.sms_commands_methodc                 C   r   )zf
        :returns: The SID of the Network Access Profile of the Fleet
        :rtype: unicode
        rz   r   rQ   r
   r
   r   rz     r   z(FleetInstance.network_access_profile_sidc                 C   r   )z
        :returns: The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
        :rtype: unicode
        r+   r   rQ   r
   r
   r   r+     r   zFleetInstance.ip_commands_urlc                 C   r   )z
        :returns: A string representing the HTTP method to use when making a request to `ip_commands_url`
        :rtype: unicode
        r,   r   rQ   r
   r
   r   r,     r   z FleetInstance.ip_commands_methodc                 C   s
   | j  S )r]   )r   r^   rQ   r
   r
   r   r^     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/   r
   r
   r   r`     s   zFleetInstance.updatec                 C   ra   )rP   rb   c                 s   rc   rd   re   rf   r
   r
   r   rj     rk   z)FleetInstance.__repr__.<locals>.<genexpr>z%<Twilio.Supersim.V1.FleetInstance {}>rl   ro   r
   r
   r   rR      rq   zFleetInstance.__repr__)N)rT   rU   rV   rW   objectrt   r   propertyr   ru   rH   r(   rv   rw   rx   r)   r*   ry   r-   r.   r/   rz   r+   r,   r^   r   rX   r`   rR   rY   r
   r
   r   r   r&   2  sT     















	
r&   N)rW   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r<   rJ   r&   r
   r
   r
   r   <module>   s    3(G