o
    6e%                     @   s   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
 d
eZG dd deZG dd deZdS )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                       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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 )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.
    Nversionpayloadphone_numberc                    s   t  | |d| _|d| _|d| _|d| _|d| _|d| _t	
|d| _t	
|d| _d|pA| ji| _d | _d S )	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__ u/var/www/html/apis.geethamveg.com/public_html/venv/lib/python3.10/site-packages/twilio/rest/routes/v2/phone_number.pyr   &   s    

zPhoneNumberInstance.__init__returnPhoneNumberContextc                 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: PhoneNumberContext for this PhoneNumberInstance
        Nr   r   )r   r$   _versionr   r   r!   r!   r"   _proxy@   s   
zPhoneNumberInstance._proxyc                 C   s
   | j  S )c
        Fetch the PhoneNumberInstance


        :returns: The fetched PhoneNumberInstance
        )r(   fetchr'   r!   r!   r"   r*   O   s   
zPhoneNumberInstance.fetchc                    s   | j  I dH S )}
        Asynchronous coroutine to fetch the PhoneNumberInstance


        :returns: The fetched PhoneNumberInstance
        N)r(   fetch_asyncr'   r!   r!   r"   r,   X   s   zPhoneNumberInstance.fetch_asyncr   r   c                 C   s   | j j||d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   r!   r!   r"   r/   a   s   zPhoneNumberInstance.updatec                    s   | j j||dI dH S )@  
        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
        r.   N)r(   update_asyncr0   r!   r!   r"   r2   s   s
   z PhoneNumberInstance.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!   r"   	<genexpr>       z/PhoneNumberInstance.__repr__.<locals>.<genexpr>z)<Twilio.Routes.V2.PhoneNumberInstance {}>joinr   itemsr9   r   contextr!   r!   r"   __repr__      
zPhoneNumberInstance.__repr__)N)r#   r$   )r#   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr(   r*   r,   r   unsetr   objectr/   r2   rE   __classcell__r!   r!   r   r"   r      sB    


	





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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 )r$   r   r   c                    s.   t  | d|i| _djdi | j| _dS )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}Nr!   )r   r   r   r9   _uri)r   r   r   r   r!   r"   r      s   zPhoneNumberContext.__init__r#   c                 C   s(   | j jd| jd}t| j || jd dS )r)   GETmethodurir   r%   )r&   r*   rP   r   r   r   r   r!   r!   r"   r*      s   zPhoneNumberContext.fetchc                    s0   | j jd| jdI dH }t| j || jd dS )r+   rQ   rR   Nr   r%   )r&   r,   rP   r   r   rU   r!   r!   r"   r,      s   zPhoneNumberContext.fetch_asyncr   r   c                 C   s:   t ||d}| jjd| j|d}t| j|| jd dS )r-   VoiceRegionFriendlyNamePOSTrS   rT   datar   r%   )r   ofr&   r/   rP   r   r   r   r   r   r[   r   r!   r!   r"   r/      s   zPhoneNumberContext.updatec                    sB   t ||d}| jjd| j|dI dH }t| j|| jd dS )r1   rV   rY   rZ   Nr   r%   )r   r\   r&   r2   rP   r   r   r]   r!   r!   r"   r2      s   zPhoneNumberContext.update_asyncc                 C   r3   )r4   r5   c                 s   r6   r7   r8   r:   r!   r!   r"   r>     r?   z.PhoneNumberContext.__repr__.<locals>.<genexpr>z(<Twilio.Routes.V2.PhoneNumberContext {}>r@   rC   r!   r!   r"   rE     rF   zPhoneNumberContext.__repr__)rG   rH   rI   r   rK   r   r   r*   r,   r   rM   r   rN   r/   r2   rE   rO   r!   r!   r   r"   r$      s.    


 


r$   c                       sT   e Zd Zdef fddZdedefddZdedefdd	Zdefd
dZ	  Z
S )PhoneNumberListr   c                    s   t  | dS )zm
        Initialize the PhoneNumberList

        :param version: Version that contains the resource

        N)r   r   )r   r   r   r!   r"   r     s   zPhoneNumberList.__init__r   r#   c                 C      t | j|dS zp
        Constructs a PhoneNumberContext

        :param phone_number: The phone number in E.164 format
        r%   r$   r&   r   r   r!   r!   r"   r        zPhoneNumberList.getc                 C   r_   r`   ra   rb   r!   r!   r"   __call__  rc   zPhoneNumberList.__call__c                 C   s   dS )r4   z"<Twilio.Routes.V2.PhoneNumberList>r!   r'   r!   r!   r"   rE   %  s   zPhoneNumberList.__repr__)rG   rH   rI   r   r   rK   r$   r   rd   rE   rO   r!   r!   r   r"   r^     s
    	r^   N)rJ   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$   r^   r!   r!   r!   r"   <module>   s    v|