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 )TrunkInstancea  
    :ivar sip_trunk_domain: The absolute URL of the SIP Trunk
    :ivar url: The absolute URL of the resource.
    :ivar sid: A 34 character string that uniquely identifies the Inbound Processing Region assignments for this SIP Trunk.
    :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 SIP Trunk, up to 64 characters.
    :ivar voice_region: The Inbound Processing Region used for this SIP Trunk for voice.
    :ivar date_created: The date that this SIP Trunk 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 SIP Trunk, given in ISO 8601 format.
    Nversionpayloadsip_trunk_domainc                    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__ n/var/www/html/apis.geethamveg.com/public_html/venv/lib/python3.10/site-packages/twilio/rest/routes/v2/trunk.pyr   &   s    

zTrunkInstance.__init__returnTrunkContextc                 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: TrunkContext for this TrunkInstance
        Nr   r   )r   r$   _versionr   r   r!   r!   r"   _proxy@   s   
zTrunkInstance._proxyc                 C   s
   | j  S )W
        Fetch the TrunkInstance


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


        :returns: The fetched TrunkInstance
        N)r(   fetch_asyncr'   r!   r!   r"   r,   X   s   zTrunkInstance.fetch_asyncr   r   c                 C   s   | j j||dS )  
        Update the TrunkInstance

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

        :returns: The updated TrunkInstance
        r   r   )r(   updater   r   r   r!   r!   r"   r/   a   s   zTrunkInstance.updatec                    s   | j j||dI dH S )1  
        Asynchronous coroutine to update the TrunkInstance

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

        :returns: The updated TrunkInstance
        r.   N)r(   update_asyncr0   r!   r!   r"   r2   s   s
   zTrunkInstance.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)TrunkInstance.__repr__.<locals>.<genexpr>z#<Twilio.Routes.V2.TrunkInstance {}>joinr   itemsr9   r   contextr!   r!   r"   __repr__      
zTrunkInstance.__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 TrunkContext

        :param version: Version that contains the resource
        :param sip_trunk_domain: The absolute URL of the SIP Trunk
        r   z/Trunks/{sip_trunk_domain}Nr!   )r   r   r   r9   _uri)r   r   r   r   r!   r"   r      s   zTrunkContext.__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TrunkContext.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TrunkContext.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TrunkContext.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TrunkContext.update_asyncc                 C   r3   )r4   r5   c                 s   r6   r7   r8   r:   r!   r!   r"   r>     r?   z(TrunkContext.__repr__.<locals>.<genexpr>z"<Twilio.Routes.V2.TrunkContext {}>r@   rC   r!   r!   r"   rE     rF   zTrunkContext.__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 )	TrunkListr   c                    s   t  | dS )zg
        Initialize the TrunkList

        :param version: Version that contains the resource

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

        :param sip_trunk_domain: The absolute URL of the SIP Trunk
        r%   r$   r&   r   r   r!   r!   r"   r        zTrunkList.getc                 C   r_   r`   ra   rb   r!   r!   r"   __call__  rc   zTrunkList.__call__c                 C   s   dS )r4   z<Twilio.Routes.V2.TrunkList>r!   r'   r!   r!   r"   rE   %  s   zTrunkList.__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|