
    pi.                         d Z ddlmZ ddlmZmZmZmZmZmZm	Z	 ddl
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 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.
    )datetime)AnyDictListOptionalUnionIteratorAsyncIterator)deserializevalues)InstanceResource)ListResource)Version)Pagec                   F     e Zd ZdZdedeeef   def fdZdefdZ	 xZ
S )MessageInstancea  
    :ivar id: The message ID.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resource.
    :ivar assistant_id: The Assistant ID.
    :ivar session_id: The Session ID.
    :ivar identity: The identity of the user.
    :ivar role: The role of the user associated with the message.
    :ivar content: The content of the message.
    :ivar meta: The metadata of the message.
    :ivar date_created: The date and time in GMT when the Message was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar date_updated: The date and time in GMT when the Message was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    versionpayload
session_idc                 :   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        t        j                  |j                  d	            | _        t        j                  |j                  d
            | _        d|i| _        y )Nidaccount_sidassistant_idr   identityrolecontentmetadate_createddate_updated)super__init__getr   r   r   r   r   r   r   r   r   iso8601_datetimer   r   	_solution)selfr   r   r   	__class__s       k/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/assistants/v1/session/message.pyr!   zMessageInstance.__init__'   s    !!(T!2*1++m*D+2;;~+F)0\)B'.{{:'>#*;;v#6	4;KK	4J18V1D	0;0L0LKK'1
 1<0L0LKK'1

 *
    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>C   s     SDAq7>>!Q/Ss   !z)<Twilio.Assistants.V1.MessageInstance {}>)joinr$   itemsr.   )r%   contexts     r'   __repr__zMessageInstance.__repr__=   s6     ((SDNN<P<P<RSS:AA'JJr(   )__name__
__module____qualname____doc__r   r   strr   r!   r6   __classcell__r&   s   @r'   r   r      s8    
 
$sCx. 
c 
,K# Kr(   r   c                   2    e Zd Zdeeef   defdZdefdZy)MessagePager   r)   c                 L    t        | j                  || j                  d         S )zm
        Build an instance of MessageInstance

        :param payload: Payload response from the API
        r   )r   )r   _versionr$   )r%   r   s     r'   get_instancezMessagePage.get_instanceI   s%     MM7t~~l/K
 	
r(   c                      y)r+   z"<Twilio.Assistants.V1.MessagePage> r%   s    r'   r6   zMessagePage.__repr__S        4r(   N)	r7   r8   r9   r   r;   r   r   rB   r6   rD   r(   r'   r?   r?   G   s)    
DcN 
 
4# 4r(   r?   c            	           e Zd Zdedef fdZ	 	 ddee   dee   dee	   fdZ
	 	 ddee   dee   dee	   fdZ	 	 ddee   dee   dee	   fd	Z	 	 ddee   dee   dee	   fd
Zej"                  ej"                  ej"                  fdeeef   deeef   deeef   defdZej"                  ej"                  ej"                  fdeeef   deeef   deeef   de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 )MessageListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the MessageList

        :param version: Version that contains the resource
        :param session_id: Session id or name

        r   z/Sessions/{session_id}/MessagesNrD   )r    r!   r$   r.   _uri)r%   r   r   r&   s      r'   r!   zMessageList.__init__^   s@     	! *
 =5<<Nt~~N	r(   limit	page_sizer)   c                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )a]  
        Streams MessageInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        rL   rL   rK   )rA   read_limitspagestreamr%   rK   rL   limitsrP   s        r'   rQ   zMessageList.streamn   sJ    ( **5)<yy6+#6y7}}##D&/::r(   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)al  
        Asynchronously streams MessageInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        rL   rN   NrK   )rA   rO   
page_asyncstream_asyncrR   s        r'   rV   zMessageList.stream_async   sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists MessageInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        rK   rL   )listrQ   )r%   rK   rL   s      r'   rY   zMessageList.list   s(    & KK#  
 	
r(   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a	  
        Asynchronously lists MessageInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        rX   N)rV   )r%   rK   rL   records       r'   
list_asynczMessageList.list_async   sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                        S )as  
        Retrieve a single page of MessageInstance records from the API.
        Request is executed immediately

        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of MessageInstance
        	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r   ofrA   rP   rJ   r?   r$   r%   r]   r^   rL   datarl   responses          r'   rP   zMessageList.page   s      yy'#%
 ))^-PQR.==%%diig & 
 4==(DNNCCr(   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                        S 7 %w)	a  
        Asynchronously retrieve a single page of MessageInstance records from the API.
        Request is executed immediately

        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of MessageInstance
        r`   rc   rd   re   rf   rg   rh   N)r   rm   rA   rU   rJ   r?   r$   rn   s          r'   rU   zMessageList.page_async   s       yy'#%
 ))^-PQR.11diig 2 
 
 4==(DNNCC
s   A"B$B
%&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of MessageInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of MessageInstance
        rg   )rA   domaintwiliorequestr?   r$   r%   rr   rp   s      r'   get_pagezMessageList.get_page  s=     ==''..66ujI4==(DNNCCr(   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a  
        Asynchronously retrieve a specific page of MessageInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of MessageInstance
        rg   N)rA   rt   ru   request_asyncr?   r$   rw   s      r'   get_page_asynczMessageList.get_page_async#  sJ      --44BB5*UU4==(DNNCC Vs   4AA&Ac                      y)r+   z"<Twilio.Assistants.V1.MessageList>rD   rE   s    r'   r6   zMessageList.__repr__/  rF   r(   )NN)r7   r8   r9   r   r;   r!   r   intr	   r   rQ   r
   rV   r   rY   r\   r   unsetr   objectr?   rP   rU   rx   r{   r6   r<   r=   s   @r'   rH   rH   \   s   O OS O$  $#';}; C=; 
/	"	;6  $#'A}A C=A 
	'	A6  $#'
}
 C=
 
o		
8  $#'
}
 C=
 
o		
: *0*0,,(.	D#v+&D 3;'D f%	D
 
DF *0*0,,(.	D#v+&D 3;'D f%	D
 
DB
D3 
D; 
D
Ds 
D{ 
D4# 4r(   rH   N)r:   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r?   rH   rD   r(   r'   <module>r      sQ     L L L + : 2 ' !+K& +K\4$ 4*Y4, Y4r(   