o
    f>h_                     @   sl   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dS )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Assistants
    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)values)InstanceResource)ListResource)Versionc                       sR   e Zd ZG dd deZ	 dedeeef def fddZ	defd	d
Z
  ZS )MessageInstancec                   @   .   e Zd ZdZdeeef fddZdd ZdS )z>MessageInstance.AssistantsV1ServiceAssistantSendMessageRequestm  
        :ivar identity: The unique identity of user for the session.
        :ivar session_id: The unique name for the session.
        :ivar body: The query to ask the assistant.
        :ivar webhook: The webhook url to call after the assistant has generated a response or report an error.
        :ivar mode: one of the modes 'chat', 'email' or 'voice'
        payloadc                 C   @   | d| _| d| _| d| _| d| _| d| _d S Nidentity
session_idbodywebhookmodegetr   r   r   r   r   selfr    r   ^/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/assistants/v1/assistant/message.py__init__"   
   zGMessageInstance.AssistantsV1ServiceAssistantSendMessageRequest.__init__c                 C      | j | j| j| j| jdS Nr   r   r   r   r   r   r   r   r   r   to_dict*      zFMessageInstance.AssistantsV1ServiceAssistantSendMessageRequest.to_dictN	__name__
__module____qualname____doc__r   strr   r   r    r   r   r   r   .AssistantsV1ServiceAssistantSendMessageRequest       r(   versionr   idc                    sn   t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	d|i| _
d S )	Nstatusflaggedabortedr   account_sidr   errorr+   )superr   r   r,   r-   r.   r   r/   r   r0   	_solution)r   r*   r   r+   	__class__r   r   r   =   s   
zMessageInstance.__init__returnc                 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>R   s    z+MessageInstance.__repr__.<locals>.<genexpr>z)<Twilio.Assistants.V1.MessageInstance {}>)joinr2   itemsr8   )r   contextr   r   r   __repr__L   s   
zMessageInstance.__repr__)r#   r$   r%   objectr(   r   r   r'   r   r   r@   __classcell__r   r   r3   r   r	      s
    "
r	   c                       sh   e Zd ZG dd de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 )MessageListc                   @   r
   )z:MessageList.AssistantsV1ServiceAssistantSendMessageRequestr   r   c                 C   r   r   r   r   r   r   r   r   a   r   zCMessageList.AssistantsV1ServiceAssistantSendMessageRequest.__init__c                 C   r   r   r   r   r   r   r   r    i   r!   zBMessageList.AssistantsV1ServiceAssistantSendMessageRequest.to_dictNr"   r   r   r   r   r(   X   r)   r(   r*   r+   c                    s.   t  | d|i| _djdi | j| _dS )z
        Initialize the MessageList

        :param version: Version that contains the resource
        :param id: the Assistant ID.

        r+   z/Assistants/{id}/MessagesNr   )r1   r   r2   r8   _uri)r   r*   r+   r3   r   r   r   r   s   zMessageList.__init__4assistants_v1_service_assistant_send_message_requestr5   c                 C   sR   |  }tddi}d|d< d|d< | jjd| j||d}t| j|| jd dS )	z
        Create the MessageInstance

        :param assistants_v1_service_assistant_send_message_request:

        :returns: The created MessageInstance
        Content-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheadersr+   r+   )r    r   of_versioncreaterD   r	   r2   r   rE   rN   rO   r   r   r   r   rS      s   
zMessageList.createc                    sZ   |  }tddi}d|d< d|d< | jjd| j||dI dH }t| j|| jd d	S )
z
        Asynchronously create the MessageInstance

        :param assistants_v1_service_assistant_send_message_request:

        :returns: The created MessageInstance
        rF   rG   rH   rI   rJ   rK   Nr+   rP   )r    r   rQ   rR   create_asyncrD   r	   r2   rT   r   r   r   rU      s   
zMessageList.create_asyncc                 C   s   dS )r6   z"<Twilio.Assistants.V1.MessageList>r   r   r   r   r   r@      s   zMessageList.__repr__)r#   r$   r%   rA   r(   r   r'   r   r	   rS   rU   r@   rB   r   r   r3   r   rC   V   s    

rC   N)r&   typingr   r   r   twilio.baser   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r	   rC   r   r   r   r   <module>   s    ?