
    gk                         S r SSKJr  SSKJrJrJrJrJrJrJ	r	  SSK
JrJr  SSKJr  SSKJr  SSKJr  SSKJr  SS	KJr   " S
 S\5      r " S S\5      r " S S\5      r " S S\5      rg)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values)InstanceContext)InstanceResource)ListResource)Version)Pagec                   t  ^  \ rS rSr " S S\5      r  SS\S\\\	4   S\S\S\
\   4
U 4S	 jjjr\SS j5       rS
\4S jrS
\4S jrSS jrSS jr\R(                  \R(                  4S\\\4   S\\\4   S
S 4S jjr\R(                  \R(                  4S\\\4   S\\\4   S
S 4S jjrS
\4S jrSrU =r$ )MessageInstance   c                       \ rS rSrSrSrSrg)MessageInstance.OrderType   ascdesc N)__name__
__module____qualname____firstlineno__ASCDESC__static_attributes__r       s/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/twilio/rest/chat/v1/service/channel/message.py	OrderTyper      s    r"   r$   versionpayloadservice_sidchannel_sidsidc                 "  > [         TU ]  U5        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l        [        R                  " UR                  S5      5      U l        [        R                  " UR                  S5      5      U l        UR                  S	5      U l        UR                  S
5      U l        UR                  S5      U l        [        R                   " UR                  S5      5      U l        UR                  S5      U l        UUU=(       d    U R                  S.U l        S U l        g )Nr)   account_sid
attributesr'   tor(   date_createddate_updated
was_editedfrombodyindexurlr'   r(   r)   )super__init__getr)   r+   r,   r'   r-   r(   r   iso8601_datetimer.   r/   r0   _fromr2   integerr3   r4   	_solution_context)selfr%   r&   r'   r(   r)   	__class__s         r#   r7   MessageInstance.__init__/   s7    	!")++e"4*1++m*D)0\)B*1++m*D!(T!2*1++m*D0;0L0LKK'1
 1<0L0LKK'1
 +2++l*C$+KK$7
#*;;v#6	$/$7$7G8L$M
")++e"4 '&?$((

 37r"   returnc                     U R                   cB  [        U R                  U R                  S   U R                  S   U R                  S   S9U l         U R                   $ )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)   r5   )r=   MessageContext_versionr<   r>   s    r#   _proxyMessageInstance._proxyR   sQ     == * NN=9 NN=9NN5)	DM }}r"   c                 6    U R                   R                  5       $ )R
Deletes the MessageInstance


:returns: True if delete succeeds, False otherwise
)rF   deleterE   s    r#   rJ   MessageInstance.deletec   s     {{!!##r"   c                 R   #    U R                   R                  5       I Sh  vN $  N7f)n
Asynchronous coroutine that deletes the MessageInstance


:returns: True if delete succeeds, False otherwise
N)rF   delete_asyncrE   s    r#   rN   MessageInstance.delete_asyncl   s       [[--////   '%'c                 6    U R                   R                  5       $ )C
Fetch the MessageInstance


:returns: The fetched MessageInstance
)rF   fetchrE   s    r#   rS   MessageInstance.fetchu   s     {{  ""r"   c                 R   #    U R                   R                  5       I Sh  vN $  N7f)]
Asynchronous coroutine to fetch the MessageInstance


:returns: The fetched MessageInstance
N)rF   fetch_asyncrE   s    r#   rW   MessageInstance.fetch_async~   s       [[,,....rP   r2   r,   c                 6    U R                   R                  UUS9$ )]  
Update the MessageInstance

:param body: The message to send to the channel. Can also 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.

:returns: The updated MessageInstance
r2   r,   )rF   updater>   r2   r,   s      r#   r\   MessageInstance.update   s&     {{!!! " 
 	
r"   c                 R   #    U R                   R                  UUS9I Sh  vN $  N7f)w  
Asynchronous coroutine to update the MessageInstance

:param body: The message to send to the channel. Can also 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.

:returns: The updated MessageInstance
r[   N)rF   update_asyncr]   s      r#   ra   MessageInstance.update_async   s3      [[--! . 
 
 	
 
rP   c                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )N
Provide a friendly representation

:returns: Machine friendly representation
 c              3   H   #    U  H  u  pS R                  X5      v   M     g7fz{}={}Nformat.0kvs      r#   	<genexpr>+MessageInstance.__repr__.<locals>.<genexpr>         S<RDA7>>!//<R    "z#<Twilio.Chat.V1.MessageInstance {}>joinr<   itemsri   r>   contexts     r#   __repr__MessageInstance.__repr__   s6     ((SDNN<P<P<RSS4;;GDDr"   )r=   r:   r<   r+   r,   r2   r(   r.   r/   r3   r'   r)   r-   r4   r0   )N)rA   rC   )rA   r   )r   r   r   r   objectr$   r   r   strr   r   r7   propertyrF   boolrJ   rN   rS   rW   r   unsetr   r\   ra   rw   r!   __classcell__r?   s   @r#   r   r      s0   F , "!7!7 c3h!7 	!7
 !7 c]!7 !7F   $ $0D 0#/ $*<<)/
CK 
 #v+&
 
	
( $*<<)/
CK 
 #v+&
 
	
$E# E Er"   r   c                   6  ^  \ rS rSrS\S\S\S\4U 4S jjrS\4S jrS\4S	 jr	S\
4S
 jrS\
4S jr\R                  \R                  4S\\\4   S\\\4   S\
4S jjr\R                  \R                  4S\\\4   S\\\4   S\
4S jjrS\4S jrSrU =r$ )rC      r%   r'   r(   r)   c                 |   > [         TU ]  U5        UUUS.U l        SR                  " S0 U R                  D6U l        g)a  
Initialize the MessageContext

:param version: Version that contains the resource
:param service_sid: The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from.
:param channel_sid: The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message belongs to. Can be the Channel's `sid` or `unique_name`.
:param sid: The Twilio-provided string that uniquely identifies the Message resource to update.
r5   z=/Services/{service_sid}/Channels/{channel_sid}/Messages/{sid}Nr   r6   r7   r<   ri   _uri)r>   r%   r'   r(   r)   r?   s        r#   r7   MessageContext.__init__   sJ     	! '&
 LRR .. 		r"   rA   c                 x    [         R                  " 0 5      nU R                  R                  SU R                  US9$ )rI   DELETEmethoduriheaders)r   ofrD   rJ   r   r>   r   s     r#   rJ   MessageContext.delete   s1     ))B-}}##8G#TTr"   c                    #    [         R                  " 0 5      nU R                  R                  SU R                  US9I Sh  vN $  N7f)rM   r   r   N)r   r   rD   rN   r   r   s     r#   rN   MessageContext.delete_async   sE      ))B-]]//G 0 
 
 	
 
s   ?AAAc                     [         R                  " 0 5      nSUS'   U R                  R                  SU R                  US9n[        U R                  UU R                  S   U R                  S   U R                  S   S9$ )	rR   application/jsonAcceptGETr   r'   r(   r)   r5   )r   r   rD   rS   r   r   r<   r>   r   r&   s      r#   rS   MessageContext.fetch   su     ))B-.--%%U		7%SMM}5}5u%
 	
r"   c                   #    [         R                  " 0 5      nSUS'   U R                  R                  SU R                  US9I Sh  vN n[        U R                  UU R                  S   U R                  S   U R                  S   S	9$  NB7f)
rV   r   r   r   r   Nr'   r(   r)   r5   )r   r   rD   rW   r   r   r<   r   s      r#   rW   MessageContext.fetch_async   s      ))B-.11dii 2 
 
 MM}5}5u%
 	
	
s   ABB	ABr2   r,   c                 :   [         R                  " UUS.5      n[         R                  " 0 5      nSUS'   SUS'   U R                  R                  SU R                  X4S9n[        U R                  UU R                  S   U R                  S	   U R                  S
   S9$ )rZ   Body
Attributes!application/x-www-form-urlencodedContent-Typer   r   POSTr   r   datar   r'   r(   r)   r5   )r   r   rD   r\   r   r   r<   r>   r2   r,   r   r   r&   s         r#   r\   MessageContext.update  s     yy(
 ))B-"E.--&&tyyt ' 
 MM}5}5u%
 	
r"   c                 V  #    [         R                  " UUS.5      n[         R                  " 0 5      nSUS'   SUS'   U R                  R                  SU R                  X4S9I Sh  vN n[        U R                  UU R                  S	   U R                  S
   U R                  S   S9$  NB7f)r`   r   r   r   r   r   r   r   Nr'   r(   r)   r5   )r   r   rD   ra   r   r   r<   r   s         r#   ra   MessageContext.update_async<  s      yy(
 ))B-"E.22tyyt 3 
 
 MM}5}5u%
 	
	
s   A"B)$B'%AB)c                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )rd   re   c              3   H   #    U  H  u  pS R                  X5      v   M     g7frg   rh   rj   s      r#   rn   *MessageContext.__repr__.<locals>.<genexpr>h  rp   rq   z"<Twilio.Chat.V1.MessageContext {}>rr   ru   s     r#   rw   MessageContext.__repr__b  s6     ((SDNN<P<P<RSS3::7CCr"   r<   r   )r   r   r   r   r   rz   r7   r|   rJ   rN   r   rS   rW   r   r}   r   ry   r\   ra   rw   r!   r~   r   s   @r#   rC   rC      s    
 
c 
 
RU 
.
U 
U
D 

 
,
? 
4 $*<<)/$
CK $
 #v+&$
 
	$
P $*<<)/$
CK $
 #v+&$
 
	$
LD# D Dr"   rC   c                   >    \ rS rSrS\\\4   S\4S jrS\4S jr	Sr
g)MessagePageil  r&   rA   c                 b    [        U R                  UU R                  S   U R                  S   S9$ )zU
Build an instance of MessageInstance

:param payload: Payload response from the API
r'   r(   r'   r(   )r   rD   r<   )r>   r&   s     r#   get_instanceMessagePage.get_instancen  s3     MM}5}5	
 	
r"   c                     g)rd   z<Twilio.Chat.V1.MessagePage>r   rE   s    r#   rw   MessagePage.__repr__{       .r"   r   N)r   r   r   r   r   rz   r   r   r   rw   r!   r   r"   r#   r   r   l  s)    
DcN 
 
.# .r"   r   c                     ^  \ rS rSrS\S\S\4U 4S jjr\R                  \R                  4S\S\	\\
4   S\	\\
4   S	\4S
 jjr\R                  \R                  4S\S\	\\
4   S\	\\
4   S	\4S jjr\R                  SS4S\	S\
4   S\\   S\\   S	\\   4S jjr\R                  SS4S\	S\
4   S\\   S\\   S	\\   4S jjr\R                  SS4S\	S\
4   S\\   S\\   S	\\   4S jjr\R                  SS4S\	S\
4   S\\   S\\   S	\\   4S jjr\R                  \R                  \R                  \R                  4S\	S\
4   S\	\\
4   S\	\\
4   S\	\\
4   S	\4
S jjr\R                  \R                  \R                  \R                  4S\	S\
4   S\	\\
4   S\	\\
4   S\	\\
4   S	\4
S jjrS\S	\4S jrS\S	\4S jrS\S	\4S jrS\S	\4S jrS	\4S jrS r U =r!$ )!MessageListi  r%   r'   r(   c                 z   > [         TU ]  U5        UUS.U l        SR                  " S0 U R                  D6U l        g)a  
Initialize the MessageList

:param version: Version that contains the resource
:param service_sid: The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.
:param channel_sid: The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to read belongs to. Can be the Channel's `sid` or `unique_name`.

r   z7/Services/{service_sid}/Channels/{channel_sid}/MessagesNr   r   )r>   r%   r'   r(   r?   s       r#   r7   MessageList.__init__  sD     	! '&
 NTT 
nn
	r"   r2   from_r,   rA   c                 $   [         R                  " UUUS.5      n[         R                  " SS05      nSUS'   SUS'   U R                  R                  SU R                  XES9n[        U R                  UU R                  S   U R                  S	   S
9$ )a  
Create the MessageInstance

:param body: The message to send to the channel. Can also 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 from_: The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`.
:param attributes: A valid JSON string that contains application-specific data.

:returns: The created MessageInstance
r   Fromr   r   r   r   r   r   r   r'   r(   r   )r   r   rD   creater   r   r<   r>   r2   r   r,   r   r   r&   s          r#   r   MessageList.create  s      yy(
 ))^-PQR"E.--&&tyyt ' 
 MM}5}5	
 	
r"   c                 @  #    [         R                  " UUUS.5      n[         R                  " SS05      nSUS'   SUS'   U R                  R                  SU R                  XES9I Sh  vN n[        U R                  UU R                  S	   U R                  S
   S9$  N47f)a  
Asynchronously create the MessageInstance

:param body: The message to send to the channel. Can also 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 from_: The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`.
:param attributes: A valid JSON string that contains application-specific data.

:returns: The created MessageInstance
r   r   r   r   r   r   r   Nr'   r(   r   )r   r   rD   create_asyncr   r   r<   r   s          r#   r   MessageList.create_async  s       yy(
 ))^-PQR"E.22tyyt 3 
 
 MM}5}5	
 	
	
s   A%B'B(5BNorderr   limit	page_sizec                     U R                   R                  X#5      nU R                  XS   S9nU R                   R                  XTS   5      $ )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   )rD   read_limitspagestreamr>   r   r   r   limitsr   s         r#   r   MessageList.stream  sF    , **5<yyu{0CyD}}##D/::r"   c                    #    U R                   R                  X#5      nU R                  XS   S9I Sh  vN nU R                   R                  XTS   5      $  N"7f)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   )rD   r   
page_asyncstream_asyncr   s         r#   r   MessageList.stream_async  sR     , **5<__5;<O_PP}}))$w@@ Qs   1AA#Ac                 6    [        U R                  UUUS95      $ )aK  
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   )r>   r   r   r   s       r#   r   MessageList.list   s+    * KK#  
 	
r"   c                 x   #    U R                  UUUS9I Sh  vN  Vs/ s Sh  vN nUPM   N N

 sn$ s  snf 7f)aZ  
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   )r>   r   r   r   records        r#   
list_asyncMessageList.list_async=  sT     . '+&7&7# '8 ' ! !
 
 !
 	
 
s0   :-:51/
15:15:
page_tokenpage_numberc                     [         R                  " UUUUS.5      n[         R                  " SS05      nSUS'   U R                  R                  SU R                  XVS9n[        U R                  XpR                  5      $ )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   rD   r   r   r   r<   r>   r   r   r   r   r   r   responses           r#   r   MessageList.page[  s~    $ yy'#%	
 ))^-PQR.==%%dii & 
 4==(NNCCr"   c                   #    [         R                  " UUUUS.5      n[         R                  " SS05      nSUS'   U R                  R                  SU R                  XVS9I Sh  vN n[        U R                  XpR                  5      $  N$7f)	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   rD   r   r   r   r<   r   s           r#   r   MessageList.page_async  s     $ yy'#%	
 ))^-PQR.11dii 2 
 
 4==(NNCC
s   A!B
#B$%B

target_urlc                     U R                   R                  R                  R                  SU5      n[	        U R                   X R
                  5      $ )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   )rD   domaintwiliorequestr   r<   r>   r   r   s      r#   get_pageMessageList.get_page  s;     ==''..66ujI4==(NNCCr"   c                    #    U R                   R                  R                  R                  SU5      I Sh  vN n[	        U R                   X R
                  5      $  N$7f)z
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)rD   r   r   request_asyncr   r<   r   s      r#   get_page_asyncMessageList.get_page_async  sG      --44BB5*UU4==(NNCC Vs   4AA%Ar)   c                 b    [        U R                  U R                  S   U R                  S   US9$ z~
Constructs a MessageContext

:param sid: The Twilio-provided string that uniquely identifies the Message resource to update.
r'   r(   r5   rC   rD   r<   r>   r)   s     r#   r8   MessageList.get  3     MM}5}5	
 	
r"   c                 b    [        U R                  U R                  S   U R                  S   US9$ r   r   r   s     r#   __call__MessageList.__call__  r   r"   c                     g)rd   z<Twilio.Chat.V1.MessageList>r   rE   s    r#   rw   MessageList.__repr__  r   r"   r   )"r   r   r   r   r   rz   r7   r   r}   r   ry   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   rC   r8   r   rw   r!   r~   r   s   @r#   r   r     sp   
 
c 
 
. %+LL)/	&
&
 S&[!&
 #v+&	&

 
&
V %+LL)/	&
&
 S&[!&
 #v+&	&

 
&
T =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   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   rC   r   r   r   r"   r#   <module>r     sg     L L L + 8 : 2 ' !YE& YExtD_ tDn.$ .0W., W.r"   