
    d{i5?                         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 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)ApiResponse)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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d f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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 )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       Y/home/sas/my/fyp/ringai/.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.fetchN   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$   r2   zTrunkInstance.fetch_asyncW   s!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the TrunkInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r,   fetch_with_http_infor+   s    r$   r5   z"TrunkInstance.fetch_with_http_info`   s     {{//11r%   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the TrunkInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r,   fetch_with_http_info_asyncr+   s    r$   r7   z(TrunkInstance.fetch_with_http_info_asynci   s!      [[;;====r3   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$   r;   zTrunkInstance.updater   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
        r:   N)r,   update_asyncr<   s      r$   r?   zTrunkInstance.update_async   s4      [[--%' . 
 
 	
 
   !*(*c                 <    | j                   j                  ||      S )a@  
        Update the TrunkInstance with HTTP info

        :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: ApiResponse with instance, status code, and headers
        r:   )r,   update_with_http_infor<   s      r$   rB   z#TrunkInstance.update_with_http_info   s&     {{00%' 1 
 	
r%   c                 X   K   | j                   j                  ||       d{   S 7 w)aZ  
        Asynchronous coroutine to update the TrunkInstance with HTTP info

        :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: ApiResponse with instance, status code, and headers
        r:   N)r,   update_with_http_info_asyncr<   s      r$   rD   z)TrunkInstance.update_with_http_info_async   s4      [[<<%' = 
 
 	
 
r@   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>        SDAq7>>!Q/S   !z#<Twilio.Routes.V2.TrunkInstance {}>joinr    itemsrK   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/   r2   r
   r5   r7   r	   unsetr   objectr;   r?   rB   rD   rX   __classcell__r#   s   @r$   r   r      s   	 +/	55 c3h5 #3-	54  #/2k 2>+ > ,2<<,2LL
CK(
 S&[)
 
	
( ,2<<,2LL
CK(
 S&[)
 
	
( ,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	de
fdZde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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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    rK   _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                  |      S )zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptGETmethoduriheaders)r	   ofr*   fetch_with_response_inforf   r"   rn   s     r$   _fetchzTrunkContext._fetch   sB     ))B-.}}55dii 6 
 	
r%   c                 t    | j                         \  }}}t        | j                  || j                  d         S )r.   r   r(   )rr   r   r*   r    r"   r   _s      r$   r/   zTrunkContext.fetch   s9     AMM!^^,>?
 	
r%   c                     | j                         \  }}}t        | j                  || j                  d         }t	        |||      S )z
        Fetch the TrunkInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r(   datastatus_codern   )rr   r   r*   r    r
   r"   r   ry   rn   instances        r$   r5   z!TrunkContext.fetch_with_http_info   sH     )-%g MM!^^,>?

 k7SSr%   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        rh   ri   rj   rk   N)r	   ro   r*   fetch_with_response_info_asyncrf   rq   s     r$   _fetch_asynczTrunkContext._fetch_async  sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         S 7 -w)r1   Nr   r(   )r~   r   r*   r    rt   s      r$   r2   zTrunkContext.fetch_async  sH      #//11AMM!^^,>?
 	
 2s   AA.Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)z
        Asynchronous coroutine to fetch the TrunkInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r(   rw   )r~   r   r*   r    r
   rz   s        r$   r7   z'TrunkContext.fetch_with_http_info_async   sX      /3.?.?.A(A%g MM!^^,>?

 k7SS )Bs   AA<Ar   r   c                     t        j                  ||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        VoiceRegionFriendlyName!application/x-www-form-urlencodedContent-Typerh   ri   POSTrl   rm   rx   rn   )r	   ro   r*   update_with_response_inforf   r"   r   r   rx   rn   s        r$   _updatezTrunkContext._update/  si     yy+ -
 ))B-"E.}}66tyytW 7 
 	
r%   c                 z    | j                  ||      \  }}}t        | j                  || j                  d         S )r9   r:   r   r(   )r   r   r*   r    r"   r   r   r   ru   s        r$   r;   zTrunkContext.updateK  sF     %] % 
A MM7T^^DV5W
 	
r%   c                     | j                  ||      \  }}}t        | j                  || j                  d         }t	        |||      S )aN  
        Update the TrunkInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        r:   r   r(   rw   )r   r   r*   r    r
   r"   r   r   r   ry   rn   r{   s          r$   rB   z"TrunkContext.update_with_http_info_  sU     )-%] )5 )
%g !MM7T^^DV5W
 k7SSr%   c                    K   t        j                  ||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   S 7 w)	z
        Internal async helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   rh   ri   r   r   N)r	   ro   r*   update_with_response_info_asyncrf   r   s        r$   _update_asynczTrunkContext._update_asynct  sx      yy+ -
 ))B-"E.]]BBtyytW C 
 
 	
 
s   A$A-&A+'A-c                    K   | j                  ||       d{   \  }}}t        | j                  || j                  d         S 7 -w)r>   r:   Nr   r(   )r   r   r*   r    r   s        r$   r?   zTrunkContext.update_async  sV      #00%] 1 
 
A MM7T^^DV5W
 	

s   A	A.A	c                    K   | j                  ||       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)ah  
        Asynchronous coroutine to update the TrunkInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        r:   Nr   r(   rw   )r   r   r*   r    r
   r   s          r$   rD   z(TrunkContext.update_with_http_info_async  sf      /3.@.@%] /A /
 )
%g !MM7T^^DV5W
 k7SS)
s   AA<Ac                     dj                  d | j                  j                         D              }dj                  |      S )rF   rG   c              3   F   K   | ]  \  }}d j                  ||        ywrI   rJ   rL   s      r$   rP   z(TrunkContext.__repr__.<locals>.<genexpr>  rQ   rR   z"<Twilio.Routes.V2.TrunkContext {}>rS   rV   s     r$   rX   zTrunkContext.__repr__  s6     ((SDNN<P<P<RSS3::7CCr%   )rY   rZ   r[   r   r]   r   tuplerr   r   r/   r
   r5   r~   r2   r7   r	   r_   r   r`   r   r;   rB   r   r?   rD   rX   ra   rb   s   @r$   r)   r)      s   J J3 J
 
 
} 
Tk T
E 
 
= 
T+ T" ,2<<,2LL
CK(
 S&[)
 
	
< ,2<<,2LL
CK(
 S&[)
 
	
, ,2<<,2LLTCK(T S&[)T 
	T. ,2<<,2LL
CK(
 S&[)
 
	
< ,2<<,2LL
CK(
 S&[)
 
	
, ,2<<,2LLTCK(T S&[)T 
	T*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 r   r   r   s     r$   __call__zTrunkList.__call__  r   r%   c                      y)rF   z<Twilio.Routes.V2.TrunkList>re   r+   s    r$   rX   zTrunkList.__repr__  s     .r%   )rY   rZ   r[   r   r   r]   r)   r   r   rX   ra   rb   s   @r$   r   r     sG    " "NC NL NN N N.# .r%   r   N)r\   r   typingr   r   r   r   twilio.baser   r	   twilio.base.api_responser
   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r)   r   re   r%   r$   <module>r      sV     - - + 0 8 : 2 'hE$ hEV|D? |D~!. !.r%   