o
    eF!                     @   s   d Z ddl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G dd deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )values)InstanceContext)InstanceResource)ListResource)Pagec                       s8   e Zd ZdZ fddZdd Zdd Zdd	 Z  ZS )
DialogueList PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. c                    s   t t| | d|i| _dS )aW  
        Initialize the DialogueList

        :param Version version: Version that contains the resource
        :param assistant_sid: The unique ID of the parent Assistant.

        :returns: twilio.rest.preview.understand.assistant.dialogue.DialogueList
        :rtype: twilio.rest.preview.understand.assistant.dialogue.DialogueList
        assistant_sidN)superr   __init__	_solution)selfversionr	   	__class__ d/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/preview/understand/assistant/dialogue.pyr      s   
zDialogueList.__init__c                 C      t | j| jd |dS z
        Constructs a DialogueContext

        :param sid: The sid

        :returns: twilio.rest.preview.understand.assistant.dialogue.DialogueContext
        :rtype: twilio.rest.preview.understand.assistant.dialogue.DialogueContext
        r	   r	   sidDialogueContext_versionr   r   r   r   r   r   get$      	zDialogueList.getc                 C   r   r   r   r   r   r   r   __call__/   r   zDialogueList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z(<Twilio.Preview.Understand.DialogueList>r   r   r   r   r   __repr__:      zDialogueList.__repr__)	__name__
__module____qualname____doc__r   r   r   r!   __classcell__r   r   r   r   r      s    r   c                       0   e Zd ZdZ fddZdd Zdd Z  ZS )DialoguePager   c                    s   t t| || || _dS )a  
        Initialize the DialoguePage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param assistant_sid: The unique ID of the parent Assistant.

        :returns: twilio.rest.preview.understand.assistant.dialogue.DialoguePage
        :rtype: twilio.rest.preview.understand.assistant.dialogue.DialoguePage
        N)r
   r)   r   r   )r   r   responsesolutionr   r   r   r   I   s   
zDialoguePage.__init__c                 C   s   t | j|| jd dS )a  
        Build an instance of DialogueInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.preview.understand.assistant.dialogue.DialogueInstance
        :rtype: twilio.rest.preview.understand.assistant.dialogue.DialogueInstance
        r	   )r	   )DialogueInstancer   r   r   payloadr   r   r   get_instanceY   r   zDialoguePage.get_instancec                 C   r   )r   z(<Twilio.Preview.Understand.DialoguePage>r   r    r   r   r   r!   d   r"   zDialoguePage.__repr__)r#   r$   r%   r&   r   r/   r!   r'   r   r   r   r   r)   D   s
    r)   c                       r(   )r   r   c                    s4   t t| | ||d| _djdi | j| _dS )ag  
        Initialize the DialogueContext

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

        :returns: twilio.rest.preview.understand.assistant.dialogue.DialogueContext
        :rtype: twilio.rest.preview.understand.assistant.dialogue.DialogueContext
        r   z+/Assistants/{assistant_sid}/Dialogues/{sid}Nr   )r
   r   r   r   format_uri)r   r   r	   r   r   r   r   r   s   s   zDialogueContext.__init__c                 C   s0   | j jd| jd}t| j || jd | jd dS )
        Fetch the DialogueInstance

        :returns: The fetched DialogueInstance
        :rtype: twilio.rest.preview.understand.assistant.dialogue.DialogueInstance
        GET)methodurir	   r   r   )r   fetchr1   r,   r   r-   r   r   r   r6      s   zDialogueContext.fetchc                 C   $   d dd | j D }d|S )r    c                 s        | ]\}}d  ||V  qdS z{}={}Nr0   .0kvr   r   r   	<genexpr>       z+DialogueContext.__repr__.<locals>.<genexpr>z.<Twilio.Preview.Understand.DialogueContext {}>joinr   itemsr0   r   contextr   r   r   r!         
zDialogueContext.__repr__)r#   r$   r%   r&   r   r6   r!   r'   r   r   r   r   r   n   s
    r   c                       sz   e Zd ZdZd fdd	Zedd Zedd Zed	d
 Zedd Z	edd Z
edd Zdd Zdd Z  ZS )r,   r   Nc                    s`   t t| | |d|d|d|d|dd| _d| _||p*| jd d| _dS )	z
        Initialize the DialogueInstance

        :returns: twilio.rest.preview.understand.assistant.dialogue.DialogueInstance
        :rtype: twilio.rest.preview.understand.assistant.dialogue.DialogueInstance
        account_sidr	   r   dataurl)rH   r	   r   rI   rJ   Nr   )r
   r,   r   r   _properties_contextr   )r   r   r.   r	   r   r   r   r   r      s   	zDialogueInstance.__init__c                 C   s.   | j du rt| j| jd | jd d| _ | j S )a>  
        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
        :rtype: twilio.rest.preview.understand.assistant.dialogue.DialogueContext
        Nr	   r   r   )rL   r   r   r   r    r   r   r   _proxy   s   
	zDialogueInstance._proxyc                 C   
   | j d S )zi
        :returns: The unique ID of the Account that created this Field.
        :rtype: unicode
        rH   rK   r    r   r   r   rH         
zDialogueInstance.account_sidc                 C   rN   )zZ
        :returns: The unique ID of the parent Assistant.
        :rtype: unicode
        r	   rO   r    r   r   r   r	      rP   zDialogueInstance.assistant_sidc                 C   rN   )zQ
        :returns: The unique ID of the Dialogue
        :rtype: unicode
        r   rO   r    r   r   r   r      rP   zDialogueInstance.sidc                 C   rN   )zS
        :returns: The dialogue memory object as json
        :rtype: dict
        rI   rO   r    r   r   r   rI      rP   zDialogueInstance.datac                 C   rN   )z;
        :returns: The url
        :rtype: unicode
        rJ   rO   r    r   r   r   rJ      rP   zDialogueInstance.urlc                 C   s
   | j  S )r2   )rM   r6   r    r   r   r   r6      s   
zDialogueInstance.fetchc                 C   r7   )r   r8   c                 s   r9   r:   r;   r<   r   r   r   r@     rA   z,DialogueInstance.__repr__.<locals>.<genexpr>z/<Twilio.Preview.Understand.DialogueInstance {}>rB   rE   r   r   r   r!      rG   zDialogueInstance.__repr__)N)r#   r$   r%   r&   r   propertyrM   rH   r	   r   rI   rJ   r6   r!   r'   r   r   r   r   r,      s"    





	r,   N)r&   twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r)   r   r,   r   r   r   r   <module>   s   4*1