o
    /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 - 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dedeeef def fddZe	dd	d
Z
dddZ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def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__ f/var/www/html/philips/venv/lib/python3.10/site-packages/twilio/rest/autopilot/v1/assistant/defaults.pyr   !   s   
zDefaultsInstance.__init__returnDefaultsContextc                 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defaultsc                 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   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 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      
zDefaultsInstance.__repr__)r   r   )r   r   )__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dedef fddZdefddZde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defddZ  ZS )r   r   r   c                    s.   t  | d|i| _djd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}/DefaultsNr   )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                    s0   | 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   rI   r    r*   rK   r   r   r   r'   r   r   r   r   r   r*      s   

zDefaultsContext.updatec                    sF   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   rI   r    r-   rK   r   r   rV   r   r   r   r-      s   

zDefaultsContext.update_asyncc                 C   r.   )r/   r0   c                 s   r1   r2   r3   r5   r   r   r   r9      r:   z+DefaultsContext.__repr__.<locals>.<genexpr>z(<Twilio.Autopilot.V1.DefaultsContext {}>r;   r>   r   r   r   r@      rA   zDefaultsContext.__repr__)rB   rC   rD   r   rF   r   r   r$   r&   r   rH   r   rI   r*   r-   r@   rJ   r   r   r   r   r   u   s"    



r   c                       sP   e Zd Zde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 )DefaultsListr   r   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      t | j| jd dS z/
        Constructs a DefaultsContext

        r   r   r   r    r   r!   r   r   r   r         zDefaultsList.getc                 C   rX   rY   rZ   r!   r   r   r   __call__  r[   zDefaultsList.__call__c                 C   s   dS )r/   z"<Twilio.Autopilot.V1.DefaultsList>r   r!   r   r   r   r@     s   zDefaultsList.__repr__)rB   rC   rD   r   rF   r   r   r   r\   r@   rJ   r   r   r   r   rW      s
    		rW   N)rE   typingr   r   r   r   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r   rW   r   r   r   r   <module>   s    ]t