U
    ^g%i_                     @   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                       sL   e Zd ZG dd deZeeeef ed fddZ	edddZ
  ZS )	MessageInstancec                   @   s.   e Zd ZdZeeef d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   s@   | d| _| d| _| d| _| d| _| d| _d S Nidentity
session_idbodywebhookmodegetr   r   r   r   r   selfr    r   j/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/assistants/v1/assistant/message.py__init__"   s
    zGMessageInstance.AssistantsV1ServiceAssistantSendMessageRequest.__init__c                 C   s   | j | j| j| j| jdS Nr   r   r   r   r   r   r   r   r   r   to_dict*   s    zFMessageInstance.AssistantsV1ServiceAssistantSendMessageRequest.to_dictN	__name__
__module____qualname____doc__r   strr   r   r   r   r   r   r   .AssistantsV1ServiceAssistantSendMessageRequest   s   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   r+   	_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 {}>)joinr-   itemsr4   )r   contextr   r   r   __repr__L   s    zMessageInstance.__repr__)r   r    r!   objectr$   r   r   r#   r   r   r<   __classcell__r   r   r.   r   r	      s   $r	   c                       sb   e Zd ZG dd de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 )MessageListc                   @   s.   e Zd ZdZeeef dddZdd ZdS )z:MessageList.AssistantsV1ServiceAssistantSendMessageRequestr
   r   c                 C   s@   | d| _| d| _| d| _| d| _| d| _d S r   r   r   r   r   r   r   a   s
    zCMessageList.AssistantsV1ServiceAssistantSendMessageRequest.__init__c                 C   s   | j | j| j| j| jdS r   r   r   r   r   r   r   i   s    zBMessageList.AssistantsV1ServiceAssistantSendMessageRequest.to_dictNr   r   r   r   r   r$   X   s   r$   )r%   r&   c                    s*   t  | d|i| _djf | j| _dS )z
        Initialize the MessageList

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

        r&   z/Assistants/{id}/MessagesN)r,   r   r-   r4   _uri)r   r%   r&   r.   r   r   r   r   s
     zMessageList.__init__)4assistants_v1_service_assistant_send_message_requestr1   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creater@   r	   r-   r   rA   rJ   rK   r   r   r   r   rO      s       zMessageList.createc                    sX   |  }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
        rB   rC   rD   rE   rF   rG   Nr&   rL   )r   r   rM   rN   create_asyncr@   r	   r-   rP   r   r   r   rQ      s       zMessageList.create_asyncr0   c                 C   s   dS )r2   z"<Twilio.Assistants.V1.MessageList>r   r   r   r   r   r<      s    zMessageList.__repr__)r   r    r!   r=   r$   r   r#   r   r	   rO   rQ   r<   r>   r   r   r.   r   r?   V   s   r?   N)r"   typingr   r   r   Ztwilio.baser   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r	   r?   r   r   r   r   <module>   s   ?