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 - 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dedeeef f fddZe	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ejejejfdeeef deeef d
eeef dd fddZejejejfdeeef deeef d
eeef dd fddZdef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__ R/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/insights/v1/setting.pyr      s   
zSettingInstance.__init__returnSettingContextc                 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: SettingContext for this SettingInstance
        N)r   r   _versionr   r   r   r   _proxy)   s
   
zSettingInstance._proxysubaccount_sidc                 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_asyncr   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   r-   h   s   zSettingInstance.update_asyncc                 C      dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z$<Twilio.Insights.V1.SettingInstance>r   r   r   r   r   __repr__}      zSettingInstance.__repr__)r   r   )__name__
__module____qualname____doc__r   r   strr   r   propertyr    r   unsetr   objectr$   r'   boolr*   r-   r0   __classcell__r   r   r   r   r      sT    












r   c                	       s   e Zd Zdef 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ejejejfd
eee	f deee	f deee	f de
fddZejejejfd
eee	f deee	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 )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!   r   c                 C   sB   t d|i}t i }d|d< | jjd| j||d}t| j|S )r"   SubaccountSidapplication/jsonAcceptGETmethoduriparamsheaders)r   ofr   r$   r<   r   r   r!   datarF   r   r   r   r   r$      s   

zSettingContext.fetchc                    sJ   t d|i}t i }d|d< | jjd| j||dI dH }t| j|S )r&   r>   r?   r@   rA   rB   N)r   rG   r   r'   r<   r   rH   r   r   r   r'      s   

zSettingContext.fetch_asyncr   r   c                 C   sZ   t t|t||d}t i }d|d< d|d< | jjd| j||d}t| j|S )r(   AdvancedFeatures
VoiceTracer>   !application/x-www-form-urlencodedContent-Typer?   r@   POSTrC   rD   rI   rF   )r   rG   r   boolean_to_stringr   r*   r<   r   r   r   r   r!   rI   rF   r   r   r   r   r*      s   

zSettingContext.updatec                    sb   t t|t||d}t i }d|d< d|d< | jjd| j||dI dH }t| j|S )	r,   rJ   rM   rN   r?   r@   rO   rP   N)r   rG   r   rQ   r   r-   r<   r   rR   r   r   r   r-      s   

zSettingContext.update_asyncc                 C   r.   )r/   z#<Twilio.Insights.V1.SettingContext>r   r   r   r   r   r0     r1   zSettingContext.__repr__)r2   r3   r4   r   r   r   r8   r   r6   r9   r   r$   r'   r:   r*   r-   r0   r;   r   r   r   r   r      sN    



 



%



#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 )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   
   t | jS z.
        Constructs a SettingContext

        r   r   r   r   r   r   r   *     
zSettingList.getc                 C   rT   rU   rV   r   r   r   r   __call__1  rW   zSettingList.__call__c                 C   r.   )r/   z <Twilio.Insights.V1.SettingList>r   r   r   r   r   r0   8  s   zSettingList.__repr__)r2   r3   r4   r   r   r   r   rX   r6   r0   r;   r   r   r   r   rS     s
    	rS   N)r5   typingr   r   r   r   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r   rS   r   r   r   r   <module>   s    p 