
    pi_                     x    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e      Z G d	 d
e
      Zy)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                   Z     e Zd Z G d de      Z	 dedeeef   def fdZ	defdZ
 xZS )	MessageInstancec                   ,    e Zd ZdZdeeef   fdZd Zy)>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                     |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y Nidentity
session_idbodywebhookmodegetr   r   r   r   r   selfr   s     m/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/assistants/v1/assistant/message.py__init__zGMessageInstance.AssistantsV1ServiceAssistantSendMessageRequest.__init__"   R    +2;;z+BDM-4[[-FDO'.{{6':DI*1++i*@DL'.{{6':DI    c                 v    | j                   | j                  | j                  | j                  | j                  dS Nr   r   r   r   r   r!   r   s    r   to_dictzFMessageInstance.AssistantsV1ServiceAssistantSendMessageRequest.to_dict*   /     MM"oo		<<		 r   N	__name__
__module____qualname____doc__r   strr   r   r#    r   r   .AssistantsV1ServiceAssistantSendMessageRequestr           		;DcN 	;	r   r,   versionr   idc                 j   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        d|i| _
        y )	Nstatusflaggedabortedr   account_sidr   errorr/   )superr   r   r1   r2   r3   r   r4   r   r5   	_solution)r   r.   r   r/   	__class__s       r   r   zMessageInstance.__init__=   s    !%,[[%:'.{{9'='.{{9'=)0\)B*1++m*D#*;;v#6	$+KK$8
 "
r   returnc                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        yw)z{}={}N)format).0kvs      r   	<genexpr>z+MessageInstance.__repr__.<locals>.<genexpr>R   s     SDAq7>>!Q/Ss   !z)<Twilio.Assistants.V1.MessageInstance {}>)joinr7   itemsr>   )r   contexts     r   __repr__zMessageInstance.__repr__L   s6     ((SDNN<P<P<RSS:AA'JJr   )r&   r'   r(   objectr,   r	   r   r*   r   r   rF   __classcell__r8   s   @r   r   r      sD     4
 
$sCx. 
c 
K# Kr   r   c                   j     e Zd Z G d de      Zdedef fdZdedefdZ	dedefd	Z
defd
Z xZS )MessageListc                   ,    e Zd ZdZdeeef   fdZd Zy):MessageList.AssistantsV1ServiceAssistantSendMessageRequestr   r   c                     |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y r   r   r   s     r   r   zCMessageList.AssistantsV1ServiceAssistantSendMessageRequest.__init__a   r   r   c                 v    | j                   | j                  | j                  | j                  | j                  dS r    r!   r"   s    r   r#   zBMessageList.AssistantsV1ServiceAssistantSendMessageRequest.to_dicti   r$   r   Nr%   r+   r   r   r,   rM   X   r-   r   r,   r.   r/   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the MessageList

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

        r/   z/Assistants/{id}/MessagesNr+   )r6   r   r7   r>   _uri)r   r.   r/   r8   s      r   r   zMessageList.__init__r   s@     	! "
 7/66HH	r   4assistants_v1_service_assistant_send_message_requestr9   c                     |j                         }t        j                  ddi      }d|d<   d|d<   | j                  j	                  d| j
                  ||      }t        | j                  || j                  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createrQ   r   r7   r   rR   r\   r]   r   s        r   ra   zMessageList.create   s     DKKM))^-PQR"4.--&&tyytW ' 
 t}}g$..:NOOr   c                   K   |j                         }t        j                  ddi      }d|d<   d|d<   | j                  j	                  d| j
                  ||       d{   }t        | j                  || j                  d   	      S 7 )w)
z
        Asynchronously create the MessageInstance

        :param assistants_v1_service_assistant_send_message_request:

        :returns: The created MessageInstance
        rT   rU   rV   rW   rX   rY   Nr/   r^   )r#   r   r_   r`   create_asyncrQ   r   r7   rb   s        r   rd   zMessageList.create_async   s      DKKM))^-PQR"4.22tyytW 3 
 
 t}}g$..:NOO	
s   AB B
!*Bc                      y)r;   z"<Twilio.Assistants.V1.MessageList>r+   r"   s    r   rF   zMessageList.__repr__   s     4r   )r&   r'   r(   rG   r,   r	   r*   r   r   ra   rd   rF   rH   rI   s   @r   rK   rK   V   se     4I IS I P>lP 
P2P>lP 
P24# 4r   rK   N)r)   typingr   r   r   twilio.baser   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr	   r   rK   r+   r   r   <module>rk      s<    ' &  : 2 '<K& <K~d4, d4r   