o
    �¨Êhù   ã                   @   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 )aK  
        Initialize the DialogueList

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

        :returns: twilio.rest.autopilot.v1.assistant.dialogue.DialogueList
        :rtype: twilio.rest.autopilot.v1.assistant.dialogue.DialogueList
        Úassistant_sidN)Úsuperr   Ú__init__Ú	_solution)ÚselfÚversionr	   ©Ú	__class__© ú]/var/www/html/env/lib/python3.10/site-packages/twilio/rest/autopilot/v1/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.autopilot.v1.assistant.dialogue.DialogueContext
        :rtype: twilio.rest.autopilot.v1.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.Autopilot.V1.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.autopilot.v1.assistant.dialogue.DialoguePage
        :rtype: twilio.rest.autopilot.v1.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.autopilot.v1.assistant.dialogue.DialogueInstance
        :rtype: twilio.rest.autopilot.v1.assistant.dialogue.DialogueInstance
        r	   )r	   )ÚDialogueInstancer   r   )r   Úpayloadr   r   r   Úget_instanceY   r   zDialoguePage.get_instancec                 C   r   )r   z"<Twilio.Autopilot.V1.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 )a[  
        Initialize the DialogueContext

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

        :returns: twilio.rest.autopilot.v1.assistant.dialogue.DialogueContext
        :rtype: twilio.rest.autopilot.v1.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   s<   t  i ¡}| jjd| j|d�}t| j|| jd | jd d�S )ú£
        Fetch a DialogueInstance

        :returns: Fetched DialogueInstance
        :rtype: twilio.rest.autopilot.v1.assistant.dialogue.DialogueInstance
        ÚGET)Úparamsr	   r   r   )r   Úofr   Úfetchr0   r,   r   )r   r3   r-   r   r   r   r5   „   s   
ýüzDialogueContext.fetchc                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )r   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r/   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>¡   ó   € z+DialogueContext.__repr__.<locals>.<genexpr>z(<Twilio.Autopilot.V1.DialogueContext {}>©Újoinr   Úitemsr/   ©r   Úcontextr   r   r   r!   š   ó   
zDialogueContext.__repr__)r#   r$   r%   r&   r   r5   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                    sV   t t| ƒ |¡ |d |d |d |d |d dœ| _d| _||p%| jd dœ| _dS )	zÎ
        Initialize the DialogueInstance

        :returns: twilio.rest.autopilot.v1.assistant.dialogue.DialogueInstance
        :rtype: twilio.rest.autopilot.v1.assistant.dialogue.DialogueInstance
        Úaccount_sidr	   r   ÚdataÚurl)rG   r	   r   rH   rI   Nr   )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 )a8  
        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.autopilot.v1.assistant.dialogue.DialogueContext
        Nr	   r   r   )rK   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
        rG   ©rJ   r    r   r   r   rG   Ñ   ó   
zDialogueInstance.account_sidc                 C   rM   )zZ
        :returns: The unique ID of the parent Assistant.
        :rtype: unicode
        r	   rN   r    r   r   r   r	   Ù   rO   zDialogueInstance.assistant_sidc                 C   rM   )zQ
        :returns: The unique ID of the Dialogue
        :rtype: unicode
        r   rN   r    r   r   r   r   á   rO   zDialogueInstance.sidc                 C   rM   )zT
        :returns: The dialogue session object as json
        :rtype: dict
        rH   rN   r    r   r   r   rH   é   rO   zDialogueInstance.datac                 C   rM   )z;
        :returns: The url
        :rtype: unicode
        rI   rN   r    r   r   r   rI   ñ   rO   zDialogueInstance.urlc                 C   s
   | j  ¡ S )r1   )rL   r5   r    r   r   r   r5   ù   s   
zDialogueInstance.fetchc                 C   r6   )r   r7   c                 s   r8   r9   r:   r;   r   r   r   r?   	  r@   z,DialogueInstance.__repr__.<locals>.<genexpr>z)<Twilio.Autopilot.V1.DialogueInstance {}>rA   rD   r   r   r   r!     rF   zDialogueInstance.__repr__)N)r#   r$   r%   r&   r   ÚpropertyrL   rG   r	   r   rH   rI   r5   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*7