o
    e                     @   s   d 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 deZG d	d
 d
e
ZG dd deZG dd deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )values)InstanceContext)InstanceResource)ListResource)Pagec                       s8   e Zd ZdZ fddZdd Zdd Zdd	 Z  ZS )
SettingsList PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. c                    s   t t| | i | _dS )a  
        Initialize the SettingsList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.voice.v1.dialing_permissions.settings.SettingsList
        :rtype: twilio.rest.voice.v1.dialing_permissions.settings.SettingsList
        N)superr   __init__	_solutionselfversion	__class__ d/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/voice/v1/dialing_permissions/settings.pyr
      s   	
zSettingsList.__init__c                 C   
   t | jS z
        Constructs a SettingsContext

        :returns: twilio.rest.voice.v1.dialing_permissions.settings.SettingsContext
        :rtype: twilio.rest.voice.v1.dialing_permissions.settings.SettingsContext
        SettingsContext_versionr   r   r   r   get#      
zSettingsList.getc                 C   r   r   r   r   r   r   r   __call__,   r   zSettingsList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Voice.V1.SettingsList>r   r   r   r   r   __repr__5      zSettingsList.__repr__)	__name__
__module____qualname____doc__r
   r   r   r   __classcell__r   r   r   r   r      s    		r   c                       s0   e Zd ZdZ fddZdd Zdd Z  ZS )SettingsPager   c                    s   t t| || || _dS )aJ  
        Initialize the SettingsPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API

        :returns: twilio.rest.voice.v1.dialing_permissions.settings.SettingsPage
        :rtype: twilio.rest.voice.v1.dialing_permissions.settings.SettingsPage
        N)r	   r%   r
   r   )r   r   responsesolutionr   r   r   r
   D   s   

zSettingsPage.__init__c                 C   s   t | j|S )a  
        Build an instance of SettingsInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.voice.v1.dialing_permissions.settings.SettingsInstance
        :rtype: twilio.rest.voice.v1.dialing_permissions.settings.SettingsInstance
        )SettingsInstancer   r   payloadr   r   r   get_instanceS   s   	zSettingsPage.get_instancec                 C   r   )r   z<Twilio.Voice.V1.SettingsPage>r   r   r   r   r   r   ^   r   zSettingsPage.__repr__)r    r!   r"   r#   r
   r+   r   r$   r   r   r   r   r%   ?   s
    r%   c                       s>   e Zd ZdZ fddZdd ZejfddZdd	 Z	  Z
S )
r   r   c                    s.   t t| | i | _djdi | j| _dS )a  
        Initialize the SettingsContext

        :param Version version: Version that contains the resource

        :returns: twilio.rest.voice.v1.dialing_permissions.settings.SettingsContext
        :rtype: twilio.rest.voice.v1.dialing_permissions.settings.SettingsContext
        z	/SettingsNr   )r	   r   r
   r   format_urir   r   r   r   r
   m   s   	zSettingsContext.__init__c                 C   s   | j jd| jd}t| j |S )
        Fetch the SettingsInstance

        :returns: The fetched SettingsInstance
        :rtype: twilio.rest.voice.v1.dialing_permissions.settings.SettingsInstance
        GET)methoduri)r   fetchr-   r(   r)   r   r   r   r2   |   s   zSettingsContext.fetchc                 C   s.   t d|i}| jjd| j|d}t| j|S )Q  
        Update the SettingsInstance

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

        :returns: The updated SettingsInstance
        :rtype: twilio.rest.voice.v1.dialing_permissions.settings.SettingsInstance
        DialingPermissionsInheritancePOST)r0   r1   data)r   ofr   updater-   r(   )r   dialing_permissions_inheritancer6   r*   r   r   r   r8      s   	zSettingsContext.updatec                 C   $   d dd | j D }d|S )r    c                 s        | ]\}}d  ||V  qdS z{}={}Nr,   .0kvr   r   r   	<genexpr>       z+SettingsContext.__repr__.<locals>.<genexpr>z$<Twilio.Voice.V1.SettingsContext {}>joinr   itemsr,   r   contextr   r   r   r         
zSettingsContext.__repr__)r    r!   r"   r#   r
   r2   r   unsetr8   r   r$   r   r   r   r   r   h   s    r   c                       sb   e Zd ZdZ fddZedd Zedd Zedd	 Zd
d Z	e
jfddZdd Z  ZS )r(   r   c                    s8   t t| | |d|dd| _d| _i | _dS )z
        Initialize the SettingsInstance

        :returns: twilio.rest.voice.v1.dialing_permissions.settings.SettingsInstance
        :rtype: twilio.rest.voice.v1.dialing_permissions.settings.SettingsInstance
        r9   url)r9   rL   N)r	   r(   r
   r   _properties_contextr   )r   r   r*   r   r   r   r
      s   
zSettingsInstance.__init__c                 C   s   | j du rt| j| _ | j S )a>  
        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
        :rtype: twilio.rest.voice.v1.dialing_permissions.settings.SettingsContext
        N)rN   r   r   r   r   r   r   _proxy   s   
	zSettingsInstance._proxyc                 C   
   | j d S )z
        :returns: `true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false`
        :rtype: bool
        r9   rM   r   r   r   r   r9         
z0SettingsInstance.dialing_permissions_inheritancec                 C   rP   )zU
        :returns: The absolute URL of this resource
        :rtype: unicode
        rL   rQ   r   r   r   r   rL      rR   zSettingsInstance.urlc                 C   s
   | j  S )r.   )rO   r2   r   r   r   r   r2      r   zSettingsInstance.fetchc                 C   s   | j j|dS )r3   )r9   )rO   r8   )r   r9   r   r   r   r8      s   	zSettingsInstance.updatec                 C   r:   )r   r;   c                 s   r<   r=   r>   r?   r   r   r   rC      rD   z,SettingsInstance.__repr__.<locals>.<genexpr>z%<Twilio.Voice.V1.SettingsInstance {}>rE   rH   r   r   r   r      rJ   zSettingsInstance.__repr__)r    r!   r"   r#   r
   propertyrO   r9   rL   r2   r   rK   r8   r   r$   r   r   r   r   r(      s    


	r(   N)r#   twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r%   r   r(   r   r   r   r   <module>   s   /)9