
    d{i]3                         d 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 - Voice
    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.
    )AnyDictOptionalUnion)	serializevalues)ApiResponse)InstanceContext)InstanceResource)ListResource)Versionc                   D    e Zd ZdZdedeeef   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"                  fdeeef   dd fdZej"                  fdeeef   dd fdZej"                  fdeeef   defdZej"                  fdeeef   defdZdefdZ xZS )SettingsInstancez
    :ivar dialing_permissions_inheritance: `true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false`.
    :ivar url: The absolute URL of this resource.
    versionpayloadc                     t         |   |       |j                  d      | _        |j                  d      | _        d | _        y )Ndialing_permissions_inheritanceurl)super__init__getr   r   _context)selfr   r   	__class__s      o/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/voice/v1/dialing_permissions/settings.pyr   zSettingsInstance.__init__   s>    !?F{{-@
, #*++e"437    returnc                 f    | j                   t        | j                        | _         | 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: SettingsContext for this SettingsInstance
        )r   SettingsContext_versionr   s    r   _proxyzSettingsInstance._proxy(   s-     == +DM }}r   c                 6    | j                   j                         S z]
        Fetch the SettingsInstance


        :returns: The fetched SettingsInstance
        )r"   fetchr!   s    r   r%   zSettingsInstance.fetch6   s     {{  ""r   c                 R   K   | j                   j                          d{   S 7 wzw
        Asynchronous coroutine to fetch the SettingsInstance


        :returns: The fetched SettingsInstance
        N)r"   fetch_asyncr!   s    r   r(   zSettingsInstance.fetch_async?   s!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the SettingsInstance with HTTP info


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


        :returns: ApiResponse with instance, status code, and headers
        N)r"   fetch_with_http_info_asyncr!   s    r   r-   z+SettingsInstance.fetch_with_http_info_asyncQ   s!      [[;;====r)   r   c                 :    | j                   j                  |      S z
        Update the SettingsInstance

        :param dialing_permissions_inheritance: `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`.

        :returns: The updated SettingsInstance
        r   )r"   updater   r   s     r   r1   zSettingsInstance.updateZ   s#     {{!!,K " 
 	
r   c                 V   K   | j                   j                  |       d{   S 7 wa  
        Asynchronous coroutine to update the SettingsInstance

        :param dialing_permissions_inheritance: `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`.

        :returns: The updated SettingsInstance
        r0   N)r"   update_asyncr2   s     r   r5   zSettingsInstance.update_asynch   s1      [[--,K . 
 
 	
 
    )')c                 :    | j                   j                  |      S )a   
        Update the SettingsInstance with HTTP info

        :param dialing_permissions_inheritance: `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`.

        :returns: ApiResponse with instance, status code, and headers
        r0   )r"   update_with_http_infor2   s     r   r8   z&SettingsInstance.update_with_http_infov   s#     {{00,K 1 
 	
r   c                 V   K   | j                   j                  |       d{   S 7 w)a:  
        Asynchronous coroutine to update the SettingsInstance with HTTP info

        :param dialing_permissions_inheritance: `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`.

        :returns: ApiResponse with instance, status code, and headers
        r0   N)r"   update_with_http_info_asyncr2   s     r   r:   z,SettingsInstance.update_with_http_info_async   s1      [[<<,K = 
 
 	
 
r6   c                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z"<Twilio.Voice.V1.SettingsInstance> r!   s    r   __repr__zSettingsInstance.__repr__   s     4r   )r   r   )r   r   )__name__
__module____qualname____doc__r   r   strr   r   propertyr"   r%   r(   r	   r+   r-   r   unsetr   boolobjectr1   r5   r8   r:   r>   __classcell__r   s   @r   r   r      s	   
8 8$sCx. 8  #/2k 2>+ > FL\\
/4T6\/B
	
 FL\\
/4T6\/B
	
 FL\\
/4T6\/B
	
 FL\\
/4T6\/B
	
4# 4r   r   c                       e Zd Z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                  fd
eeef   defdZej                  fd
eeef   defdZej                  fd
eeef   de	fdZej                  fd
eeef   defdZej                  fd
eeef   defdZej                  fd
eeef   de	fdZdefdZ xZS )r   r   c                 2    t         |   |       d| _        y)zl
        Initialize the SettingsContext

        :param version: Version that contains the resource
        z	/SettingsN)r   r   _urir   r   r   s     r   r   zSettingsContext.__init__   s     	!	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_inforL   r   rU   s     r   _fetchzSettingsContext._fetch   sB     ))B-.}}55dii 6 
 	
r   c                 V    | j                         \  }}}t        | j                  |      S r$   )rY   r   r    r   r   _s      r   r%   zSettingsContext.fetch   s,     AMM
 	
r   c                 r    | j                         \  }}}t        | j                  |      }t        |||      S )z
        Fetch the SettingsInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        datastatus_coderU   )rY   r   r    r	   r   r   r`   rU   instances        r   r+   z$SettingsContext.fetch_with_http_info   s;     )-%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)
        rO   rP   rQ   rR   N)r   rV   r    fetch_with_response_info_asyncrL   rX   s     r   _fetch_asynczSettingsContext._fetch_async   sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                 r   K   | j                          d{   \  }}}t        | j                  |      S 7 wr'   )re   r   r    r[   s      r   r(   zSettingsContext.fetch_async   s;      #//11AMM
 	
 2s   757c                    K   | j                          d{   \  }}}t        | j                  |      }t        |||      S 7 ,w)z
        Asynchronous coroutine to fetch the SettingsInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr^   )re   r   r    r	   ra   s        r   r-   z*SettingsContext.fetch_with_http_info_async   sK      /3.?.?.A(A%g#MM
 k7SS )Bs   AA-Ar   c                     t        j                  dt        j                  |      i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        DialingPermissionsInheritance!application/x-www-form-urlencodedContent-TyperO   rP   POSTrS   rT   r_   rU   )r   rV   r   boolean_to_stringr    update_with_response_inforL   r   r   r_   rU   s       r   _updatezSettingsContext._update   sv     yy/1L1L32
 ))B-"E.}}66tyytW 7 
 	
r   c                 Z    | j                  |      \  }}}t        | j                  |      S r/   )rq   r   r    r   r   r   r\   s       r   r1   zSettingsContext.update  s3     ,K % 
A  w77r   c                 v    | j                  |      \  }}}t        | j                  |      }t        |||      S )a.  
        Update the SettingsInstance and return response metadata

        :param dialing_permissions_inheritance: `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`.

        :returns: ApiResponse with instance, status code, and headers
        r0   r^   )rq   r   r    r	   r   r   r   r`   rU   rb   s         r   r8   z%SettingsContext.update_with_http_info(  sB     )-,K )5 )
%g $DMM7;k7SSr   c                   K   t        j                  dt        j                  |      i      }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)
        ri   rj   rk   rO   rP   rl   rm   N)r   rV   r   rn   r    update_with_response_info_asyncrL   rp   s       r   _update_asynczSettingsContext._update_async8  s      yy/1L1L32
 ))B-"E.]]BBtyytW C 
 
 	
 
s   A6A?8A=9A?c                 v   K   | j                  |       d{   \  }}}t        | j                  |      S 7 wr4   )rx   r   r    rs   s       r   r5   zSettingsContext.update_asyncS  sC      #00,K 1 
 
A  w77
s   979c                    K   | j                  |       d{   \  }}}t        | j                  |      }t        |||      S 7 ,w)aH  
        Asynchronous coroutine to update the SettingsInstance and return response metadata

        :param dialing_permissions_inheritance: `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`.

        :returns: ApiResponse with instance, status code, and headers
        r0   Nr^   )rx   r   r    r	   ru   s         r   r:   z+SettingsContext.update_with_http_info_asyncb  sS      /3.@.@,K /A /
 )
%g $DMM7;k7SS	)
s   AA-Ac                      y)r<   z!<Twilio.Voice.V1.SettingsContext>r=   r!   s    r   r>   zSettingsContext.__repr__r  s     3r   )r?   r@   rA   r   r   tuplerY   r   r%   r	   r+   re   r(   r-   r   rE   r   rF   rG   rq   r1   r8   rx   r5   r:   rC   r>   rH   rI   s   @r   r   r      se      
 
 
' 
Tk T
E 
 
#3 
T+ T FL\\
/4T6\/B
	
8 FL\\8/4T6\/B8	8  FL\\T/4T6\/BT	T" FL\\
/4T6\/B
	
8 FL\\8/4T6\/B8	8  FL\\T/4T6\/BT	T 3# 3r   r   c                   H     e Zd Zdef fdZdefdZdefdZdefdZ	 xZ
S )SettingsListr   c                 $    t         |   |       y)zj
        Initialize the SettingsList

        :param version: Version that contains the resource

        N)r   r   rM   s     r   r   zSettingsList.__init__~  s     	!r   r   c                 ,    t        | j                        S z/
        Constructs a SettingsContext

        r   r    r!   s    r   r   zSettingsList.get      
 t}}--r   c                 ,    t        | j                        S r   r   r!   s    r   __call__zSettingsList.__call__  r   r   c                      y)r<   z<Twilio.Voice.V1.SettingsList>r=   r!   s    r   r>   zSettingsList.__repr__  s     0r   )r?   r@   rA   r   r   r   r   r   rC   r>   rH   rI   s   @r   r~   r~   |  s3    " "._ ../ .0# 0r   r~   N)rB   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~   r=   r   r   <module>r      sO    . - ) 0 8 : 2 'A4' A4H]3o ]3@0< 0r   