U
    ^g%i                     @   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eeeef d fddZe	ddddZ
d dd	d
Zd dddZejfeeef d dddZejfeeef d dddZed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__ p/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/voice/v1/dialing_permissions/settings.pyr      s    zSettingsInstance.__init__SettingsContextreturnc                 C   s   | j dk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_asyncr   r   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   s   dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z"<Twilio.Voice.V1.SettingsInstance>r   r   r   r   r   __repr__c   s    zSettingsInstance.__repr__)__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ed fddZedddZedddZej	fe
eef ed	d
dZej	fe
eef ed	ddZed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!   r8   r   r   r@   r   r   r   r   r!   y   s    
zSettingsContext.fetchc                    s8   t i }d|d< | jjd| j|dI dH }t| j|S )r"   r:   r;   r<   r=   N)r   rA   r   r#   r8   r   rB   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-Typer:   r;   POSTr>   r?   datar@   )r   rA   r   boolean_to_stringr   r'   r8   r   r   r   rH   r@   r   r   r   r   r'      s"     
   zSettingsContext.updatec                    sV   t dt|i}t i }d|d< d|d< | jjd| j||dI dH }t| j|S )	r)   rC   rD   rE   r:   r;   rF   rG   N)r   rA   r   rI   r   r*   r8   r   rJ   r   r   r   r*      s"     
   zSettingsContext.update_asyncc                 C   s   dS )r+   z!<Twilio.Voice.V1.SettingsContext>r   r   r   r   r   r,      s    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ed fddZedddZedddZedd	d
Z	  Z
S )SettingsListr7   c                    s   t  | dS )zj
        Initialize the SettingsList

        :param version: Version that contains the resource

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

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