U
    ^g%i'                     @   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eeeef ee d fddZ	e
dddd	Zd dd
dZd dddZejejfeeef eeef d dddZejejfeeef eeef d dddZed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|p| 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   Ziso8601_datetimer   r   	_solution_context)selfr   r   r   	__class__ a/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/routes/v2/phone_number.pyr   $   s"     zPhoneNumberInstance.__init__PhoneNumberContextreturnc                 C   s&   | j dk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*   M   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,   V   s    zPhoneNumberInstance.fetch_asyncr   r   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!   r0   _   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_asyncr1   r    r    r!   r3   q   s    z PhoneNumberInstance.update_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nformat.0kvr    r    r!   	<genexpr>   s     z/PhoneNumberInstance.__repr__.<locals>.<genexpr>z)<Twilio.Routes.V2.PhoneNumberInstance {}>joinr   itemsr8   r   contextr    r    r!   __repr__   s    zPhoneNumberInstance.__repr__)N)__name__
__module____qualname____doc__r   r   strr   r   r   propertyr(   r*   r,   r   unsetr   objectr0   r3   rC   __classcell__r    r    r   r!   r      s4    
	



r   c                       s   e Zd Zeed fddZedddZedddZe	j
e	j
feeef eeef ed	d
dZe	j
e	j
feeef eeef ed	ddZedddZ  ZS )r"   )r   r   c                    s*   t  | d|i| _djf | 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}N)r   r   r   r8   _uri)r   r   r   r   r    r!   r      s
     zPhoneNumberContext.__init__r#   c                 C   s<   t i }d|d< | jjd| j|d}t| j|| jd dS )r)   application/jsonAcceptGETmethoduriheadersr   r%   )r   ofr&   r*   rM   r   r   r   rT   r   r    r    r!   r*      s    
zPhoneNumberContext.fetchc                    sB   t i }d|d< | jjd| j|dI dH }t| j|| jd dS )r+   rN   rO   rP   rQ   Nr   r%   )r   rU   r&   r,   rM   r   r   rV   r    r    r!   r,      s    
  zPhoneNumberContext.fetch_asyncr-   c                 C   sV   t ||d}t i }d|d< d|d< | jjd| j||d}t| j|| jd d	S )
r.   ZVoiceRegionZFriendlyName!application/x-www-form-urlencodedContent-TyperN   rO   POSTrR   rS   datarT   r   r%   )r   rU   r&   r0   rM   r   r   r   r   r   r\   rT   r   r    r    r!   r0      s&    
     zPhoneNumberContext.updatec                    s\   t ||d}t i }d|d< d|d< | jjd| j||dI dH }t| j|| jd	 d
S )r2   rW   rX   rY   rN   rO   rZ   r[   Nr   r%   )r   rU   r&   r3   rM   r   r   r]   r    r    r!   r3      s&    
     zPhoneNumberContext.update_asyncc                 C   s$   d dd | j D }d|S )r4   r5   c                 s   s   | ]\}}d  ||V  qdS r6   r7   r9   r    r    r!   r=     s     z.PhoneNumberContext.__repr__.<locals>.<genexpr>z(<Twilio.Routes.V2.PhoneNumberContext {}>r>   rA   r    r    r!   rC     s    zPhoneNumberContext.__repr__)rD   rE   rF   r   rH   r   r   r*   r,   r   rJ   r   rK   r0   r3   rC   rL   r    r    r   r!   r"      s$   

$

"r"   c                       sP   e Zd Zed fddZeedddZeedddZed	d
dZ	  Z
S )PhoneNumberList)r   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   s   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   !  s    zPhoneNumberList.getc                 C   s   t | j|dS r_   r`   ra   r    r    r!   __call__)  s    zPhoneNumberList.__call__r#   c                 C   s   dS )r4   z"<Twilio.Routes.V2.PhoneNumberList>r    r'   r    r    r!   rC   1  s    zPhoneNumberList.__repr__)rD   rE   rF   r   r   rH   r"   r   rb   rC   rL   r    r    r   r!   r^     s   	r^   N)rG   r   typingr   r   r   r   Ztwilio.baser   r   Ztwilio.base.instance_contextr	   Ztwilio.base.instance_resourcer
   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r   r"   r^   r    r    r    r!   <module>   s   u 
