a
    !f!                     @   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 - Autopilot
    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 e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 )DefaultsInstancea  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Defaults resource.
    :ivar assistant_sid: The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
    :ivar url: The absolute URL of the Defaults resource.
    :ivar data: The JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
    )versionpayloadassistant_sidc                    sP   t  | |d| _|d| _|d| _|d| _d|i| _d | _d S )Naccount_sidr   urldata)	super__init__getr   r   r   r   	_solution_context)selfr   r   r   	__class__ l/var/www/html/python-backend/venv/lib/python3.9/site-packages/twilio/rest/autopilot/v1/assistant/defaults.pyr   !   s    zDefaultsInstance.__init__DefaultsContextreturnc                 C   s&   | j du r t| j| jd d| _ | 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: DefaultsContext for this DefaultsInstance
        Nr   r   )r   r   _versionr   r   r   r   r   _proxy.   s    
zDefaultsInstance._proxyc                 C   s
   | j  S )]
        Fetch the DefaultsInstance


        :returns: The fetched DefaultsInstance
        )r#   fetchr"   r   r   r   r%   =   s    zDefaultsInstance.fetchc                    s   | j  I dH S )w
        Asynchronous coroutine to fetch the DefaultsInstance


        :returns: The fetched DefaultsInstance
        N)r#   fetch_asyncr"   r   r   r   r'   F   s    zDefaultsInstance.fetch_asyncdefaultsr   c                 C   s   | j j|dS )
        Update the DefaultsInstance

        :param defaults: A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.

        :returns: The updated DefaultsInstance
        r)   )r#   updater   r)   r   r   r   r,   O   s    
zDefaultsInstance.updatec                    s   | j j|dI dH S )  
        Asynchronous coroutine to update the DefaultsInstance

        :param defaults: A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.

        :returns: The updated DefaultsInstance
        r+   N)r#   update_asyncr-   r   r   r   r/   ]   s    
zDefaultsInstance.update_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nformat.0kvr   r   r   	<genexpr>q       z,DefaultsInstance.__repr__.<locals>.<genexpr>z)<Twilio.Autopilot.V1.DefaultsInstance {}>joinr   itemsr4   r   contextr   r   r   __repr__k   s    zDefaultsInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r   propertyr#   r%   r'   r   unsetr   objectr,   r/   r@   __classcell__r   r   r   r   r      s"   	


r   c                       s   e Zd Ze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   r   c                    s.   t  | d|i| _djf i | j| _dS )a  
        Initialize the DefaultsContext

        :param version: Version that contains the resource
        :param assistant_sid: The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
        r   z$/Assistants/{assistant_sid}/DefaultsN)r   r   r   r4   _urir   r   r   r   r   r   r   v   s    zDefaultsContext.__init__r   c                 C   s(   | j jd| jd}t| j || jd dS )r$   GETmethodurir   r    )r!   r%   rK   r   r   r   r   r   r   r   r%      s    zDefaultsContext.fetchc                    s.   | j jd| jdI dH }t| j || jd dS )r&   rM   rN   Nr   r    )r!   r'   rK   r   r   rQ   r   r   r   r'      s    zDefaultsContext.fetch_asyncr(   c                 C   s>   t dt|i}| jjd| j|d}t| j|| jd dS )r*   DefaultsPOSTrO   rP   r   r   r    )	r   ofr   rH   r!   r,   rK   r   r   r   r)   r   r   r   r   r   r,      s    

zDefaultsContext.updatec                    sD   t dt|i}| jjd| j|dI dH }t| j|| jd dS )r.   rR   rS   rT   Nr   r    )	r   rU   r   rH   r!   r/   rK   r   r   rV   r   r   r   r/      s    

zDefaultsContext.update_asyncc                 C   s$   d dd | j D }d|S )r0   r1   c                 s   s   | ]\}}d  ||V  qdS r2   r3   r5   r   r   r   r9      r:   z+DefaultsContext.__repr__.<locals>.<genexpr>z(<Twilio.Autopilot.V1.DefaultsContext {}>r;   r>   r   r   r   r@      s    zDefaultsContext.__repr__)rA   rB   rC   r   rE   r   r   r%   r'   r   rG   r   rH   r,   r/   r@   rI   r   r   r   r   r   u   s   

r   c                       sN   e Zd Zeed fddZedddZedddZedd	d
Z	  Z
S )DefaultsListrJ   c                    s   t  | d|i| _dS )a  
        Initialize the DefaultsList

        :param version: Version that contains the resource
        :param assistant_sid: The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.

        r   N)r   r   r   rL   r   r   r   r      s    zDefaultsList.__init__r   c                 C   s   t | j| jd dS z/
        Constructs a DefaultsContext

        r   r    r   r!   r   r"   r   r   r   r      s    zDefaultsList.getc                 C   s   t | j| jd dS rX   rY   r"   r   r   r   __call__  s    zDefaultsList.__call__c                 C   s   dS )r0   z"<Twilio.Autopilot.V1.DefaultsList>r   r"   r   r   r   r@     s    zDefaultsList.__repr__)rA   rB   rC   r   rE   r   r   r   rZ   r@   rI   r   r   r   r   rW      s   		rW   N)rD   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   rW   r   r   r   r   <module>   s   ]t