a
    !f@%                     @   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 )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|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   iso8601_datetimer   r   	_solution_context)selfr   r   r   	__class__ \/var/www/html/python-backend/venv/lib/python3.9/site-packages/twilio/rest/routes/v2/trunk.pyr   &   s     
zTrunkInstance.__init__TrunkContextreturnc                 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_asyncr   r   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"   r1   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
        r0   N)r)   update_asyncr2   r!   r!   r"   r4   s   s    zTrunkInstance.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>       z)TrunkInstance.__repr__.<locals>.<genexpr>z#<Twilio.Routes.V2.TrunkInstance {}>joinr   itemsr9   r   contextr!   r!   r"   __repr__   s    zTrunkInstance.__repr__)N)__name__
__module____qualname____doc__r   r   strr   r   r   propertyr)   r+   r-   r   unsetr   objectr1   r4   rE   __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 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}N)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+   rO   r   r   r   r   r!   r!   r"   r+      s    zTrunkContext.fetchc                    s.   | j jd| jdI dH }t| j || jd dS )r,   rP   rQ   Nr   r&   )r'   r-   rO   r   r   rT   r!   r!   r"   r-      s    zTrunkContext.fetch_asyncr.   c                 C   s:   t ||d}| jjd| j|d}t| j|| jd dS )r/   ZVoiceRegionZFriendlyNamePOSTrR   rS   datar   r&   )r   ofr'   r1   rO   r   r   r   r   r   rX   r   r!   r!   r"   r1      s    zTrunkContext.updatec                    s@   t ||d}| jjd| j|dI dH }t| j|| jd dS )r3   rU   rV   rW   Nr   r&   )r   rY   r'   r4   rO   r   r   rZ   r!   r!   r"   r4      s    zTrunkContext.update_asyncc                 C   s$   d dd | j D }d|S )r5   r6   c                 s   s   | ]\}}d  ||V  qdS r7   r8   r:   r!   r!   r"   r>     r?   z(TrunkContext.__repr__.<locals>.<genexpr>z"<Twilio.Routes.V2.TrunkContext {}>r@   rC   r!   r!   r"   rE     s    zTrunkContext.__repr__)rF   rG   rH   r   rJ   r   r   r+   r-   r   rL   r   rM   r1   r4   rE   rN   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 )	TrunkList)r   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   s   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     s    zTrunkList.getc                 C   s   t | j|dS r\   r]   r^   r!   r!   r"   __call__  s    zTrunkList.__call__r$   c                 C   s   dS )r5   z<Twilio.Routes.V2.TrunkList>r!   r(   r!   r!   r"   rE   %  s    zTrunkList.__repr__)rF   rG   rH   r   r   rJ   r#   r   r_   rE   rN   r!   r!   r   r"   r[     s   	r[   N)rI   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   v|