
    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m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e      Z G d de      Z G d de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Chat
    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	serializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                       e Zd Z G d de      Z G d de      Z	 	 ddedeee	f   deded	e
e   f
 fd
Zedd       Zej                  fdedef   defdZej                  fdedef   defdZddZddZej                  ej                  ej                  ej                  ej                  ej                  ej                  fdedef   deeef   deeef   deeef   deeef   deeef   deeef   dd fdZej                  ej                  ej                  ej                  ej                  ej                  ej                  fdedef   deeef   deeef   deeef   deeef   deeef   deeef   dd fdZdefdZ xZS )MessageInstancec                       e Zd ZdZdZy)MessageInstance.OrderTypeascdescN)__name__
__module____qualname__ASCDESC     m/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/chat/v2/service/channel/message.py	OrderTyper      s    r   r!   c                       e Zd ZdZdZy)"MessageInstance.WebhookEnabledTypetruefalseN)r   r   r   TRUEFALSEr   r   r    WebhookEnabledTyper#      s    r   r(   versionpayloadservice_sidchannel_sidsidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d	      | _        |j                  d
      | _        |j                  d      | _        |j                  d      | _        t        j"                  |j                  d            | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |||xs | j                  d| _        d | _        y )Nr-   account_sid
attributesr+   tor,   date_createddate_updatedlast_updated_by
was_editedfrombodyindextypemediaurlr+   r,   r-   )super__init__getr-   r/   r0   r+   r1   r,   r   iso8601_datetimer2   r3   r4   r5   _fromr7   integerr8   r9   r:   r;   	_solution_context)selfr)   r*   r+   r,   r-   	__class__s         r    r>   zMessageInstance.__init__6   si    	!")++e"4*1++m*D)0\)B*1++m*D!(T!2*1++m*D0;0L0LKK'1
 1<0L0LKK'1
 /6kk:K.L*1++l*C$+KK$7
#*;;v#6	$/$7$7G8L$M
#*;;v#6	29++g2F
")++e"4 '&?$((

 37r   returnc                     | j                   Et        | j                  | j                  d   | j                  d   | j                  d         | _         | j                   S )z
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: MessageContext for this MessageInstance
        r+   r,   r-   r<   )rD   MessageContext_versionrC   rE   s    r    _proxyzMessageInstance._proxy\   sQ     == * NN=9 NN=9NN5)	DM }}r   x_twilio_webhook_enabledr#   c                 :    | j                   j                  |      S )
        Deletes the MessageInstance

        :param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header

        :returns: True if delete succeeds, False otherwise
        rM   )rL   deleterE   rM   s     r    rQ   zMessageInstance.deletem   s#     {{!!%= " 
 	
r   c                 V   K   | j                   j                  |       d{   S 7 w)
        Asynchronous coroutine that deletes the MessageInstance

        :param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header

        :returns: True if delete succeeds, False otherwise
        rP   N)rL   delete_asyncrR   s     r    rU   zMessageInstance.delete_async~   s1      [[--%= . 
 
 	
 
s    )')c                 6    | j                   j                         S )[
        Fetch the MessageInstance


        :returns: The fetched MessageInstance
        )rL   fetchrK   s    r    rX   zMessageInstance.fetch   s     {{  ""r   c                 R   K   | j                   j                          d{   S 7 w)u
        Asynchronous coroutine to fetch the MessageInstance


        :returns: The fetched MessageInstance
        N)rL   fetch_asyncrK   s    r    r[   zMessageInstance.fetch_async   s!      [[,,....s   '%'r7   r0   r2   r3   r4   from_c           	      F    | j                   j                  |||||||      S )  
        Update the MessageInstance

        :param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
        :param body: The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
        :param attributes: A valid JSON string that contains application-specific data.
        :param date_created: The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source.
        :param date_updated: The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
        :param last_updated_by: The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.
        :param from_: The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author.

        :returns: The updated MessageInstance
        rM   r7   r0   r2   r3   r4   r\   )rL   updaterE   rM   r7   r0   r2   r3   r4   r\   s           r    r`   zMessageInstance.update   s5    2 {{!!%=!%%+ " 
 	
r   c           	      b   K   | j                   j                  |||||||       d{   S 7 w)  
        Asynchronous coroutine to update the MessageInstance

        :param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
        :param body: The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
        :param attributes: A valid JSON string that contains application-specific data.
        :param date_created: The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source.
        :param date_updated: The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
        :param last_updated_by: The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.
        :param from_: The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author.

        :returns: The updated MessageInstance
        r_   N)rL   update_asyncra   s           r    rd   zMessageInstance.update_async   sC     2 [[--%=!%%+ . 
 
 	
 
s   &/-/c                     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>        SDAq7>>!Q/S   !z#<Twilio.Chat.V2.MessageInstance {}>joinrC   itemsrk   rE   contexts     r    __repr__zMessageInstance.__repr__   s6     ((SDNN<P<P<RSS4;;GDDr   )N)rG   rI   )rG   r   )r   r   r   objectr!   r(   r   r   strr   r   r>   propertyrL   r   unsetr   boolrQ   rU   rX   r[   r   r`   rd   rx   __classcell__rF   s   @r    r   r      s   F V 2 "$7$7 c3h$7 	$7
 $7 c]$7L  ( LL	
"'0&8#


 

* LL	
"'0&8#


 

"#/ LL#)<<)/0606.4ll$*LL!
"'0&8#
!

 CK !
 #v+&!
 Hf,-!
 Hf,-!
 sF{+!
 S&[!!
 
!
N LL#)<<)/0606.4ll$*LL!
"'0&8#
!

 CK !
 #v+&!
 Hf,-!
 Hf,-!
 sF{+!
 S&[!!
 
!
FE# Er   r   c                       e Zd Zdedededef fdZej                  fdede	f   de
fd	Zej                  fdede	f   de
fd
ZdefdZdefdZej                  ej                  ej                  ej                  ej                  ej                  ej                  fdede	f   deee	f   deee	f   deee	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                  ej                  ej                  ej                  ej                  fdede	f   deee	f   deee	f   deee	f   deee	f   deee	f   deee	f   defdZdefdZ xZS )rI   r)   r+   r,   r-   c                 |    t         |   |       |||d| _         dj                  di | j                  | _        y)a  
        Initialize the MessageContext

        :param version: Version that contains the resource
        :param service_sid: The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Message resource in.
        :param channel_sid: The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`.
        :param sid: The SID of the Message resource to update.
        r<   z=/Services/{service_sid}/Channels/{channel_sid}/Messages/{sid}Nr   r=   r>   rC   rk   _uri)rE   r)   r+   r,   r-   rF   s        r    r>   zMessageContext.__init__   sM     	! '&
 SKRR .. 		r   rM   r#   rG   c                     t        j                  d|i      }t        j                  i       }| j                  j                  d| j                  |      S )rO   X-Twilio-Webhook-EnabledDELETEmethoduriheaders)r   ofrJ   rQ   r   rE   rM   r   s      r    rQ   zMessageContext.delete
  sL     ))*,D
 ))B-}}##8G#TTr   c                    K   t        j                  d|i      }t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)rT   r   r   r   N)r   r   rJ   rU   r   r   s      r    rU   zMessageContext.delete_async!  sa      ))*,D
 ))B-]]//G 0 
 
 	
 
s   AA!AA!c                    t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d   | j                  d         S )	rW   application/jsonAcceptGETr   r+   r,   r-   r<   )r   r   rJ   rX   r   r   rC   rE   r   r*   s      r    rX   zMessageContext.fetch:  su     ))B-.--%%U		7%SMM}5}5u%
 	
r   c                 $  K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d   | j                  d   	      S 7 Ew)
rZ   r   r   r   r   Nr+   r,   r-   r<   )r   r   rJ   r[   r   r   rC   r   s      r    r[   zMessageContext.fetch_asyncP  s      ))B-.11dii 2 
 
 MM}5}5u%
 	
	
s   ABB	ABr7   r0   r2   r3   r4   r\   c           	         t        j                  ||t        j                  |      t        j                  |      ||d      }t        j                  i       }	|t         j                  u st        |t              r|r||	d<   d|	d<   d|	d<   | j                  j                  d| j                  ||	      }
t        | j                  |
| j                  d	   | j                  d
   | j                  d         S )r^   Body
AttributesDateCreatedDateUpdatedLastUpdatedByFromr   !application/x-www-form-urlencodedContent-Typer   r   POSTr   r   datar   r+   r,   r-   r<   )r   r   r   r@   r|   
isinstancerz   rJ   r`   r   r   rC   rE   rM   r7   r0   r2   r3   r4   r\   r   r   r*   s              r    r`   zMessageContext.updateh  s    4 yy((99,G(99,G!0	
 ))B- %43S90 3KG./"E.--&&tyytW ' 
 MM}5}5u%
 	
r   c           	        K   t        j                  ||t        j                  |      t        j                  |      ||d      }t        j                  i       }	|t         j                  u st        |t              r|r||	d<   d|	d<   d|	d<   | j                  j                  d| j                  ||	       d	{   }
t        | j                  |
| j                  d
   | j                  d   | j                  d         S 7 Ew)rc   r   r   r   r   r   r   r   r   Nr+   r,   r-   r<   )r   r   r   r@   r|   r   rz   rJ   rd   r   r   rC   r   s              r    rd   zMessageContext.update_async  s     4 yy((99,G(99,G!0	
 ))B- %43S90 3KG./"E.22tyytW 3 
 
 MM}5}5u%
 	
	
s   B7D9C?:ADc                     dj                  d | j                  j                         D              }dj                  |      S )rf   rg   c              3   F   K   | ]  \  }}d j                  ||        ywri   rj   rl   s      r    rp   z*MessageContext.__repr__.<locals>.<genexpr>  rq   rr   z"<Twilio.Chat.V2.MessageContext {}>rs   rv   s     r    rx   zMessageContext.__repr__  s6     ((SDNN<P<P<RSS3::7CCr   )r   r   r   r   rz   r>   r   r|   r   ry   r}   rQ   rU   r   rX   r[   r   r`   rd   rx   r~   r   s   @r    rI   rI      s@   
 
c 
 
RU 
6 LL	U"'0&8#
U
 
U6 LL	
"'0&8#


 

2
 
,
? 
8 LL#)<<)/0606.4ll$*LL=
"'0&8#
=

 CK =
 #v+&=
 Hf,-=
 Hf,-=
 sF{+=
 S&[!=
 
=
F LL#)<<)/0606.4ll$*LL=
"'0&8#
=

 CK =
 #v+&=
 Hf,-=
 Hf,-=
 sF{+=
 S&[!=
 
=
~D# Dr   rI   c                   2    e Zd Zdeeef   defdZdefdZy)MessagePager*   rG   c                 h    t        | j                  || j                  d   | j                  d         S )zm
        Build an instance of MessageInstance

        :param payload: Payload response from the API
        r+   r,   r+   r,   )r   rJ   rC   )rE   r*   s     r    get_instancezMessagePage.get_instance  s3     MM}5}5	
 	
r   c                      y)rf   z<Twilio.Chat.V2.MessagePage>r   rK   s    r    rx   zMessagePage.__repr__       .r   N)	r   r   r   r   rz   r   r   r   rx   r   r   r    r   r     s)    
DcN 
 
.# .r   r   c                   P    e Zd Zdededef fdZej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  fdede	f   deee	f   deee	f   d	ee
e	f   d
ee
e	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                  ej                  ej                  ej                  ej                  ej                  fdede	f   deee	f   deee	f   d	ee
e	f   d
ee
e	f   deee	f   deee	f   deee	f   defdZej                  ddfdede	f   dee   dee   dee   fdZej                  ddfdede	f   dee   dee   dee   fdZej                  ddfdede	f   dee   dee   dee   fdZej                  ddfdede	f   dee   dee   dee   fdZej                  ej                  ej                  ej                  fdede	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                  ej                  fdede	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defd"Zd!edefd#Zdefd$Z xZ S )%MessageListr)   r+   r,   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a  
        Initialize the MessageList

        :param version: Version that contains the resource
        :param service_sid: The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Message resources from.
        :param channel_sid: The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to read belongs to. This value can be the Channel resource's `sid` or `unique_name`.

        r   z7/Services/{service_sid}/Channels/{channel_sid}/MessagesNr   r   )rE   r)   r+   r,   rF   s       r    r>   zMessageList.__init__
  sG     	! '&
 UMTT 
nn
	r   rM   r#   r\   r0   r2   r3   r4   r7   	media_sidrG   c	           
         t        j                  ||t        j                  |      t        j                  |      |||d      }	t        j                  |dd      }
d|
d<   d|
d<   | j                  j                  d| j                  |	|
      }t        | j                  || j                  d	   | j                  d
         S )an  
        Create the MessageInstance

        :param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
        :param from_: The [Identity](https://www.twilio.com/docs/chat/identity) of the new message's author. The default value is `system`.
        :param attributes: A valid JSON string that contains application-specific data.
        :param date_created: The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source.
        :param date_updated: The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
        :param last_updated_by: The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.
        :param body: The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
        :param media_sid: The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message.

        :returns: The created MessageInstance
        r   r   r   r   r   r   MediaSidr   r   r   r   r   r   r   r   r+   r,   r   )	r   r   r   r@   rJ   creater   r   rC   rE   rM   r\   r0   r2   r3   r4   r7   r   r   r   r*   s               r    r   zMessageList.create  s    8 yy((99,G(99,G!0%

 )),D C
 #F.--&&tyytW ' 
 MM}5}5	
 	
r   c	           
        K   t        j                  ||t        j                  |      t        j                  |      |||d      }	t        j                  |dd      }
d|
d<   d|
d<   | j                  j                  d| j                  |	|
       d	{   }t        | j                  || j                  d
   | j                  d         S 7 7w)a}  
        Asynchronously create the MessageInstance

        :param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
        :param from_: The [Identity](https://www.twilio.com/docs/chat/identity) of the new message's author. The default value is `system`.
        :param attributes: A valid JSON string that contains application-specific data.
        :param date_created: The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source.
        :param date_updated: The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
        :param last_updated_by: The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.
        :param body: The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
        :param media_sid: The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message.

        :returns: The created MessageInstance
        r   r   r   r   r   r   r   r   Nr+   r,   r   )	r   r   r   r@   rJ   create_asyncr   r   rC   r   s               r    r   zMessageList.create_async[  s     8 yy((99,G(99,G!0%

 )),D C
 #F.22tyytW 3 
 
 MM}5}5	
 	
	
s   BCC8CNorderr   limit	page_sizec                     | 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 &quot;MessageInstance.OrderType&quot; order: The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
        :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
        r   r   r   r   )rJ   read_limitspagestreamrE   r   r   r   limitsr   s         r    r   zMessageList.stream  sL    , **5)<yyu{0CyD}}##D&/::r   c                    K   | j                   j                  ||      }| j                  ||d          d{   }| j                   j                  ||d         S 7 #w)a  
        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 &quot;MessageInstance.OrderType&quot; order: The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
        :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
        r   r   Nr   )rJ   r   
page_asyncstream_asyncr   s         r    r   zMessageList.stream_async  sY     , **5)<__5F;<O_PP}}))$w@@ Qs   6A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 &quot;MessageInstance.OrderType&quot; order: The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
        :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
        r   r   r   )listr   )rE   r   r   r   s       r    r   zMessageList.list  s+    * KK#  
 	
r   c                 |   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 &quot;MessageInstance.OrderType&quot; order: The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
        :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
        r   N)r   )rE   r   r   r   records        r    
list_asynczMessageList.list_async  sW     . '+&7&7# '8 ' !
 
 !
 
 	
 
s0   </<731
37<37<
page_tokenpage_numberc                    t        j                  ||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                        S )a  
        Retrieve a single page of MessageInstance records from the API.
        Request is executed immediately

        :param order: The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
        :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
        Order	PageTokenr   PageSizer   r   r   r   r   r   r   paramsr   )r   r   rJ   r   r   r   rC   rE   r   r   r   r   r   r   responses           r    r   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 order: The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
        :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   r   r   r   r   r   r   N)r   r   rJ   r   r   r   rC   r   s           r    r   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
        r   )rJ   domaintwiliorequestr   rC   rE   r   r   s      r    get_pagezMessageList.get_pageQ  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
        r   N)rJ   r   r   request_asyncr   rC   r   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r-   c                 h    t        | j                  | j                  d   | j                  d   |      S zm
        Constructs a MessageContext

        :param sid: The SID of the Message resource to update.
        r+   r,   r<   rI   rJ   rC   rE   r-   s     r    r?   zMessageList.geti  3     MM}5}5	
 	
r   c                 h    t        | j                  | j                  d   | j                  d   |      S r   r   r   s     r    __call__zMessageList.__call__v  r   r   c                      y)rf   z<Twilio.Chat.V2.MessageList>r   rK   s    r    rx   zMessageList.__repr__  r   r   )!r   r   r   r   rz   r>   r   r|   r   ry   r   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   rI   r?   r   rx   r~   r   s   @r    r   r     s   
 
c 
 
0 LL$*LL)/0606.4ll#)<<(.;
"'0&8#
;

 S&[!;
 #v+&;
 Hf,-;
 Hf,-;
 sF{+;
 CK ;
 f%;
 
;
B LL$*LL)/0606.4ll#)<<(.;
"'0&8#
;

 S&[!;
 #v+&;
 Hf,-;
 Hf,-;
 sF{+;
 CK ;
 f%;
 
;
~ =CLL##'	;0&89; }; C=	;
 
/	";: =CLL##'	A0&89A }A C=	A
 
	'A: =CLL##'	
0&89
 }
 C=	

 
o	
> =CLL##'	
0&89
 }
 C=	

 
o	
@ =CLL)/*0,,(."D0&89"D #v+&"D 3;'	"D
 f%"D 
"DL =CLL)/*0,,(."D0&89"D #v+&"D 3;'	"D
 f%"D 
"DH
D3 
D; 
D
Ds 
D{ 
D
s 
~ 

C 
N 
.# .r   r   N)__doc__r   typingr   r   r   r   r   r	   r
   twilio.baser   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   rI   r   r   r   r   r    <module>r      sj     L L L 6 6 8 : 2 ' !UE& UEp|D_ |D~.$ .0A., A.r   