o
    /is                     @   s   d Z ddlmZ ddlmZmZmZmZmZmZm	Z	 ddl
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 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 )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Wireless
    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.
    )datetime)AnyDictListOptionalUnionIteratorAsyncIterator)deserialize	serializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                       s   e Zd ZdZ	ddedeeef dee f fddZ	e
dd
dZdefddZdefddZdddZdddZejejfdeeef deeef dd fddZejejfdeeef deeef dd fddZdefddZ  ZS )RatePlanInstanceah
  
    :ivar sid: The unique string that we created to identify the RatePlan resource.
    :ivar unique_name: An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the RatePlan resource.
    :ivar friendly_name: The string that you assigned to describe the resource.
    :ivar data_enabled: Whether SIMs can use GPRS/3G/4G/LTE data connectivity.
    :ivar data_metering: The model used to meter data usage. Can be: `payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#payg-vs-quota-data-plans).
    :ivar data_limit: The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB.
    :ivar messaging_enabled: Whether SIMs can make, send, and receive SMS using [Commands](https://www.twilio.com/docs/iot/wireless/api/command-resource).
    :ivar voice_enabled: Deprecated. Whether SIMs can make and receive voice calls.
    :ivar national_roaming_enabled: Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming).
    :ivar national_roaming_data_limit: The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB.
    :ivar international_roaming: The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can contain: `data` and `messaging`.
    :ivar international_roaming_data_limit: The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB.
    :ivar date_created: The date and time in GMT when the resource was created specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
    :ivar date_updated: The date and time in GMT when the resource was last updated specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
    :ivar url: The absolute URL of the resource.
    Nversionpayloadsidc                    s  t  | |d| _|d| _|d| _|d| _|d| _|d| _t	
|d| _|d| _|d	| _|d
| _t	
|d| _|d| _t	
|d| _t	|d| _t	|d| _|d| _d|pz| ji| _d | _d S )Nr   unique_nameaccount_sidfriendly_namedata_enableddata_metering
data_limitmessaging_enabledvoice_enablednational_roaming_enablednational_roaming_data_limitinternational_roaming international_roaming_data_limitdate_createddate_updatedurl)super__init__getr   r   r   r   r   r   r
   integerr   r   r   r   r   r    r!   iso8601_datetimer"   r#   r$   	_solution_context)selfr   r   r   	__class__ \/var/www/html/philips/venv/lib/python3.10/site-packages/twilio/rest/wireless/v1/rate_plan.pyr&   /   s@   

zRatePlanInstance.__init__returnRatePlanContextc                 C   s&   | j du rt| j| jd 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: RatePlanContext for this RatePlanInstance
        Nr   r   )r+   r2   _versionr*   r,   r/   r/   r0   _proxyV   s   
zRatePlanInstance._proxyc                 C   
   | j  S )k
        Deletes the RatePlanInstance


        :returns: True if delete succeeds, False otherwise
        )r6   deleter5   r/   r/   r0   r9   e      
zRatePlanInstance.deletec                       | j  I dH S )
        Asynchronous coroutine that deletes the RatePlanInstance


        :returns: True if delete succeeds, False otherwise
        N)r6   delete_asyncr5   r/   r/   r0   r=   n      zRatePlanInstance.delete_asyncc                 C   r7   )]
        Fetch the RatePlanInstance


        :returns: The fetched RatePlanInstance
        )r6   fetchr5   r/   r/   r0   r@   w   r:   zRatePlanInstance.fetchc                    r;   )w
        Asynchronous coroutine to fetch the RatePlanInstance


        :returns: The fetched RatePlanInstance
        N)r6   fetch_asyncr5   r/   r/   r0   rB      r>   zRatePlanInstance.fetch_asyncr   r   c                 C   s   | j j||dS )  
        Update the RatePlanInstance

        :param unique_name: An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
        :param friendly_name: A descriptive string that you create to describe the resource. It does not have to be unique.

        :returns: The updated RatePlanInstance
        r   r   )r6   updater,   r   r   r/   r/   r0   rE      s   zRatePlanInstance.updatec                    s   | j j||dI dH S )  
        Asynchronous coroutine to update the RatePlanInstance

        :param unique_name: An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
        :param friendly_name: A descriptive string that you create to describe the resource. It does not have to be unique.

        :returns: The updated RatePlanInstance
        rD   N)r6   update_asyncrF   r/   r/   r0   rH      s
   zRatePlanInstance.update_asyncc                 C   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s        | ]\}}d  ||V  qdS z{}={}Nformat.0kvr/   r/   r0   	<genexpr>       z,RatePlanInstance.__repr__.<locals>.<genexpr>z(<Twilio.Wireless.V1.RatePlanInstance {}>joinr*   itemsrO   r,   contextr/   r/   r0   __repr__      
zRatePlanInstance.__repr__N)r1   r2   )r1   r   )__name__
__module____qualname____doc__r   r   strr   r   r&   propertyr6   boolr9   r=   r@   rB   r   unsetr   objectrE   rH   r[   __classcell__r/   r/   r-   r0   r      sF    
'	
	
	





r   c                       s   e Zd Zdedef fddZdefddZdefdd	Zde	fd
dZ
de	fddZejejfdeeef deeef de	fddZejejfdeeef deeef de	fddZdefddZ  ZS )r2   r   r   c                    s.   t  | d|i| _djdi | j| _dS )z
        Initialize the RatePlanContext

        :param version: Version that contains the resource
        :param sid: The SID of the RatePlan resource to update.
        r   z/RatePlans/{sid}Nr/   )r%   r&   r*   rO   _uri)r,   r   r   r-   r/   r0   r&      s   zRatePlanContext.__init__r1   c                 C   s   | j jd| jdS )r8   DELETEmethoduri)r4   r9   rh   r5   r/   r/   r0   r9      s   zRatePlanContext.deletec                    s   | j jd| jdI dH S )r<   ri   rj   N)r4   r=   rh   r5   r/   r/   r0   r=      s
   zRatePlanContext.delete_asyncc                 C   s(   | j jd| jd}t| j || jd dS )r?   GETrj   r   r3   )r4   r@   rh   r   r*   r,   r   r/   r/   r0   r@      s   zRatePlanContext.fetchc                    s0   | j jd| jdI dH }t| j || jd dS )rA   rm   rj   Nr   r3   )r4   rB   rh   r   r*   rn   r/   r/   r0   rB      s   zRatePlanContext.fetch_asyncr   r   c                 C   s:   t ||d}| jjd| j|d}t| j|| jd dS )rC   
UniqueNameFriendlyNamePOSTrk   rl   datar   r3   )r   ofr4   rE   rh   r   r*   r,   r   r   rt   r   r/   r/   r0   rE     s   zRatePlanContext.updatec                    sB   t ||d}| jjd| j|dI dH }t| j|| jd dS )rG   ro   rr   rs   Nr   r3   )r   ru   r4   rH   rh   r   r*   rv   r/   r/   r0   rH   !  s   zRatePlanContext.update_asyncc                 C   rI   )rJ   rK   c                 s   rL   rM   rN   rP   r/   r/   r0   rT   C  rU   z+RatePlanContext.__repr__.<locals>.<genexpr>z'<Twilio.Wireless.V1.RatePlanContext {}>rV   rY   r/   r/   r0   r[   =  r\   zRatePlanContext.__repr__)r^   r_   r`   r   rb   r&   rd   r9   r=   r   r@   rB   r   re   r   rf   rE   rH   r[   rg   r/   r/   r-   r0   r2      s2    





r2   c                   @   s4   e Zd Zdeeef defddZdefddZdS )RatePlanPager   r1   c                 C   s   t | j|S )zn
        Build an instance of RatePlanInstance

        :param payload: Payload response from the API
        )r   r4   rn   r/   r/   r0   get_instanceH  s   zRatePlanPage.get_instancec                 C      dS )rJ   z!<Twilio.Wireless.V1.RatePlanPage>r/   r5   r/   r/   r0   r[   P     zRatePlanPage.__repr__N)	r^   r_   r`   r   rb   r   r   rx   r[   r/   r/   r/   r0   rw   G  s    rw   c                       s   e Zd Zdef fddZejejejejej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e
e	f dee
e	f deee e	f deee	f deee	f defddZejejejejej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e
e	f dee
e	f deee e	f deee	f deee	f defddZ		d1dee dee dee fddZ		d1dee dee dee fddZ		d1dee dee dee fddZ		d1dee dee dee fddZejejejfdeee	f d eee	f deee	f defd!d"Zejejejfdeee	f d eee	f deee	f defd#d$Zd%edefd&d'Zd%edefd(d)Zd*edefd+d,Zd*edefd-d.Zdefd/d0Z  Z S )2RatePlanListr   c                    s   t  | d| _dS )zj
        Initialize the RatePlanList

        :param version: Version that contains the resource

        z
/RatePlansN)r%   r&   rh   )r,   r   r-   r/   r0   r&   Z  s   
zRatePlanList.__init__r   r   r   r   r   r   r   r   r    r   r!   r1   c                 C   sN   t ||||||||t|	dd |
|d}| jjd| j|d}t| j|S )a.	  
        Create the RatePlanInstance

        :param unique_name: An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
        :param friendly_name: A descriptive string that you create to describe the resource. It does not have to be unique.
        :param data_enabled: Whether SIMs can use GPRS/3G/4G/LTE data connectivity.
        :param data_limit: The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB and the default value is `1000`.
        :param data_metering: The model used to meter data usage. Can be: `payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#payg-vs-quota-data-plans).
        :param messaging_enabled: Whether SIMs can make, send, and receive SMS using [Commands](https://www.twilio.com/docs/iot/wireless/api/command-resource).
        :param voice_enabled: Deprecated.
        :param national_roaming_enabled: Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming).
        :param international_roaming: The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can contain: `data` and `messaging`.
        :param national_roaming_data_limit: The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB. See [national roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming) for more info.
        :param international_roaming_data_limit: The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB.

        :returns: The created RatePlanInstance
        c                 S      | S r]   r/   er/   r/   r0   <lambda>      z%RatePlanList.create.<locals>.<lambda>rp   rq   DataEnabled	DataLimitDataMeteringMessagingEnabledVoiceEnabledNationalRoamingEnabledInternationalRoamingNationalRoamingDataLimitInternationalRoamingDataLimitrr   rs   )r   ru   r   mapr4   createrh   r   r,   r   r   r   r   r   r   r   r   r    r   r!   rt   r   r/   r/   r0   r   e  s,   zRatePlanList.createc                    sV   t ||||||||t|	dd |
|d}| jjd| j|dI dH }t| j|S )a=	  
        Asynchronously create the RatePlanInstance

        :param unique_name: An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
        :param friendly_name: A descriptive string that you create to describe the resource. It does not have to be unique.
        :param data_enabled: Whether SIMs can use GPRS/3G/4G/LTE data connectivity.
        :param data_limit: The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB and the default value is `1000`.
        :param data_metering: The model used to meter data usage. Can be: `payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#payg-vs-quota-data-plans).
        :param messaging_enabled: Whether SIMs can make, send, and receive SMS using [Commands](https://www.twilio.com/docs/iot/wireless/api/command-resource).
        :param voice_enabled: Deprecated.
        :param national_roaming_enabled: Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming).
        :param international_roaming: The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can contain: `data` and `messaging`.
        :param national_roaming_data_limit: The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB. See [national roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming) for more info.
        :param international_roaming_data_limit: The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB.

        :returns: The created RatePlanInstance
        c                 S   r|   r]   r/   r}   r/   r/   r0   r     r   z+RatePlanList.create_async.<locals>.<lambda>r   rr   rs   N)r   ru   r   r   r4   create_asyncrh   r   r   r/   r/   r0   r     s.   zRatePlanList.create_asyncNlimit	page_sizec                 C   s0   | j ||}| j|d d}| j ||d S )a^  
        Streams RatePlanInstance 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 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
        r   r   r   )r4   read_limitspagestreamr,   r   r   limitsr   r/   r/   r0   r     s   zRatePlanList.streamc                    s8   | j ||}| j|d dI dH }| j ||d S )am  
        Asynchronously streams RatePlanInstance 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 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
        r   r   Nr   )r4   r   
page_asyncstream_asyncr   r/   r/   r0   r     s   zRatePlanList.stream_asyncc                 C   s   t | j||dS )a  
        Lists RatePlanInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :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   r   )listr   r,   r   r   r/   r/   r0   r   	  s   zRatePlanList.listc                    s&   dd | j ||dI dH 2 I dH S )a
  
        Asynchronously lists RatePlanInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :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
        c                    s   g | z3 d H W }|q6 S r]   r/   )rQ   recordr/   r/   r0   
<listcomp>6  s
    z+RatePlanList.list_async.<locals>.<listcomp>r   N)r   r   r/   r/   r0   
list_async#  s   
zRatePlanList.list_async
page_tokenpage_numberc                 C   s2   t |||d}| jjd| j|d}t| j|S )au  
        Retrieve a single page of RatePlanInstance records from the API.
        Request is executed immediately

        :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 RatePlanInstance
        	PageTokenr   PageSizerm   rk   rl   params)r   ru   r4   r   rh   rw   r,   r   r   r   rt   responser/   r/   r0   r   >  s   zRatePlanList.pagec                    s:   t |||d}| jjd| j|dI dH }t| j|S )a  
        Asynchronously retrieve a single page of RatePlanInstance records from the API.
        Request is executed immediately

        :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 RatePlanInstance
        r   rm   r   N)r   ru   r4   r   rh   rw   r   r/   r/   r0   r   Y  s   zRatePlanList.page_async
target_urlc                 C   s   | j jjd|}t| j |S )z
        Retrieve a specific page of RatePlanInstance records from the API.
        Request is executed immediately

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

        :returns: Page of RatePlanInstance
        rm   )r4   domaintwiliorequestrw   r,   r   r   r/   r/   r0   get_pagev  s   	zRatePlanList.get_pagec                    s&   | j jjd|I dH }t| j |S )a  
        Asynchronously retrieve a specific page of RatePlanInstance records from the API.
        Request is executed immediately

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

        :returns: Page of RatePlanInstance
        rm   N)r4   r   r   request_asyncrw   r   r/   r/   r0   get_page_async  s   	zRatePlanList.get_page_asyncr   c                 C      t | j|dS zo
        Constructs a RatePlanContext

        :param sid: The SID of the RatePlan resource to update.
        r3   r2   r4   r,   r   r/   r/   r0   r'        zRatePlanList.getc                 C   r   r   r   r   r/   r/   r0   __call__  r   zRatePlanList.__call__c                 C   ry   )rJ   z!<Twilio.Wireless.V1.RatePlanList>r/   r5   r/   r/   r0   r[     rz   zRatePlanList.__repr__)NN)!r^   r_   r`   r   r&   r   re   r   rb   rf   rd   intr   r   r   r   r   r   r   r	   r   r   r   rw   r   r   r   r   r2   r'   r   r[   rg   r/   r/   r-   r0   r{   Y  s   







	



;







	



;











r{   N)ra   r   typingr   r   r   r   r   r   r	   twilio.baser
   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r2   rw   r{   r/   r/   r/   r0   <module>   s    $  