o
    /iX                     @   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 - Preview
    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                
       sr   e Zd ZdZ	ddedeeef dedee f fddZ	e
dddZdddZdddZd	efddZ  ZS )DialogueInstancea  
    :ivar account_sid: The unique ID of the Account that created this Field.
    :ivar assistant_sid: The unique ID of the parent Assistant.
    :ivar sid: The unique ID of the Dialogue
    :ivar data: The dialogue memory object as json
    :ivar url:
    Nversionpayloadassistant_sidsidc                    sd   t  | |d| _|d| _|d| _|d| _|d| _||p)| 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/philips/venv/lib/python3.10/site-packages/twilio/rest/preview/understand/assistant/dialogue.pyr   !   s   
zDialogueInstance.__init__returnDialogueContextc                 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   $   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>^       z,DialogueInstance.__repr__.<locals>.<genexpr>z/<Twilio.Preview.Understand.DialogueInstance {}>joinr   itemsr+   r   contextr   r   r   __repr__X      
zDialogueInstance.__repr__)N)r   r   )r   r	   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr    r"   r$   r7   __classcell__r   r   r   r   r	      s"    


		r	   c                       sT   e Zd Zde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 )r   r
   r   r   c                    s0   t  | ||d| _djdi | j| _dS )z
        Initialize the DialogueContext

        :param version: Version that contains the resource
        :param assistant_sid:
        :param sid:
        r   z+/Assistants/{assistant_sid}/Dialogues/{sid}Nr   )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                    s8   | j jd| jdI dH }t| j || jd | jd dS )r#   rA   rB   Nr   r   r   )r   r$   r@   r	   r   rE   r   r   r   r$      s   zDialogueContext.fetch_asyncc                 C   r%   )r&   r'   c                 s   r(   r)   r*   r,   r   r   r   r0      r1   z+DialogueContext.__repr__.<locals>.<genexpr>z.<Twilio.Preview.Understand.DialogueContext {}>r2   r5   r   r   r   r7      r8   zDialogueContext.__repr__)r9   r:   r;   r   r=   r   r	   r"   r$   r7   r?   r   r   r   r   r   b   s
    r   c                       sX   e Zd Zdedef fddZdedefddZdedefd	d
ZdefddZ	  Z
S )DialogueListr
   r   c                    s   t  | d|i| _dS )z
        Initialize the DialogueList

        :param version: Version that contains the resource
        :param assistant_sid:

        r   N)r   r   r   )r   r
   r   r   r   r   r      s   
zDialogueList.__init__r   r   c                 C      t | j| jd |dS zC
        Constructs a DialogueContext

        :param sid:
        r   r   r   r   r   r   r   r   r   r   r         zDialogueList.getc                 C   rG   rH   rI   rJ   r   r   r   __call__   rK   zDialogueList.__call__c                 C   s   dS )r&   z(<Twilio.Preview.Understand.DialogueList>r   r   r   r   r   r7      s   zDialogueList.__repr__)r9   r:   r;   r   r=   r   r   r   rL   r7   r?   r   r   r   r   rF      s
    

rF   N)r<   typingr   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r	   r   rF   r   r   r   r   <module>   s    KF