
    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 )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.
    versionpayloadsip_trunk_domainc                    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       _/var/www/html/DP/alpha_backend/venv/lib/python3.12/site-packages/twilio/rest/routes/v2/trunk.pyr   zTrunkInstance.__init__$   s     	!/6{{;M/N")++e"4")++e"4*1++m*D,3KK,H+2;;~+F0;0L0LKK'1
 1<0L0LKK'1

  0 ID4I4I
 15    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: TrunkContext for this TrunkInstance
        r   r   )r    TrunkContext_versionr   r!   s    r#   _proxyzTrunkInstance._proxy>   s:     == (!%0B!CDM }}r$   c                 6    | j                   j                         S )W
        Fetch the TrunkInstance


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


        :returns: The fetched TrunkInstance
        N)r+   fetch_asyncr*   s    r#   r1   zTrunkInstance.fetch_asyncV   s!      [[,,....s   '%'r   r   c                 <    | j                   j                  ||      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   s      r#   r5   zTrunkInstance.update_   s&     {{!!%' " 
 	
r$   c                 X   K   | j                   j                  ||       d{   S 7 w)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
        r4   N)r+   update_asyncr6   s      r#   r9   zTrunkInstance.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)TrunkInstance.__repr__.<locals>.<genexpr>   "     S<RDAq7>>!Q/<R   !z#<Twilio.Routes.V2.TrunkInstance {}>joinr   itemsr@   r!   contexts     r#   __repr__zTrunkInstance.__repr__   s6     ((SDNN<P<P<RSS4;;GDDr$   )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    	 +/	55 c3h5 #3-	54  #/ ,2<<,2LL
CK(
 S&[)
 
	
( ,2<<,2LL
CK(
 S&[)
 
	
$E# E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 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   r@   _uri)r!   r   r   r"   s      r#   r   zTrunkContext.__init__   sA     	!  0
 8077I$..I	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TrunkContext.fetch   s^     ))B-.--%%U		7%SMM!^^,>?
 	
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TrunkContext.fetch_async   ss      ))B-.11dii 2 
 
 MM!^^,>?
 	
	
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TrunkContext.update   s     yy+ -
 ))B-"E.--&&tyytW ' 
 MM7T^^DV5W
 	
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TrunkContext.update_async   s      yy+ -
 ))B-"E.22tyytW 3 
 
 MM7T^^DV5W
 	
	
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(TrunkContext.__repr__.<locals>.<genexpr>  rF   rG   z"<Twilio.Routes.V2.TrunkContext {}>rH   rK   s     r#   rM   zTrunkContext.__repr__  s6     ((SDNN<P<P<RSS3::7CCr$   )rN   rO   rP   r   rR   r   r   r.   r1   r	   rT   r   rU   r5   r9   rM   rV   rW   s   @r#   r(   r(      s    J J3 J
} 
(
= 
0 ,2<<,2LL 
CK( 
 S&[) 
 
	 
H ,2<<,2LL 
CK( 
 S&[) 
 
	 
DD# D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 )	TrunkListr   c                 $    t         |   |       y)zg
        Initialize the TrunkList

        :param version: Version that contains the resource

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

        :param sip_trunk_domain: The absolute URL of the SIP Trunk
        r'   r(   r)   r!   r   s     r#   r   zTrunkList.get!       DMM<LMMr$   c                 0    t        | j                  |      S rx   ry   rz   s     r#   __call__zTrunkList.__call__)  r{   r$   c                      y)r;   z<Twilio.Routes.V2.TrunkList>rZ   r*   s    r#   rM   zTrunkList.__repr__1  s     .r$   )rN   rO   rP   r   r   rR   r(   r   r}   rM   rV   rW   s   @r#   ru   ru     sG    " "NC NL NN N N.# .r$   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E$ rEjFD? FDR!. !.r$   