U
    k7g#                     @   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 - Insights
    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
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jejejfeeef eeef eeef d dddZejejejfeeef eeef eeef d dddZedddZ  ZS )SettingInstancea1  
    :ivar account_sid: The unique SID identifier of the Account.
    :ivar advanced_features: A boolean flag indicating whether Advanced Features for Voice Insights are enabled.
    :ivar voice_trace: A boolean flag indicating whether Voice Trace is enabled.
    :ivar url: The URL of this resource.
    )versionpayloadc                    sF   t  | |d| _|d| _|d| _|d| _d | _d S )Naccount_sidadvanced_featuresvoice_traceurl)super__init__getr   r   r   r   _context)selfr   r   	__class__ C/tmp/pip-unpacked-wheel-qtbjxrb6/twilio/rest/insights/v1/setting.pyr      s    zSettingInstance.__init__SettingContext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: SettingContext for this SettingInstance
        N)r   r   _versionr   r   r   r   _proxy)   s
    
zSettingInstance._proxysubaccount_sidr   c                 C   s   | j j|dS )
        Fetch the SettingInstance

        :param subaccount_sid: The unique SID identifier of the Subaccount.

        :returns: The fetched SettingInstance
        r#   )r!   fetchr   r#   r   r   r   r&   7   s    
zSettingInstance.fetchc                    s   | j j|dI dH S )
        Asynchronous coroutine to fetch the SettingInstance

        :param subaccount_sid: The unique SID identifier of the Subaccount.

        :returns: The fetched SettingInstance
        r%   N)r!   fetch_asyncr'   r   r   r   r)   E   s    
zSettingInstance.fetch_asyncr   r   r#   r   c                 C   s   | j j|||dS )K  
        Update the SettingInstance

        :param advanced_features: A boolean flag to enable Advanced Features for Voice Insights.
        :param voice_trace: A boolean flag to enable Voice Trace.
        :param subaccount_sid: The unique SID identifier of the Subaccount.

        :returns: The updated SettingInstance
        r   r   r#   )r!   updater   r   r   r#   r   r   r   r-   S   s
    zSettingInstance.updatec                    s   | j j|||dI dH S )e  
        Asynchronous coroutine to update the SettingInstance

        :param advanced_features: A boolean flag to enable Advanced Features for Voice Insights.
        :param voice_trace: A boolean flag to enable Voice Trace.
        :param subaccount_sid: The unique SID identifier of the Subaccount.

        :returns: The updated SettingInstance
        r,   N)r!   update_asyncr.   r   r   r   r0   h   s
    zSettingInstance.update_asyncc                 C   s   dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z$<Twilio.Insights.V1.SettingInstance>r   r    r   r   r   __repr__}   s    zSettingInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r   propertyr!   r   unsetr   objectr&   r)   boolr-   r0   r2   __classcell__r   r   r   r   r      sB   








r   c                       s   e Zd Zed f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jejejfeee	f eee	f eee	f e
d	d
dZejejejfeee	f eee	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 )zk
        Initialize the SettingContext

        :param version: Version that contains the resource
        z/Voice/SettingsN)r   r   _urir   r   r   r   r   r      s    zSettingContext.__init__r"   c                 C   s.   t d|i}| jjd| j|d}t| j|S )r$   SubaccountSidGETmethoduriparams)r   ofr   r&   r>   r   r   r#   datar   r   r   r   r&      s     zSettingContext.fetchc                    s4   t d|i}| jjd| j|dI dH }t| j|S )r(   r@   rA   rB   N)r   rF   r   r)   r>   r   rG   r   r   r   r)      s       zSettingContext.fetch_asyncr*   c                 C   s>   t t|t||d}| jjd| j|d}t| j|S )r+   ZAdvancedFeaturesZ
VoiceTracer@   POSTrC   rD   rH   )r   rF   r   boolean_to_stringr   r-   r>   r   r   r   r   r#   rH   r   r   r   r   r-      s    zSettingContext.updatec                    sD   t t|t||d}| jjd| j|dI dH }t| j|S )r/   rI   rJ   rK   N)r   rF   r   rL   r   r0   r>   r   rM   r   r   r   r0      s    zSettingContext.update_asyncr   c                 C   s   dS )r1   z#<Twilio.Insights.V1.SettingContext>r   r    r   r   r   r2     s    zSettingContext.__repr__)r3   r4   r5   r   r   r   r9   r   r7   r:   r   r&   r)   r;   r-   r0   r2   r<   r   r   r   r   r      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 )SettingListr=   c                    s   t  | dS )zi
        Initialize the SettingList

        :param version: Version that contains the resource

        N)r   r   r?   r   r   r   r     s    zSettingList.__init__r   c                 C   s
   t | jS z.
        Constructs a SettingContext

        r   r   r    r   r   r   r     s    zSettingList.getc                 C   s
   t | jS rO   rP   r    r   r   r   __call__  s    zSettingList.__call__c                 C   s   dS )r1   z <Twilio.Insights.V1.SettingList>r   r    r   r   r   r2   &  s    zSettingList.__repr__)r3   r4   r5   r   r   r   r   rQ   r7   r2   r<   r   r   r   r   rN     s   	rN   N)r6   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   rN   r   r   r   r   <module>   s   p 