
    pi                         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  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)InstanceContext)InstanceResource)ListResource)Versionc                        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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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      s/opt/services/ai/voice_agent/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 )]
        Fetch the SettingsInstance


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


        :returns: The fetched SettingsInstance
        N)r!   fetch_asyncr    s    r   r'   zSettingsInstance.fetch_async>   s!      [[,,....s   '%'r   c                 :    | j                   j                  |      S )
        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   r+   zSettingsInstance.updateG   s#     {{!!,K " 
 	
r   c                 V   K   | j                   j                  |       d{   S 7 w)  
        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
        r*   N)r!   update_asyncr,   s     r   r/   zSettingsInstance.update_asyncU   s1      [[--,K . 
 
 	
 
s    )')c                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z"<Twilio.Voice.V1.SettingsInstance> r    s    r   __repr__zSettingsInstance.__repr__c   s     4r   )r   r   )r   r   )__name__
__module____qualname____doc__r   r   strr   r   propertyr!   r$   r'   r   unsetr   boolobjectr+   r/   r3   __classcell__r   s   @r   r   r      s    
8 8$sCx. 8  #/ 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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__o   s     	!	r   r   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  |      S )r#   application/jsonAcceptGETmethoduriheaders)r   ofr   r$   rA   r   r   rJ   r   s      r   r$   zSettingsContext.fetchy   sQ     ))B-.--%%U		7%SMM
 	
r   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  |      S 7 w)r&   rD   rE   rF   rG   N)r   rK   r   r'   rA   r   rL   s      r   r'   zSettingsContext.fetch_async   sf      ))B-.11dii 2 
 
  MM
 	
	
s   AA%A#	A%r   c                    t        j                  dt        j                  |      i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )r)   DialingPermissionsInheritance!application/x-www-form-urlencodedContent-TyperD   rE   POSTrH   rI   datarJ   )r   rK   r   boolean_to_stringr   r+   rA   r   r   r   rT   rJ   r   s        r   r+   zSettingsContext.update   s     yy/1L1L32
 ))B-"E.--&&tyytW ' 
  w77r   c                 .  K   t        j                  dt        j                  |      i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	r.   rO   rP   rQ   rD   rE   rR   rS   N)r   rK   r   rU   r   r/   rA   r   rV   s        r   r/   zSettingsContext.update_async   s      yy/1L1L32
 ))B-"E.22tyytW 3 
 
  w77	
s   A6B8B9Bc                      y)r1   z!<Twilio.Voice.V1.SettingsContext>r2   r    s    r   r3   zSettingsContext.__repr__   s     3r   )r4   r5   r6   r   r   r   r$   r'   r   r:   r   r;   r<   r+   r/   r8   r3   r=   r>   s   @r   r   r   m   s       
' 
&
#3 
, FL\\8/4T6\/B8	8> FL\\8/4T6\/B8	8<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   rB   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)r1   z<Twilio.Voice.V1.SettingsList>r2   r    s    r   r3   zSettingsList.__repr__   s     0r   )r4   r5   r6   r   r   r   r   ra   r8   r3   r=   r>   s   @r   rZ   rZ      s3    " "._ ../ .0# 0r   rZ   N)r7   typingr   r   r   r   twilio.baser   r   twilio.base.instance_contextr	   twilio.base.instance_resourcer
   twilio.base.list_resourcer   twilio.base.versionr   r   r   rZ   r2   r   r   <module>ri      sL    . - ) 8 : 2 'S4' S4lw3o w3t0< 0r   