o
    f>h                     @   s   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	 d	eZG d
d de
ZG dd deZdS )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                       s   e Zd ZdZdedeeef f fddZe	ddd	Z
dd
dZdddZejfdeeef dd fddZejfdeeef dd fddZdefddZ  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                    s.   t  | |d| _|d| _d | _d S )Ndialing_permissions_inheritanceurl)super__init__getr   r   _context)selfr   r   	__class__ d/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/voice/v1/dialing_permissions/settings.pyr      s   
zSettingsInstance.__init__returnSettingsContextc                 C   s   | j du r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
        N)r   r   _versionr   r   r   r   _proxy'   s
   
zSettingsInstance._proxyc                 C   s
   | j  S )]
        Fetch the SettingsInstance


        :returns: The fetched SettingsInstance
        )r   fetchr   r   r   r   r    5   s   
zSettingsInstance.fetchc                    s   | j  I dH S )w
        Asynchronous coroutine to fetch the SettingsInstance


        :returns: The fetched SettingsInstance
        N)r   fetch_asyncr   r   r   r   r"   >   s   zSettingsInstance.fetch_asyncr   c                 C   s   | j j|d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   r   r   r   r%   G   s   
zSettingsInstance.updatec                    s   | j j|dI dH S )  
        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&   r   r   r   r(   U   s   
zSettingsInstance.update_asyncc                 C      dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z"<Twilio.Voice.V1.SettingsInstance>r   r   r   r   r   __repr__c      zSettingsInstance.__repr__)r   r   )r   r   )__name__
__module____qualname____doc__r   r   strr   r   propertyr   r    r"   r   unsetr   boolobjectr%   r(   r+   __classcell__r   r   r   r   r      s(    


	




r   c                       s   e Zd Zdef fddZdefddZdefddZej	fd	e
eef defd
dZej	fd	e
eef defddZdefddZ  ZS )r   r   c                    s   t  | d| _dS )zl
        Initialize the SettingsContext

        :param version: Version that contains the resource
        z	/SettingsN)r   r   _urir   r   r   r   r   r   o   s   
zSettingsContext.__init__r   c                 C   s2   t i }d|d< | jjd| j|d}t| j|S )r   application/jsonAcceptGETmethoduriheaders)r   ofr   r    r7   r   r   r?   r   r   r   r   r    y   s   
zSettingsContext.fetchc                    s:   t i }d|d< | jjd| j|dI dH }t| j|S )r!   r9   r:   r;   r<   N)r   r@   r   r"   r7   r   rA   r   r   r   r"      s   
zSettingsContext.fetch_asyncr   c                 C   sP   t dt|i}t i }d|d< d|d< | jjd| j||d}t| j|S )r#   DialingPermissionsInheritance!application/x-www-form-urlencodedContent-Typer9   r:   POSTr=   r>   datar?   )r   r@   r   boolean_to_stringr   r%   r7   r   r   r   rG   r?   r   r   r   r   r%      s   

zSettingsContext.updatec                    sX   t dt|i}t i }d|d< d|d< | jjd| j||dI dH }t| j|S )	r'   rB   rC   rD   r9   r:   rE   rF   N)r   r@   r   rH   r   r(   r7   r   rI   r   r   r   r(      s   

zSettingsContext.update_asyncc                 C   r)   )r*   z!<Twilio.Voice.V1.SettingsContext>r   r   r   r   r   r+      r,   zSettingsContext.__repr__)r-   r.   r/   r   r   r   r    r"   r   r3   r   r4   r5   r%   r(   r1   r+   r6   r   r   r   r   r   m   s"    




r   c                       sL   e Zd Zdef fddZdefddZdefddZdefd	d
Z	  Z
S )SettingsListr   c                    s   t  | dS )zj
        Initialize the SettingsList

        :param version: Version that contains the resource

        N)r   r   r8   r   r   r   r      s   zSettingsList.__init__r   c                 C   
   t | jS z/
        Constructs a SettingsContext

        r   r   r   r   r   r   r         
zSettingsList.getc                 C   rK   rL   rM   r   r   r   r   __call__   rN   zSettingsList.__call__c                 C   r)   )r*   z<Twilio.Voice.V1.SettingsList>r   r   r   r   r   r+      s   zSettingsList.__repr__)r-   r.   r/   r   r   r   r   rO   r1   r+   r6   r   r   r   r   rJ      s
    	rJ   N)r0   typingr   r   r   r   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r   rJ   r   r   r   r   <module>   s    Vz