
    m>h'                         d Z ddlmZ ddlmZmZmZmZ ddlmZ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y)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Routes
    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OptionalUnion)deserializevalues)InstanceContext)InstanceResource)ListResource)Versionc                       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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 )PhoneNumberInstancea  
    :ivar phone_number: The phone number in E.164 format
    :ivar url: The absolute URL of the resource.
    :ivar sid: A 34 character string that uniquely identifies the Inbound Processing Region assignments for this phone number.
    :ivar account_sid: The unique SID identifier of the Account.
    :ivar friendly_name: A human readable description of the Inbound Processing Region assignments for this phone number, up to 64 characters.
    :ivar voice_region: The Inbound Processing Region used for this phone number for voice.
    :ivar date_created: The date that this phone number was assigned an Inbound Processing Region, given in ISO 8601 format.
    :ivar date_updated: The date that the Inbound Processing Region was updated for this phone number, given in ISO 8601 format.
    versionpayloadphone_numberc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        d|xs | j                  i| _        d | _        y )	Nr   urlsidaccount_sidfriendly_namevoice_regiondate_createddate_updated)super__init__getr   r   r   r   r   r   r   iso8601_datetimer   r   	_solution_context)selfr   r   r   	__class__s       f/var/www/html/DP/alpha_backend/venv/lib/python3.12/site-packages/twilio/rest/routes/v2/phone_number.pyr   zPhoneNumberInstance.__init__$   s     	!+2;;~+F")++e"4")++e"4*1++m*D,3KK,H+2;;~+F0;0L0LKK'1
 1<0L0LKK'1

 L=D,=,=
 7;    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: PhoneNumberContext for this PhoneNumberInstance
        r   r   )r    PhoneNumberContext_versionr   r!   s    r#   _proxyzPhoneNumberInstance._proxy>   s9     == .!^^N;DM }}r$   c                 6    | j                   j                         S )c
        Fetch the PhoneNumberInstance


        :returns: The fetched PhoneNumberInstance
        )r+   fetchr*   s    r#   r.   zPhoneNumberInstance.fetchM   s     {{  ""r$   c                 R   K   | j                   j                          d{   S 7 w)}
        Asynchronous coroutine to fetch the PhoneNumberInstance


        :returns: The fetched PhoneNumberInstance
        N)r+   fetch_asyncr*   s    r#   r1   zPhoneNumberInstance.fetch_asyncV   s!      [[,,....s   '%'r   r   c                 <    | j                   j                  ||      S )&  
        Update the PhoneNumberInstance

        :param voice_region: The Inbound Processing Region used for this phone number for voice
        :param friendly_name: A human readable description of this resource, up to 64 characters.

        :returns: The updated PhoneNumberInstance
        r   r   )r+   updater!   r   r   s      r#   r5   zPhoneNumberInstance.update_   s&     {{!!%' " 
 	
r$   c                 X   K   | j                   j                  ||       d{   S 7 w)@  
        Asynchronous coroutine to update the PhoneNumberInstance

        :param voice_region: The Inbound Processing Region used for this phone number for voice
        :param friendly_name: A human readable description of this resource, up to 64 characters.

        :returns: The updated PhoneNumberInstance
        r4   N)r+   update_asyncr6   s      r#   r9   z PhoneNumberInstance.update_asyncq   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/PhoneNumberInstance.__repr__.<locals>.<genexpr>   "     S<RDAq7>>!Q/<R   !z)<Twilio.Routes.V2.PhoneNumberInstance {}>joinr   itemsr@   r!   contexts     r#   __repr__zPhoneNumberInstance.__repr__   s6     ((SDNN<P<P<RSS:AA'JJr$   )N)r%   r(   )r%   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr+   r.   r1   r	   unsetr   objectr5   r9   rM   __classcell__r"   s   @r#   r   r      s    	 '+	;; c3h; sm	;4  #/ ,2<<,2LL
CK(
 S&[)
 
	
( ,2<<,2LL
CK(
 S&[)
 
	
$K# Kr$   r   c                        e Zd Zdedef 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 )r(   r   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the PhoneNumberContext

        :param version: Version that contains the resource
        :param phone_number: The phone number in E.164 format
        r   z/PhoneNumbers/{phone_number}N )r   r   r   r@   _uri)r!   r   r   r"   s      r#   r   zPhoneNumberContext.__init__   s@     	! L
 :299KDNNK	r$   r%   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )r-   application/jsonAcceptGETmethoduriheadersr   r'   )r	   ofr)   r.   r[   r   r   r!   rc   r   s      r#   r.   zPhoneNumberContext.fetch   s]     ))B-.--%%U		7%S"MM7
 	
r$   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)r0   r]   r^   r_   r`   Nr   r'   )r	   rd   r)   r1   r[   r   r   re   s      r#   r1   zPhoneNumberContext.fetch_async   sr      ))B-.11dii 2 
 
 #MM7
 	
	
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 )
r3   VoiceRegionFriendlyName!application/x-www-form-urlencodedContent-Typer]   r^   POSTra   rb   datarc   r   r'   )r	   rd   r)   r5   r[   r   r   r!   r   r   ro   rc   r   s         r#   r5   zPhoneNumberContext.update   s     yy+ -
 ))B-"E.--&&tyytW ' 
 #MM71O
 	
r$   c                 (  K   t        j                  ||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   
      S 7 )w)r8   rh   rk   rl   r]   r^   rm   rn   Nr   r'   )r	   rd   r)   r9   r[   r   r   rp   s         r#   r9   zPhoneNumberContext.update_async   s      yy+ -
 ))B-"E.22tyytW 3 
 
 #MM71O
 	
	
s   A$B&B'*Bc                     dj                  d | j                  j                         D              }dj                  |      S )r;   r<   c              3   F   K   | ]  \  }}d j                  ||        ywr>   r?   rA   s      r#   rE   z.PhoneNumberContext.__repr__.<locals>.<genexpr>  rF   rG   z(<Twilio.Routes.V2.PhoneNumberContext {}>rH   rK   s     r#   rM   zPhoneNumberContext.__repr__  s6     ((SDNN<P<P<RSS9@@IIr$   )rN   rO   rP   r   rR   r   r   r.   r1   r	   rT   r   rU   r5   r9   rM   rV   rW   s   @r#   r(   r(      s    L Ls L
* 
(
#6 
0 ,2<<,2LL 
CK( 
 S&[) 
 
	 
H ,2<<,2LL 
CK( 
 S&[) 
 
	 
DJ# Jr$   r(   c                   P     e Zd Zdef 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 )PhoneNumberListr   c                 $    t         |   |       y)zm
        Initialize the PhoneNumberList

        :param version: Version that contains the resource

        N)r   r   )r!   r   r"   s     r#   r   zPhoneNumberList.__init__  s     	!r$   r   r%   c                 0    t        | j                  |      S zp
        Constructs a PhoneNumberContext

        :param phone_number: The phone number in E.164 format
        r'   r(   r)   r!   r   s     r#   r   zPhoneNumberList.get!       "$--lKKr$   c                 0    t        | j                  |      S rx   ry   rz   s     r#   __call__zPhoneNumberList.__call__)  r{   r$   c                      y)r;   z"<Twilio.Routes.V2.PhoneNumberList>rZ   r*   s    r#   rM   zPhoneNumberList.__repr__1  s     4r$   )rN   rO   rP   r   r   rR   r(   r   r}   rM   rV   rW   s   @r#   ru   ru     sI    " "L L(: LLS L-? L4# 4r$   ru   N)rQ   r   typingr   r   r   r   twilio.baser   r	   twilio.base.instance_contextr
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r(   ru   rZ   r$   r#   <module>r      sS     - - + 8 : 2 'rK* rKjFJ FJR!4l !4r$   