a
    !f*                     @   s|   d Z ddlmZ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)InstanceContext)InstanceResource)ListResource)Versionc                       sv   e Zd ZdZdeeeef eee d fddZ	e
dddd	Zd dd
dZd dddZedddZ  ZS )DialogueInstancea  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Dialogue 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 sid: The unique string that we created to identify the Dialogue resource.
    :ivar data: The JSON string that describes the dialogue session object.
    :ivar url: The absolute URL of the Dialogue resource.
    N)versionpayloadassistant_sidsidc                    sd   t  | |d| _|d| _|d| _|d| _|d| _||pR| jd| _d | _	d S )Naccount_sidr   r   dataurlr   r   )
super__init__getr   r   r   r   r   	_solution_context)selfr
   r   r   r   	__class__ l/var/www/html/python-backend/venv/lib/python3.9/site-packages/twilio/rest/autopilot/v1/assistant/dialogue.pyr   !   s    zDialogueInstance.__init__DialogueContextreturnc                 C   s.   | j du r(t| j| jd | 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: DialogueContext for this DialogueInstance
        Nr   r   r   )r   r   _versionr   r   r   r   r   _proxy6   s    
zDialogueInstance._proxyc                 C   s
   | j  S )]
        Fetch the DialogueInstance


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


        :returns: The fetched DialogueInstance
        N)r!   fetch_asyncr    r   r   r   r%   O   s    zDialogueInstance.fetch_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>^       z,DialogueInstance.__repr__.<locals>.<genexpr>z)<Twilio.Autopilot.V1.DialogueInstance {}>joinr   itemsr*   r   contextr   r   r   __repr__X   s    zDialogueInstance.__repr__)N)__name__
__module____qualname____doc__r   r   strr   r   r   propertyr!   r#   r%   r6   __classcell__r   r   r   r   r	      s    
		r	   c                       sP   e Zd Zeeed fddZedddZedddZedd	d
Z	  Z
S )r   )r
   r   r   c                    s0   t  | ||d| _djf i | j| _dS )ao  
        Initialize the DialogueContext

        :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.
        :param sid: The Twilio-provided string that uniquely identifies the Dialogue resource to fetch.
        r   z+/Assistants/{assistant_sid}/Dialogues/{sid}N)r   r   r   r*   _uri)r   r
   r   r   r   r   r   r   c   s    zDialogueContext.__init__r   c                 C   s0   | j jd| jd}t| j || jd | jd dS )r"   GETmethodurir   r   r   )r   r#   r>   r	   r   r   r   r   r   r   r#   v   s    zDialogueContext.fetchc                    s6   | j jd| jdI dH }t| j || jd | jd dS )r$   r?   r@   Nr   r   r   )r   r%   r>   r	   r   rC   r   r   r   r%      s    zDialogueContext.fetch_asyncc                 C   s$   d dd | j D }d|S )r&   r'   c                 s   s   | ]\}}d  ||V  qdS r(   r)   r+   r   r   r   r/      r0   z+DialogueContext.__repr__.<locals>.<genexpr>z(<Twilio.Autopilot.V1.DialogueContext {}>r1   r4   r   r   r   r6      s    zDialogueContext.__repr__)r7   r8   r9   r   r;   r   r	   r#   r%   r6   r=   r   r   r   r   r   b   s   r   c                       sR   e Zd Zeed fddZeedddZeedddZed	d
dZ	  Z
S )DialogueList)r
   r   c                    s   t  | d|i| _dS )a  
        Initialize the DialogueList

        :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   )r   r
   r   r   r   r   r      s    zDialogueList.__init__)r   r   c                 C   s   t | j| jd |dS z
        Constructs a DialogueContext

        :param sid: The Twilio-provided string that uniquely identifies the Dialogue resource to fetch.
        r   r   r   r   r   r   r   r   r   r   r      s    zDialogueList.getc                 C   s   t | j| jd |dS rE   rF   rG   r   r   r   __call__   s    zDialogueList.__call__r   c                 C   s   dS )r&   z"<Twilio.Autopilot.V1.DialogueList>r   r    r   r   r   r6      s    zDialogueList.__repr__)r7   r8   r9   r   r;   r   r   r   rH   r6   r=   r   r   r   r   rD      s   

rD   N)r:   typingr   r   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r	   r   rD   r   r   r   r   <module>   s   KF