
    g'Q                         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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 - Flex
 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                      ^  \ rS rSrSr SS\S\\\4   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S\4S jrSrU =r$ )ChannelInstance   aG  
:ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Channel resource and owns this Workflow.
:ivar flex_flow_sid: The SID of the Flex Flow.
:ivar sid: The unique string that we created to identify the Channel resource.
:ivar user_sid: The SID of the chat user.
:ivar task_sid: The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external`
:ivar url: The absolute URL of the Flex chat channel resource.
:ivar date_created: The date and time in GMT when the Flex chat channel 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 Flex chat channel was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
versionpayload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        SU=(       d    U R
                  0U l        S U l        g )	Naccount_sidflex_flow_sidr   user_sidtask_sidurldate_createddate_updated)super__init__getr   r   r   r   r   r   r   iso8601_datetimer   r    	_solution_context)selfr   r   r   	__class__s       g/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/twilio/rest/flex_api/v1/channel.pyr"   ChannelInstance.__init__%   s     	!*1++m*D,3KK,H")++e"4'.{{:'>'.{{:'>")++e"40;0L0LKK'1
 1<0L0LKK'1

 3?$((
 37    returnc                     U R                   c&  [        U R                  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: ChannelContext for this ChannelInstance
r   r   )r&   ChannelContext_versionr%   r'   s    r)   _proxyChannelInstance._proxy<   s9     == *NN5)DM }}r+   c                 6    U R                   R                  5       $ )R
Deletes the ChannelInstance


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


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


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


:returns: The fetched ChannelInstance
N)r2   fetch_asyncr1   s    r)   rC   ChannelInstance.fetch_asyncf   s       [[,,....r<   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>+ChannelInstance.__repr__.<locals>.<genexpr>u         S<RDA7>>!//<R    "z&<Twilio.FlexApi.V1.ChannelInstance {}>joinr%   itemsrK   r'   contexts     r)   __repr__ChannelInstance.__repr__o   s6     ((SDNN<P<P<RSS7>>wGGr+   )
r&   r%   r   r   r    r   r   r   r   r   )N)r,   r/   )r,   r   )__name__
__module____qualname____firstlineno____doc__r   r   strr   r   r"   propertyr2   boolr6   r:   r?   rC   rY   __static_attributes____classcell__r(   s   @r)   r   r      s    	 OS77)-c3h7>Fsm7 7.  $ $0D 0#/H# H Hr+   r   c                   z   ^  \ rS rSr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S\4S
 jrSrU =r$ )r/   y   r   r   c                 x   > [         TU ]  U5        SU0U l        SR                  " S0 U R                  D6U l        g)z
Initialize the ChannelContext

:param version: Version that contains the resource
:param sid: The SID of the Flex chat channel resource to fetch.
r   z/Channels/{sid}N )r!   r"   r%   rK   _uri)r'   r   r   r(   s      r)   r"   ChannelContext.__init__{   s=     	! 3
 &,,>t~~>	r+   r,   c                 x    [         R                  " 0 5      nU R                  R                  SU R                  US9$ )r5   DELETEmethoduriheaders)r   ofr0   r6   rj   r'   rq   s     r)   r6   ChannelContext.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)r9   rm   rn   N)r   rr   r0   r:   rj   rs   s     r)   r:   ChannelContext.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   S9$ )r>   application/jsonAcceptGETrn   r   r.   )r   rr   r0   r?   rj   r   r%   r'   rq   r   s      r)   r?   ChannelContext.fetch   s]     ))B-.--%%U		7%SMM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   S9$  N&7f)rB   rx   ry   rz   rn   Nr   r.   )r   rr   r0   rC   rj   r   r%   r{   s      r)   rC   ChannelContext.fetch_async   sq      ))B-.11dii 2 
 
 MMu%
 	
	
s   AA/A-'A/c                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )rF   rG   c              3   H   #    U  H  u  pS R                  X5      v   M     g7frI   rJ   rL   s      r)   rP   *ChannelContext.__repr__.<locals>.<genexpr>   rR   rS   z%<Twilio.FlexApi.V1.ChannelContext {}>rT   rW   s     r)   rY   ChannelContext.__repr__   s6     ((SDNN<P<P<RSS6==gFFr+   )r%   rj   )r[   r\   r]   r^   r   r`   r"   rb   r6   r:   r   r?   rC   rY   rc   rd   re   s   @r)   r/   r/   y   s\    ? ?c ?
U 
U
D 

 
(
? 
,G# G Gr+   r/   c                   >    \ rS rSrS\\\4   S\4S jrS\4S jr	Sr
g)ChannelPage   r   r,   c                 .    [        U R                  U5      $ )zU
Build an instance of ChannelInstance

:param payload: Payload response from the API
)r   r0   )r'   r   s     r)   get_instanceChannelPage.get_instance   s     t}}g66r+   c                     g)rF   z<Twilio.FlexApi.V1.ChannelPage>ri   r1   s    r)   rY   ChannelPage.__repr__        1r+   ri   N)r[   r\   r]   r^   r   r`   r   r   r   rY   rc   ri   r+   r)   r   r      s)    7DcN 7 71# 1r+   r   c                   6  ^  \ rS rSrS\4U 4S jjr\R                  \R                  \R                  \R                  \R                  \R                  4S\S\S\S\S\	\\
4   S	\	\\
4   S
\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\4S jjr\R                  \R                  \R                  \R                  \R                  \R                  4S\S\S\S\S\	\\
4   S	\	\\
4   S
\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\4S jjr  S#S\\   S\\   S\\   4S jjr  S#S\\   S\\   S\\   4S jjr  S#S\\   S\\   S\\   4S jjr  S#S\\   S\\   S\\   4S jjr\R                  \R                  \R                  4S\	\\
4   S\	\\
4   S\	\\
4   S\4S jjr\R                  \R                  \R                  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"$ )$ChannelList   r   c                 2   > [         TU ]  U5        SU l        g)zQ
Initialize the ChannelList

:param version: Version that contains the resource

z	/ChannelsN)r!   r"   rj   )r'   r   r(   s     r)   r"   ChannelList.__init__   s     	!	r+   r   identitychat_user_friendly_namechat_friendly_nametargetchat_unique_namepre_engagement_datar   task_attributes
long_livedr,   c                 &   [         R                  " UUUUUUUUU	[        R                  " U
5      S.
5      n[         R                  " SS05      nSUS'   SUS'   U R                  R                  SU R                  XS9n[        U R                  U5      $ )a7  
Create the ChannelInstance

:param flex_flow_sid: The SID of the Flex Flow.
:param identity: The `identity` value that uniquely identifies the new resource's chat User.
:param chat_user_friendly_name: The chat participant's friendly name.
:param chat_friendly_name: The chat channel's friendly name.
:param target: The Target Contact Identity, for example the phone number of an SMS.
:param chat_unique_name: The chat channel's unique name.
:param pre_engagement_data: The pre-engagement data.
:param task_sid: The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external`
:param task_attributes: The Task attributes to be added for the TaskRouter Task.
:param long_lived: Whether to create the channel as long-lived.

:returns: The created ChannelInstance

FlexFlowSidIdentityChatUserFriendlyNameChatFriendlyNameTargetChatUniqueNamePreEngagementDataTaskSidTaskAttributes	LongLivedContent-Type!application/x-www-form-urlencodedrx   ry   POSTro   rp   datarq   )r   rr   r   boolean_to_stringr0   createrj   r   r'   r   r   r   r   r   r   r   r   r   r   r   rq   r   s                 r)   r   ChannelList.create   s    < yy,$(?$6 "2%8#"1&88D
 ))^-PQR"E.--&&tyyt ' 
 t}}g66r+   c                 B  #    [         R                  " UUUUUUUUU	[        R                  " U
5      S.
5      n[         R                  " SS05      nSUS'   SUS'   U R                  R                  SU R                  XS9I Sh  vN n[        U R                  U5      $  N7f)	aF  
Asynchronously create the ChannelInstance

:param flex_flow_sid: The SID of the Flex Flow.
:param identity: The `identity` value that uniquely identifies the new resource's chat User.
:param chat_user_friendly_name: The chat participant's friendly name.
:param chat_friendly_name: The chat channel's friendly name.
:param target: The Target Contact Identity, for example the phone number of an SMS.
:param chat_unique_name: The chat channel's unique name.
:param pre_engagement_data: The pre-engagement data.
:param task_sid: The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external`
:param task_attributes: The Task attributes to be added for the TaskRouter Task.
:param long_lived: Whether to create the channel as long-lived.

:returns: The created ChannelInstance
r   r   r   rx   ry   r   r   N)r   rr   r   r   r0   create_asyncrj   r   r   s                 r)   r   ChannelList.create_async0  s     < yy,$(?$6 "2%8#"1&88D
 ))^-PQR"E.22tyyt 3 
 
 t}}g66	
s   B BBBlimit	page_sizec                     U R                   R                  X5      nU R                  US   S9nU R                   R                  XCS   5      $ )a  
Streams ChannelInstance 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
r   r   r   )r0   read_limitspagestreamr'   r   r   limitsr   s        r)   r   ChannelList.streamh  sF    ( **5<yy6+#6y7}}##D/::r+   c                    #    U R                   R                  X5      nU R                  US   S9I Sh  vN nU R                   R                  XCS   5      $  N"7f)a  
Asynchronously streams ChannelInstance 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
r   r   Nr   )r0   r   
page_asyncstream_asyncr   s        r)   r   ChannelList.stream_async  sR     ( **5<__vk/B_CC}}))$w@@ Ds   1AA#Ac                 4    [        U R                  UUS95      $ )a  
Lists ChannelInstance 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
r   r   )listr   )r'   r   r   s      r)   r   ChannelList.list  s(    & KK#  
 	
r+   c                 v   #    U R                  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)a  
Asynchronously lists ChannelInstance 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
r   N)r   )r'   r   r   records       r)   
list_asyncChannelList.list_async  sQ     * '+&7&7# '8 ' ! !
 
 !
 	
 
s0   9,940.
049049
page_tokenpage_numberc                     [         R                  " UUUS.5      n[         R                  " SS05      nSUS'   U R                  R                  SU R                  XES9n[        U R                  U5      $ )a;  
Retrieve a single page of ChannelInstance 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 ChannelInstance
	PageTokenr   PageSizer   r   rx   ry   rz   ro   rp   paramsrq   )r   rr   r0   r   rj   r   r'   r   r   r   r   rq   responses          r)   r   ChannelList.page  sw      yy'#%
 ))^-PQR.==%%dii & 
 4==(33r+   c                   #    [         R                  " UUUS.5      n[         R                  " SS05      nSUS'   U R                  R                  SU R                  XES9I Sh  vN n[        U R                  U5      $  N7f)	aJ  
Asynchronously retrieve a single page of ChannelInstance 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 ChannelInstance
r   r   r   rx   ry   rz   r   N)r   rr   r0   r   rj   r   r   s          r)   r   ChannelList.page_async  s       yy'#%
 ))^-PQR.11dii 2 
 
 4==(33
s   A A?"A=#A?
target_urlc                     U R                   R                  R                  R                  SU5      n[	        U R                   U5      $ )z
Retrieve a specific page of ChannelInstance records from the API.
Request is executed immediately

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

:returns: Page of ChannelInstance
rz   )r0   domaintwiliorequestr   r'   r   r   s      r)   get_pageChannelList.get_page  s7     ==''..66ujI4==(33r+   c                    #    U R                   R                  R                  R                  SU5      I Sh  vN n[	        U R                   U5      $  N7f)z
Asynchronously retrieve a specific page of ChannelInstance records from the API.
Request is executed immediately

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

:returns: Page of ChannelInstance
rz   N)r0   r   r   request_asyncr   r   s      r)   get_page_asyncChannelList.get_page_async  sC      --44BB5*UU4==(33 Vs   4AAAr   c                 *    [        U R                  US9$ z^
Constructs a ChannelContext

:param sid: The SID of the Flex chat channel resource to fetch.
r.   r/   r0   r'   r   s     r)   r#   ChannelList.get)       dmm55r+   c                 *    [        U R                  US9$ r   r   r   s     r)   __call__ChannelList.__call__1  r   r+   c                     g)rF   z<Twilio.FlexApi.V1.ChannelList>ri   r1   s    r)   rY   ChannelList.__repr__9  r   r+   )rj   )NN)#r[   r\   r]   r^   r   r"   r   unsetr`   r   objectrb   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r/   r#   r   rY   rc   rd   re   s   @r)   r   r      s   	  	 " &,\\/5||28,,'-||.4ll*0,,6767 67 "%	67
  67 c6k"67  V,67 #3;/67 V$67 sF{+67 $,'67 
67| &,\\/5||28,,'-||.4ll*0,,6767 67 "%	67
  67 c6k"67  V,67 #3;/67 V$67 sF{+67 $,'67 
67t  $#';}; C=; 
/	"	;6  $#'A}A C=A 
	'	A6  $#'
}
 C=
 
o		
8  $#'
}
 C=
 
o		
: *0*0,,(.	4#v+&4 3;'4 f%	4
 
4F *0*0,,(.	4#v+&4 3;'4 f%	4
 
4B
43 
4; 
4
4s 
4{ 
46s 6~ 66C 6N 61# 1 1r+   r   N)r_   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   r/   r   r   ri   r+   r)   <module>r      sj     L L L 6 6 8 : 2 ' !]H& ]H@\G_ \G~1$ 1&T1, T1r+   