
    d{id8                         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 )SipDomainInstancez
    :ivar sip_domain:
    :ivar url:
    :ivar sid:
    :ivar account_sid:
    :ivar friendly_name:
    :ivar voice_region:
    :ivar date_created:
    :ivar date_updated:
    versionpayload
sip_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       ^/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/routes/v2/sip_domain.pyr   zSipDomainInstance.__init__%   s     	!)0\)B")++e"4")++e"4*1++m*D,3KK,H+2;;~+F0;0L0LKK'1
 1<0L0LKK'1

 *7
 59    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: SipDomainContext for this SipDomainInstance
        r   r   )r!   SipDomainContext_versionr    r"   s    r$   _proxyzSipDomainInstance._proxy?   s9     == ,>>,7DM }}r%   c                 6    | j                   j                         S )_
        Fetch the SipDomainInstance


        :returns: The fetched SipDomainInstance
        )r,   fetchr+   s    r$   r/   zSipDomainInstance.fetchN   s     {{  ""r%   c                 R   K   | j                   j                          d{   S 7 w)y
        Asynchronous coroutine to fetch the SipDomainInstance


        :returns: The fetched SipDomainInstance
        N)r,   fetch_asyncr+   s    r$   r2   zSipDomainInstance.fetch_asyncW   s!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the SipDomainInstance with HTTP info


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


        :returns: ApiResponse with instance, status code, and headers
        N)r,   fetch_with_http_info_asyncr+   s    r$   r7   z,SipDomainInstance.fetch_with_http_info_asynci   s!      [[;;====r3   r   r   c                 <    | j                   j                  ||      S )
        Update the SipDomainInstance

        :param voice_region:
        :param friendly_name:

        :returns: The updated SipDomainInstance
        r   r   )r,   updater"   r   r   s      r$   r;   zSipDomainInstance.updater   s&     {{!!%' " 
 	
r%   c                 X   K   | j                   j                  ||       d{   S 7 w)
        Asynchronous coroutine to update the SipDomainInstance

        :param voice_region:
        :param friendly_name:

        :returns: The updated SipDomainInstance
        r:   N)r,   update_asyncr<   s      r$   r?   zSipDomainInstance.update_async   s4      [[--%' . 
 
 	
 
   !*(*c                 <    | j                   j                  ||      S )z
        Update the SipDomainInstance with HTTP info

        :param voice_region:
        :param friendly_name:

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

        :param voice_region:
        :param friendly_name:

        :returns: ApiResponse with instance, status code, and headers
        r:   N)r,   update_with_http_info_asyncr<   s      r$   rD   z-SipDomainInstance.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-SipDomainInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z'<Twilio.Routes.V2.SipDomainInstance {}>joinr    itemsrK   r"   contexts     r$   __repr__zSipDomainInstance.__repr__   s6     ((SDNN<P<P<RSS8??HHr%   )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   	 %)	99 c3h9 SM	94  #/2k 2>+ > ,2<<,2LL
CK(
 S&[)
 
	
( ,2<<,2LL
CK(
 S&[)
 
	
( ,2<<,2LL
CK(
 S&[)
 
	
( ,2<<,2LL
CK(
 S&[)
 
	
$I# I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 SipDomainContext

        :param version: Version that contains the resource
        :param sip_domain:
        r   z/SipDomains/{sip_domain}N )r   r   r    rK   _uri)r"   r   r   r#   s      r$   r   zSipDomainContext.__init__   s@     	! *
 6.55GG	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SipDomainContext._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SipDomainContext.fetch   s8     A MM~~l3
 	
r%   c                     | j                         \  }}}t        | j                  || j                  d         }t	        |||      S )z
        Fetch the SipDomainInstance 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%SipDomainContext.fetch_with_http_info   sG     )-%g$MM~~l3

 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SipDomainContext._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SipDomainContext.fetch_async  sG      #//11A MM~~l3
 	
 2s   AA.Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)z
        Asynchronous coroutine to fetch the SipDomainInstance 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+SipDomainContext.fetch_with_http_info_async   sW      /3.?.?.A(A%g$MM~~l3

 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SipDomainContext._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SipDomainContext.updateK  sE     %] % 
A !MM7t~~l/K
 	
r%   c                     | j                  ||      \  }}}t        | j                  || j                  d         }t	        |||      S )z
        Update the SipDomainInstance and return response metadata

        :param voice_region:
        :param friendly_name:

        :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&SipDomainContext.update_with_http_info_  sT     )-%] )5 )
%g %MM7t~~l/K
 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SipDomainContext._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SipDomainContext.update_async  sU      #00%] 1 
 
A !MM7t~~l/K
 	

s   A	A.A	c                    K   | j                  ||       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)z
        Asynchronous coroutine to update the SipDomainInstance and return response metadata

        :param voice_region:
        :param friendly_name:

        :returns: ApiResponse with instance, status code, and headers
        r:   Nr   r(   rw   )r   r   r*   r    r
   r   s          r$   rD   z,SipDomainContext.update_with_http_info_async  se      /3.@.@%] /A /
 )
%g %MM7t~~l/K
 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,SipDomainContext.__repr__.<locals>.<genexpr>  rQ   rR   z&<Twilio.Routes.V2.SipDomainContext {}>rS   rV   s     r$   rX   zSipDomainContext.__repr__  s6     ((SDNN<P<P<RSS7>>wGGr%   )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   H HS H
 
 
( 
Tk T
E 
 
#4 
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*H# H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 )SipDomainListr   c                 $    t         |   |       y)zk
        Initialize the SipDomainList

        :param version: Version that contains the resource

        N)r   r   )r"   r   r#   s     r$   r   zSipDomainList.__init__  s     	!r%   r   r&   c                 0    t        | j                  |      S zK
        Constructs a SipDomainContext

        :param sip_domain:
        r(   r)   r*   r"   r   s     r$   r   zSipDomainList.get        *EEr%   c                 0    t        | j                  |      S r   r   r   s     r$   __call__zSipDomainList.__call__  r   r%   c                      y)rF   z <Twilio.Routes.V2.SipDomainList>re   r+   s    r$   rX   zSipDomainList.__repr__  s     2r%   )rY   rZ   r[   r   r   r]   r)   r   r   rX   ra   rb   s   @r$   r   r     sI    " "Fc F&6 FF3 F+; F2# 2r%   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I( hIV|H |H~!2L !2r%   