
    piZ                         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e      Z G d de      Z G d de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Preview
    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                   6    e Zd ZdZ	 ddedeeef   dee   f fdZ	e
dd       ZdefdZdefd	Zdd
ZddZej$                  ej$                  fdeeef   deeef   dd fdZej$                  ej$                  fdeeef   deeef   dd fdZdefdZ xZS )RatePlanInstancea\  
    :ivar sid:
    :ivar unique_name:
    :ivar account_sid:
    :ivar friendly_name:
    :ivar data_enabled:
    :ivar data_metering:
    :ivar data_limit:
    :ivar messaging_enabled:
    :ivar voice_enabled:
    :ivar national_roaming_enabled:
    :ivar international_roaming:
    :ivar date_created:
    :ivar date_updated:
    :ivar url:
    versionpayloadsidc                 :   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        |j                  d      | _        |j                  d	      | _        |j                  d
      | _        |j                  d      | _        t        j                   |j                  d            | _        t        j                   |j                  d            | _        |j                  d      | _        d|xs | j                  i| _        d | _        y )Nr   unique_nameaccount_sidfriendly_namedata_enableddata_metering
data_limitmessaging_enabledvoice_enablednational_roaming_enabledinternational_roamingdate_createddate_updatedurl)super__init__getr   r   r   r   r   r   r   integerr   r   r    r!   r"   iso8601_datetimer#   r$   r%   	_solution_context)selfr   r   r   	__class__s       h/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/preview/wireless/rate_plan.pyr'   zRatePlanInstance.__init__+   sU    	!")++e"4*1++m*D*1++m*D,3KK,H,3KK,G,3KK,H)4)<)<W[[=V)W18=P1Q-4[[-I8?&9
% ;B++#;
" 1<0L0LKK'1
 1<0L0LKK'1
 #*++e"4 3?$((
 48    returnc                     | j                   )t        | j                  | j                  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
        r   r   )r,   RatePlanContext_versionr+   r-   s    r/   _proxyzRatePlanInstance._proxyL   s9     == +NN5)DM }}r0   c                 6    | j                   j                         S )k
        Deletes the RatePlanInstance


        :returns: True if delete succeeds, False otherwise
        )r7   deleter6   s    r/   r:   zRatePlanInstance.delete[   s     {{!!##r0   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the RatePlanInstance


        :returns: True if delete succeeds, False otherwise
        N)r7   delete_asyncr6   s    r/   r=   zRatePlanInstance.delete_asyncd   s!      [[--////   '%'c                 6    | j                   j                         S )]
        Fetch the RatePlanInstance


        :returns: The fetched RatePlanInstance
        )r7   fetchr6   s    r/   rA   zRatePlanInstance.fetchm   s     {{  ""r0   c                 R   K   | j                   j                          d{   S 7 w)w
        Asynchronous coroutine to fetch the RatePlanInstance


        :returns: The fetched RatePlanInstance
        N)r7   fetch_asyncr6   s    r/   rD   zRatePlanInstance.fetch_asyncv   s!      [[,,....r>   r   r   c                 <    | j                   j                  ||      S )
        Update the RatePlanInstance

        :param unique_name:
        :param friendly_name:

        :returns: The updated RatePlanInstance
        r   r   )r7   updater-   r   r   s      r/   rH   zRatePlanInstance.update   s&     {{!!#' " 
 	
r0   c                 X   K   | j                   j                  ||       d{   S 7 w)
        Asynchronous coroutine to update the RatePlanInstance

        :param unique_name:
        :param friendly_name:

        :returns: The updated RatePlanInstance
        rG   N)r7   update_asyncrI   s      r/   rL   zRatePlanInstance.update_async   s4      [[--#' . 
 
 	
 
s   !*(*c                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        ywz{}={}Nformat.0kvs      r/   	<genexpr>z,RatePlanInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z-<Twilio.Preview.Wireless.RatePlanInstance {}>joinr+   itemsrS   r-   contexts     r/   __repr__zRatePlanInstance.__repr__   s6     ((SDNN<P<P<RSS>EEgNNr0   N)r1   r4   )r1   r   )__name__
__module____qualname____doc__r   r   strr   r   r'   propertyr7   boolr:   r=   rA   rD   r   unsetr   objectrH   rL   r`   __classcell__r.   s   @r/   r   r      s   $ OS88)-c3h8>Fsm8B  $ $0D 0#/ +1,,,2LL
3;'
 S&[)
 
	
( +1,,,2LL
3;'
 S&[)
 
	
$O# Or0   r   c                       e Zd Zdedef fdZdefdZdefdZde	fdZ
de	fdZej                  ej                  fd	eeef   d
eeef   de	fdZej                  ej                  fd	eeef   d
eeef   de	fdZdefdZ xZS )r4   r   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the RatePlanContext

        :param version: Version that contains the resource
        :param sid:
        r   z/RatePlans/{sid}N )r&   r'   r+   rS   _uri)r-   r   r   r.   s      r/   r'   zRatePlanContext.__init__   s@     	! 3
 .&--??	r0   r1   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )r9   DELETEmethoduriheaders)r   ofr5   r:   rp   r-   rv   s     r/   r:   zRatePlanContext.delete   s1     ))B-}}##8G#TTr0   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)r<   rr   rs   N)r   rw   r5   r=   rp   rx   s     r/   r=   zRatePlanContext.delete_async   sF      ))B-]]//G 0 
 
 	
 
s   AA
AA
c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )r@   application/jsonAcceptGETrs   r   r3   )r   rw   r5   rA   rp   r   r+   r-   rv   r   s      r/   rA   zRatePlanContext.fetch   s]     ))B-.--%%U		7%SMMu%
 	
r0   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)rC   r{   r|   r}   rs   Nr   r3   )r   rw   r5   rD   rp   r   r+   r~   s      r/   rD   zRatePlanContext.fetch_async   sr      ))B-.11dii 2 
 
  MMu%
 	
	
s   AA4A2	*A4r   r   c                    t        j                  ||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   	      S )
rF   
UniqueNameFriendlyName!application/x-www-form-urlencodedContent-Typer{   r|   POSTrt   ru   datarv   r   r3   )r   rw   r5   rH   rp   r   r+   r-   r   r   r   rv   r   s         r/   rH   zRatePlanContext.update  s     yy) -
 ))B-"E.--&&tyytW ' 
  wDNN5<QRRr0   c                 (  K   t        j                  ||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   
      S 7 )w)rK   r   r   r   r{   r|   r   r   Nr   r3   )r   rw   r5   rL   rp   r   r+   r   s         r/   rL   zRatePlanContext.update_async"  s      yy) -
 ))B-"E.22tyytW 3 
 
  wDNN5<QRR	
s   A$B&B'*Bc                     dj                  d | j                  j                         D              }dj                  |      S )rN   rO   c              3   F   K   | ]  \  }}d j                  ||        ywrQ   rR   rT   s      r/   rX   z+RatePlanContext.__repr__.<locals>.<genexpr>H  rY   rZ   z,<Twilio.Preview.Wireless.RatePlanContext {}>r[   r^   s     r/   r`   zRatePlanContext.__repr__B  s6     ((SDNN<P<P<RSS=DDWMMr0   )rb   rc   rd   r   rf   r'   rh   r:   r=   r   rA   rD   r   ri   r   rj   rH   rL   r`   rk   rl   s   @r/   r4   r4      s    @ @c @
U 
U
D 

' 
(
#3 
0 +1,,,2LLS3;'S S&[)S 
	SD +1,,,2LLS3;'S S&[)S 
	S@N# Nr0   r4   c                   2    e Zd Zdeeef   defdZdefdZy)RatePlanPager   r1   c                 .    t        | j                  |      S )zn
        Build an instance of RatePlanInstance

        :param payload: Payload response from the API
        )r   r5   )r-   r   s     r/   get_instancezRatePlanPage.get_instanceN  s      w77r0   c                      y)rN   z&<Twilio.Preview.Wireless.RatePlanPage>ro   r6   s    r/   r`   zRatePlanPage.__repr__V       8r0   N)	rb   rc   rd   r   rf   r   r   r   r`   ro   r0   r/   r   r   L  s*    8DcN 87G 88# 8r0   r   c                       e Zd Zdef fdZ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	f   deee   e	f   defdZ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	f   deee   e	f   defdZ	 	 d!dee   dee   dee   fdZ	 	 d!dee   dee   dee   fdZ	 	 d!dee   dee   dee   fdZ	 	 d!dee   dee   dee   f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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ZdedefdZdedefdZdedefdZdedefdZdefd Z xZ S )"RatePlanListr   c                 2    t         |   |       d| _        y)zj
        Initialize the RatePlanList

        :param version: Version that contains the resource

        z
/RatePlansN)r&   r'   rp   )r-   r   r.   s     r/   r'   zRatePlanList.__init__a  s     	! 	r0   r   r   r   r   r   r   r    commands_enabledr!   r"   r1   c                    t        j                  ||t        j                  |      ||t        j                  |      t        j                  |      t        j                  |      t        j                  |	      t        j                  |
d       d
      }t        j                  ddi      }d|d<   d|d<   | j
                  j                  d| j                  ||      }t        | j
                  |      S )	a  
        Create the RatePlanInstance

        :param unique_name:
        :param friendly_name:
        :param data_enabled:
        :param data_limit:
        :param data_metering:
        :param messaging_enabled:
        :param voice_enabled:
        :param commands_enabled:
        :param national_roaming_enabled:
        :param international_roaming:

        :returns: The created RatePlanInstance
        c                     | S ra   ro   es    r/   <lambda>z%RatePlanList.create.<locals>.<lambda>      Q r0   
r   r   DataEnabled	DataLimitDataMeteringMessagingEnabledVoiceEnabledCommandsEnabledNationalRoamingEnabledInternationalRoamingr   r   r{   r|   r   r   )	r   rw   r   boolean_to_stringmapr5   createrp   r   r-   r   r   r   r   r   r   r    r   r!   r"   r   rv   r   s                 r/   r   zRatePlanList.createl  s    < yy) -(::<H' -$-$?$?@Q$R ) ; ;M J#,#>#>?O#P*3*E*E,+ )2);)
$ ))^-PQR"E.--&&tyytW ' 
  w77r0   c                   K   t        j                  ||t        j                  |      ||t        j                  |      t        j                  |      t        j                  |      t        j                  |	      t        j                  |
d       d
      }t        j                  ddi      }d|d<   d|d<   | j
                  j                  d| j                  ||       d	{   }t        | j
                  |      S 7 w)
a  
        Asynchronously create the RatePlanInstance

        :param unique_name:
        :param friendly_name:
        :param data_enabled:
        :param data_limit:
        :param data_metering:
        :param messaging_enabled:
        :param voice_enabled:
        :param commands_enabled:
        :param national_roaming_enabled:
        :param international_roaming:

        :returns: The created RatePlanInstance
        c                     | S ra   ro   r   s    r/   r   z+RatePlanList.create_async.<locals>.<lambda>  r   r0   r   r   r   r{   r|   r   r   N)	r   rw   r   r   r   r5   create_asyncrp   r   r   s                 r/   r   zRatePlanList.create_async  s     < yy) -(::<H' -$-$?$?@Q$R ) ; ;M J#,#>#>?O#P*3*E*E,+ )2);)
$ ))^-PQR"E.22tyytW 3 
 
  w77	
s   C"D$C?%Dlimit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   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   )r5   read_limitspagestreamr-   r   r   limitsr   s        r/   r   zRatePlanList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r0   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)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   )r5   r   
page_asyncstream_asyncr   s        r/   r   zRatePlanList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            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   s      r/   r   zRatePlanList.list  s(    & KK#  
 	
r0   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)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
        r   N)r   )r-   r   r   records       r/   
list_asynczRatePlanList.list_async0  sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }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   PageSizer   r   r{   r|   r}   rt   ru   paramsrv   )r   rw   r5   r   rp   r   r-   r   r   r   r   rv   responses          r/   r   zRatePlanList.pageK  sy      yy'#%
 ))^-PQR.==%%diig & 
 DMM844r0   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	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   r   r   r{   r|   r}   r   N)r   rw   r5   r   rp   r   r   s          r/   r   zRatePlanList.page_asyncl  s       yy'#%
 ))^-PQR.11diig 2 
 
 DMM844
s   A"B$A?%B
target_urlc                     | j                   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
        r}   )r5   domaintwiliorequestr   r-   r   r   s      r/   get_pagezRatePlanList.get_page  s7     ==''..66ujIDMM844r0   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)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
        r}   N)r5   r   r   request_asyncr   r   s      r/   get_page_asynczRatePlanList.get_page_async  sD      --44BB5*UUDMM844 Vs   4AAAr   c                 0    t        | j                  |      S zC
        Constructs a RatePlanContext

        :param sid:
        r3   r4   r5   r-   r   s     r/   r(   zRatePlanList.get       t}}#66r0   c                 0    t        | j                  |      S r   r   r   s     r/   __call__zRatePlanList.__call__  r   r0   c                      y)rN   z&<Twilio.Preview.Wireless.RatePlanList>ro   r6   s    r/   r`   zRatePlanList.__repr__  r   r0   )NN)!rb   rc   rd   r   r'   r   ri   r   rf   rj   rh   intr   r   r   r   r   r	   r   r
   r   r   r   r   r   r   r   r   r4   r(   r   r`   rk   rl   s   @r/   r   r   _  s5   	! 	! +1,,,2LL,2LL)/,2LL17-3\\068>:@,,:83;':8 S&[):8 D&L)	:8
 #v+&:8 S&[):8 !v.:8 T6\*:8  f-:8 #(f"5:8  %T#Y%67:8 
:8| +1,,,2LL,2LL)/,2LL17-3\\068>:@,,:83;':8 S&[):8 D&L)	:8
 #v+&:8 S&[):8 !v.:8 T6\*:8  f-:8 #(f"5:8  %T#Y%67:8 
:8|  $#';}; C=; 
"	#	;6  $#'A}A C=A 
'	(	A6  $#'
}
 C=
 
		
8  $#'
}
 C=
 
		
: *0*0,,(.	5#v+&5 3;'5 f%	5
 
5F *0*0,,(.	5#v+&5 3;'5 f%	5
 
5B
53 
5< 
5
5s 
5| 
57s 7 77C 7O 78# 8r0   r   N)re   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   r4   r   r   ro   r0   r/   <module>r      sj     L L L 6 6 8 : 2 ' !QO' QOh\No \N~84 8&\8< \8r0   