
    g4                         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 S\5      r " S S\5      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\R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  4S\\	\4   S\\	\4   S\S\4   S\\	\4   S\\\4   S\S\4   S\\	\4   S\\	\4   S\\	\4   S\\	\4   S\\	\4   S\\\4   S\\\4   S\\\4   S \\\4   S!\\\4   S"\\\4   S
S 4$S# jjr\R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  \R*                  4S\\	\4   S\\	\4   S\S\4   S\\	\4   S\\\4   S\S\4   S\\	\4   S\\	\4   S\\	\4   S\\	\4   S\\	\4   S\\\4   S\\\4   S\\\4   S \\\4   S!\\\4   S"\\\4   S
S 4$S$ jjrS
\	4S% jrS&rU =r$ )*FlexFlowInstance   c                   ,    \ rS rSrSrSrSrSrSrSr	Sr
g	)
FlexFlowInstance.ChannelType   websmsfacebookwhatsapplinecustom N)__name__
__module____qualname____firstlineno__WEBSMSFACEBOOKWHATSAPPLINECUSTOM__static_attributes__r       i/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/twilio/rest/flex_api/v1/flex_flow.pyChannelTyper      s     r+   r-   c                        \ rS rSrSrSrSrSrg) FlexFlowInstance.IntegrationType#   studioexternaltaskr   N)r    r!   r"   r#   STUDIOEXTERNALTASKr*   r   r+   r,   IntegrationTyper/   #   s    r+   r7   versionpayloadsidc                 "  > [         TU ]  U5        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
        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        UR                  S5      U l        UR                  S5      U l        SU=(       d    U R                  0U l        S U l        g )Naccount_siddate_createddate_updatedr:   friendly_namechat_service_sidchannel_typecontact_identityenabledintegration_typeintegration
long_livedjanitor_enabledurl)super__init__getr<   r   iso8601_datetimer=   r>   r:   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   	_solution_context)selfr8   r9   r:   	__class__s       r,   rJ   FlexFlowInstance.__init__9   sM    	!*1++m*D0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4,3KK,H/6{{;M/NFMkkG
 07{{;M/N'.{{9'=KK*+ 	 9@M8R*1++l*C/6{{;L/M")++e"4 3?$((
 48r+   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: FlexFlowContext for this FlexFlowInstance
r:   r:   )rN   FlexFlowContext_versionrM   rO   s    r,   _proxyFlexFlowInstance._proxyZ   s9     == +NN5)DM }}r+   c                 6    U R                   R                  5       $ )S
Deletes the FlexFlowInstance


:returns: True if delete succeeds, False otherwise
)rX   deleterW   s    r,   r\   FlexFlowInstance.deletei   s     {{!!##r+   c                 R   #    U R                   R                  5       I Sh  vN $  N7f)o
Asynchronous coroutine that deletes the FlexFlowInstance


:returns: True if delete succeeds, False otherwise
N)rX   delete_asyncrW   s    r,   r`   FlexFlowInstance.delete_asyncr   s       [[--////   '%'c                 6    U R                   R                  5       $ )E
Fetch the FlexFlowInstance


:returns: The fetched FlexFlowInstance
)rX   fetchrW   s    r,   re   FlexFlowInstance.fetch{   s     {{  ""r+   c                 R   #    U R                   R                  5       I Sh  vN $  N7f)_
Asynchronous coroutine to fetch the FlexFlowInstance


:returns: The fetched FlexFlowInstance
N)rX   fetch_asyncrW   s    r,   ri   FlexFlowInstance.fetch_async   s       [[,,....rb   r?   r@   rA   r   rB   rC   rD   r/   integration_flow_sidintegration_urlintegration_workspace_sidintegration_workflow_sidintegration_channelintegration_timeoutintegration_priorityintegration_creation_on_messagerF   rG   integration_retry_countc                 T    U R                   R                  UUUUUUUUU	U
UUUUUUUS9$ )	  
Update the FlexFlowInstance

:param friendly_name: A descriptive string that you create to describe the Flex Flow resource.
:param chat_service_sid: The SID of the chat service.
:param channel_type:
:param contact_identity: The channel contact's Identity.
:param enabled: Whether the new Flex Flow is enabled.
:param integration_type:
:param integration_flow_sid: The SID of the Studio Flow. Required when `integrationType` is `studio`.
:param integration_url: The URL of the external webhook. Required when `integrationType` is `external`.
:param integration_workspace_sid: The Workspace SID for a new Task. Required when `integrationType` is `task`.
:param integration_workflow_sid: The Workflow SID for a new Task. Required when `integrationType` is `task`.
:param integration_channel: The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
:param integration_timeout: The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
:param integration_priority: The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
:param integration_creation_on_message: In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
:param long_lived: When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
:param janitor_enabled: When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
:param integration_retry_count: The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.

:returns: The updated FlexFlowInstance
r?   r@   rA   rB   rC   rD   rk   rl   rm   rn   ro   rp   rq   rr   rF   rG   rs   )rX   updaterO   r?   r@   rA   rB   rC   rD   rk   rl   rm   rn   ro   rp   rq   rr   rF   rG   rs   s                     r,   rw   FlexFlowInstance.update   sT    Z {{!!'-%--!5+&?%= 3 3!5,K!+$;# " 
 	
r+   c                 p   #    U R                   R                  UUUUUUUUU	U
UUUUUUUS9I Sh  vN $  N7f)5	  
Asynchronous coroutine to update the FlexFlowInstance

:param friendly_name: A descriptive string that you create to describe the Flex Flow resource.
:param chat_service_sid: The SID of the chat service.
:param channel_type:
:param contact_identity: The channel contact's Identity.
:param enabled: Whether the new Flex Flow is enabled.
:param integration_type:
:param integration_flow_sid: The SID of the Studio Flow. Required when `integrationType` is `studio`.
:param integration_url: The URL of the external webhook. Required when `integrationType` is `external`.
:param integration_workspace_sid: The Workspace SID for a new Task. Required when `integrationType` is `task`.
:param integration_workflow_sid: The Workflow SID for a new Task. Required when `integrationType` is `task`.
:param integration_channel: The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
:param integration_timeout: The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
:param integration_priority: The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
:param integration_creation_on_message: In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
:param long_lived: When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
:param janitor_enabled: When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
:param integration_retry_count: The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.

:returns: The updated FlexFlowInstance
rv   N)rX   update_asyncrx   s                     r,   r|   FlexFlowInstance.update_async   sa     Z [[--'-%--!5+&?%= 3 3!5,K!+$;# . 
 
 	
 
s   -646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>,FlexFlowInstance.__repr__.<locals>.<genexpr>        S<RDA7>>!//<R    "z'<Twilio.FlexApi.V1.FlexFlowInstance {}>joinrM   itemsr   rO   contexts     r,   __repr__FlexFlowInstance.__repr__  s6     ((SDNN<P<P<RSS8??HHr+   )rN   rM   r<   rA   r@   rB   r=   r>   rC   r?   rE   rD   rG   rF   r:   rH   )N)rR   rU   )rR   r   )r    r!   r"   r#   objectr-   r7   r   r   strr   r   rJ   propertyrX   boolr\   r`   re   ri   r   unsetr   intrw   r|   r   r*   __classcell__rP   s   @r,   r   r      sD   f & 
$ OS88)-c3h8>Fsm8 8B  $ $0D 0#/ -3LL/5||FLll/5||'-|| LL39<<.4ll8>7=||28,,28,,39<<?E||*0,,/5||6<ll)?
S&[)?
  V,?
 :FBC	?

  V,?
 tV|$?
  .6
?
 $CK0?
 sF{+?
 $)f#5?
 #(V"4?
 #3;/?
 #3;/?
  $CK0!?
" */tV|)<#?
$ $,'%?
& tV|,'?
( "'sF{!3)?
* 
+?
F -3LL/5||FLll/5||'-|| LL39<<.4ll8>7=||28,,28,,39<<?E||*0,,/5||6<ll)?
S&[)?
  V,?
 :FBC	?

  V,?
 tV|$?
  .6
?
 $CK0?
 sF{+?
 $)f#5?
 #(V"4?
 #3;/?
 #3;/?
  $CK0!?
" */tV|)<#?
$ $,'%?
& tV|,'?
( "'sF{!3)?
* 
+?
BI# I Ir+   r   c            %       f  ^  \ 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\R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  4S
\\\4   S\\\4   S\S\4   S\\\4   S\\\4   S\S\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\
4$S jjr\R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  4S
\\\4   S\\\4   S\S\4   S\\\4   S\\\4   S\S\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\\\4   S\
4$S jjrS\4S jrS rU =r$ )!rU   i  r8   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 FlexFlowContext

:param version: Version that contains the resource
:param sid: The SID of the Flex Flow resource to update.
r:   z/FlexFlows/{sid}Nr   )rI   rJ   rM   r   _uri)rO   r8   r:   rP   s      r,   rJ   FlexFlowContext.__init__  s=     	! 3
 '--??	r+   rR   c                 x    [         R                  " 0 5      nU R                  R                  SU R                  US9$ )r[   DELETEmethoduriheaders)r   ofrV   r\   r   rO   r   s     r,   r\   FlexFlowContext.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)r_   r   r   N)r   r   rV   r`   r   r   s     r,   r`   FlexFlowContext.delete_async6  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$ )rd   application/jsonAcceptGETr   r:   rT   )r   r   rV   re   r   r   rM   rO   r   r9   s      r,   re   FlexFlowContext.fetchD  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)rh   r   r   r   r   Nr:   rT   )r   r   rV   ri   r   r   rM   r   s      r,   ri   FlexFlowContext.fetch_asyncX  sq      ))B-.11dii 2 
 
  MMu%
 	
	
s   AA/A-'A/r?   r@   rA   r   rB   rC   rD   r/   rk   rl   rm   rn   ro   rp   rq   rr   rF   rG   rs   c                    [         R                  " 0 SU_SU_SU_SU_S[        R                  " U5      _SU_SU_SU_S	U	_S
U
_SU_SU_SU_S[        R                  " U5      _S[        R                  " U5      _S[        R                  " U5      _SU_5      n[         R                  " 0 5      nSUS'   SUS'   U R                  R                  SU R                  UUS9n[        U R                  UU R                  S   S9$ )ru   FriendlyNameChatServiceSidr-   ContactIdentityEnabledr7   Integration.FlowSidIntegration.UrlIntegration.WorkspaceSidIntegration.WorkflowSidIntegration.ChannelIntegration.TimeoutIntegration.PriorityIntegration.CreationOnMessage	LongLivedJanitorEnabledIntegration.RetryCount!application/x-www-form-urlencodedContent-Typer   r   POSTr   r   datar   r:   rT   )	r   r   r   boolean_to_stringrV   rw   r   r   rM   rO   r?   r@   rA   rB   rC   rD   rk   rl   rm   rn   ro   rp   rq   rr   rF   rG   rs   r   r   r9   s                        r,   rw   FlexFlowContext.updaten  s   \ yy "2 | "#3	
 966w? "#3 &'; "? +,E *+C &': &': '(< 01L1L32" Y88D#$ !)"="=o"N%& )*A'
. ))B-"E.--&&tyytW ' 
  wDNN5<QRRr+   c                    #    [         R                  " 0 SU_SU_SU_SU_S[        R                  " U5      _SU_SU_SU_S	U	_S
U
_SU_SU_SU_S[        R                  " U5      _S[        R                  " U5      _S[        R                  " U5      _SU_5      n[         R                  " 0 5      nSUS'   SUS'   U R                  R                  SU R                  UUS9I Sh  vN n[        U R                  UU R                  S   S9$  N&7f)r{   r   r   r-   r   r   r7   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Nr:   rT   )	r   r   r   r   rV   r|   r   r   rM   r   s                        r,   r|   FlexFlowContext.update_async  s    \ yy "2 | "#3	
 966w? "#3 &'; "? +,E *+C &': &': '(< 01L1L32" Y88D#$ !)"="=o"N%& )*A'
. ))B-"E.22tyytW 3 
 
  wDNN5<QRR	
s   C#D%D&'Dc                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )r   r   c              3   H   #    U  H  u  pS R                  X5      v   M     g7fr   r   r   s      r,   r   +FlexFlowContext.__repr__.<locals>.<genexpr>  r   r   z&<Twilio.FlexApi.V1.FlexFlowContext {}>r   r   s     r,   r   FlexFlowContext.__repr__  s6     ((SDNN<P<P<RSS7>>wGGr+   )rM   r   )r    r!   r"   r#   r   r   rJ   r   r\   r`   r   re   ri   r   r   r   r   r   rw   r|   r   r*   r   r   s   @r,   rU   rU     sQ   @ @c @
U 
U
D 

' 
(
#3 
0 -3LL/5||FLll/5||'-|| LL39<<.4ll8>7=||28,,28,,39<<?E||*0,,/5||6<ll)OSS&[)OS  V,OS :FBC	OS
  V,OS tV|$OS  .6
OS $CK0OS sF{+OS $)f#5OS #(V"4OS #3;/OS #3;/OS  $CK0!OS" */tV|)<#OS$ $,'%OS& tV|,'OS( "'sF{!3)OS* 
+OSf -3LL/5||FLll/5||'-|| LL39<<.4ll8>7=||28,,28,,39<<?E||*0,,/5||6<ll)OSS&[)OS  V,OS :FBC	OS
  V,OS tV|$OS  .6
OS $CK0OS sF{+OS $)f#5OS #(V"4OS #3;/OS #3;/OS  $CK0!OS" */tV|)<#OS$ $,'%OS& tV|,'OS( "'sF{!3)OS* 
+OSbH# H Hr+   rU   c                   >    \ rS rSrS\\\4   S\4S jrS\4S jr	Sr
g)FlexFlowPagei  r9   rR   c                 .    [        U R                  U5      $ )zV
Build an instance of FlexFlowInstance

:param payload: Payload response from the API
)r   rV   )rO   r9   s     r,   get_instanceFlexFlowPage.get_instance  s      w77r+   c                     g)r   z <Twilio.FlexApi.V1.FlexFlowPage>r   rW   s    r,   r   FlexFlowPage.__repr__$       2r+   r   N)r    r!   r"   r#   r   r   r   r   r   r   r*   r   r+   r,   r   r     s*    8DcN 87G 82# 2r+   r   c            %       F  ^  \ rS rSrS\4U 4S jjr\R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  4S\S\SSS\	\\
4   S	\	\\
4   S
\	S\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\4$S jjr\R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  \R                  4S\S\SSS\	\\
4   S	\	\\
4   S
\	S\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\	\\
4   S\4$S jjr\R                  SS4S\	\\
4   S\\   S\\   S\\   4S jjr\R                  SS4S\	\\
4   S\\   S\\   S\\   4S jjr\R                  SS4S\	\\
4   S\\   S\\   S\\   4S jjr\R                  SS4S\	\\
4   S\\   S\\   S\\   4S  jjr\R                  \R                  \R                  \R                  4S\	\\
4   S!\	\\
4   S"\	\\
4   S\	\\
4   S\4
S# jjr\R                  \R                  \R                  \R                  4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"$ )-FlexFlowListi-  r8   c                 2   > [         TU ]  U5        SU l        g)zR
Initialize the FlexFlowList

:param version: Version that contains the resource

z
/FlexFlowsN)rI   rJ   r   )rO   r8   rP   s     r,   rJ   FlexFlowList.__init__/  s     	! 	r+   r?   r@   rA   r   rB   rC   rD   r/   rk   rl   rm   rn   ro   rp   rq   rr   rF   rG   rs   rR   c                    [         R                  " 0 SU_SU_SU_SU_S[        R                  " U5      _SU_SU_SU_S	U	_S
U
_SU_SU_SU_S[        R                  " U5      _S[        R                  " U5      _S[        R                  " U5      _SU_5      n[         R                  " SS05      nSUS'   SUS'   U R                  R                  SU R                  UUS9n[        U R                  U5      $ )a	  
Create the FlexFlowInstance

:param friendly_name: A descriptive string that you create to describe the Flex Flow resource.
:param chat_service_sid: The SID of the chat service.
:param channel_type:
:param contact_identity: The channel contact's Identity.
:param enabled: Whether the new Flex Flow is enabled.
:param integration_type:
:param integration_flow_sid: The SID of the Studio Flow. Required when `integrationType` is `studio`.
:param integration_url: The URL of the external webhook. Required when `integrationType` is `external`.
:param integration_workspace_sid: The Workspace SID for a new Task. Required when `integrationType` is `task`.
:param integration_workflow_sid: The Workflow SID for a new Task. Required when `integrationType` is `task`.
:param integration_channel: The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
:param integration_timeout: The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
:param integration_priority: The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
:param integration_creation_on_message: In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
:param long_lived: When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
:param janitor_enabled: When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
:param integration_retry_count: The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.

:returns: The created FlexFlowInstance
r   r   r-   r   r   r7   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   rV   creater   r   r   s                        r,   r   FlexFlowList.create:  s|   \ yy "2 | "#3	
 966w? "#3 &'; "? +,E *+C &': &': '(< 01L1L32" Y88D#$ !)"="=o"N%& )*A'
. ))^-PQR"E.--&&tyytW ' 
  w77r+   c                   #    [         R                  " 0 SU_SU_SU_SU_S[        R                  " U5      _SU_SU_SU_S	U	_S
U
_SU_SU_SU_S[        R                  " U5      _S[        R                  " U5      _S[        R                  " U5      _SU_5      n[         R                  " SS05      nSUS'   SUS'   U R                  R                  SU R                  UUS9I Sh  vN n[        U R                  U5      $  N7f)a*	  
Asynchronously create the FlexFlowInstance

:param friendly_name: A descriptive string that you create to describe the Flex Flow resource.
:param chat_service_sid: The SID of the chat service.
:param channel_type:
:param contact_identity: The channel contact's Identity.
:param enabled: Whether the new Flex Flow is enabled.
:param integration_type:
:param integration_flow_sid: The SID of the Studio Flow. Required when `integrationType` is `studio`.
:param integration_url: The URL of the external webhook. Required when `integrationType` is `external`.
:param integration_workspace_sid: The Workspace SID for a new Task. Required when `integrationType` is `task`.
:param integration_workflow_sid: The Workflow SID for a new Task. Required when `integrationType` is `task`.
:param integration_channel: The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
:param integration_timeout: The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
:param integration_priority: The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
:param integration_creation_on_message: In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
:param long_lived: When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
:param janitor_enabled: When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
:param integration_retry_count: The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.

:returns: The created FlexFlowInstance
r   r   r-   r   r   r7   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   N)r   r   r   r   rV   create_asyncr   r   r   s                        r,   r   FlexFlowList.create_async  s    \ yy "2 | "#3	
 966w? "#3 &'; "? +,E *+C &': &': '(< 01L1L32" Y88D#$ !)"="=o"N%& )*A'
. ))^-PQR"E.22tyytW 3 
 
  w77	
s   C%D'D(DNlimit	page_sizec                     U R                   R                  X#5      nU R                  XS   S9nU R                   R                  XTS   5      $ )aP  
Streams FlexFlowInstance 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 str friendly_name: The `friendly_name` of the Flex Flow resources to read.
: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   )rV   read_limitspagestreamrO   r?   r   r   limitsr   s         r,   r   FlexFlowList.stream  sF    , **5<yy}{@SyT}}##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 FlexFlowInstance 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 str friendly_name: The `friendly_name` of the Flex Flow resources to read.
: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   )rV   r   
page_asyncstream_asyncr   s         r,   r   FlexFlowList.stream_async  s[     , **5<__'+3F % 
 
 }}))$w@@	
s   1AA#Ac                 6    [        U R                  UUUS95      $ )a  
Lists FlexFlowInstance records from the API as a list.
Unlike stream(), this operation is eager and will load `limit` records into
memory before returning.

:param str friendly_name: The `friendly_name` of the Flex Flow resources to read.
: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   )rO   r?   r   r   s       r,   r   FlexFlowList.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)a  
Asynchronously lists FlexFlowInstance records from the API as a list.
Unlike stream(), this operation is eager and will load `limit` records into
memory before returning.

:param str friendly_name: The `friendly_name` of the Flex Flow resources to read.
: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   )rO   r?   r   r   records        r,   
list_asyncFlexFlowList.list_async1  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                  U5      $ )a  
Retrieve a single page of FlexFlowInstance records from the API.
Request is executed immediately

:param friendly_name: The `friendly_name` of the Flex Flow resources to read.
: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 FlexFlowInstance
r   	PageTokenr   PageSizer   r   r   r   r   r   r   paramsr   )r   r   rV   r   r   r   rO   r?   r   r   r   r   r   responses           r,   r   FlexFlowList.pageO  sz    $ yy -'#%	
 ))^-PQR.==%%dii & 
 DMM844r+   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                  U5      $  N7f)	a  
Asynchronously retrieve a single page of FlexFlowInstance records from the API.
Request is executed immediately

:param friendly_name: The `friendly_name` of the Flex Flow resources to read.
: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 FlexFlowInstance
r   r   r   r   r   r   r   N)r   r   rV   r   r   r   r  s           r,   r   FlexFlowList.page_asyncs  s     $ yy -'#%	
 ))^-PQR.11dii 2 
 
 DMM844
s   A!B #A>$B 
target_urlc                     U R                   R                  R                  R                  SU5      n[	        U R                   U5      $ )z
Retrieve a specific page of FlexFlowInstance records from the API.
Request is executed immediately

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

:returns: Page of FlexFlowInstance
r   )rV   domaintwiliorequestr   rO   r  r  s      r,   get_pageFlexFlowList.get_page  s7     ==''..66ujIDMM844r+   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 FlexFlowInstance records from the API.
Request is executed immediately

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

:returns: Page of FlexFlowInstance
r   N)rV   r  r	  request_asyncr   r  s      r,   get_page_asyncFlexFlowList.get_page_async  sC      --44BB5*UUDMM844 Vs   4AAAr:   c                 *    [        U R                  US9$ zX
Constructs a FlexFlowContext

:param sid: The SID of the Flex Flow resource to update.
rT   rU   rV   rO   r:   s     r,   rK   FlexFlowList.get       t}}#66r+   c                 *    [        U R                  US9$ r  r  r  s     r,   __call__FlexFlowList.__call__  r  r+   c                     g)r   z <Twilio.FlexApi.V1.FlexFlowList>r   rW   s    r,   r   FlexFlowList.__repr__  r   r+   )r   )#r    r!   r"   r#   r   rJ   r   r   r   r   r   r   r   r   r   r   r   r	   r   r
   r   r   r   r   r   r   r   r  r  rU   rK   r  r   r*   r   r   s   @r,   r   r   -  s   	! 	!  06||'-|| LL39<<.4ll8>7=||28,,28,,39<<?E||*0,,/5||6<ll)O8O8 O8 5	O8
  V,O8 tV|$O8  .6
O8 $CK0O8 sF{+O8 $)f#5O8 #(V"4O8 #3;/O8 #3;/O8  $CK0!O8" */tV|)<#O8$ $,'%O8& tV|,'O8( "'sF{!3)O8* 
+O8l 06||'-|| LL39<<.4ll8>7=||28,,28,,39<<?E||*0,,/5||6<ll)O8O8 O8 5	O8
  V,O8 tV|$O8  .6
O8 $CK0O8 sF{+O8 $)f#5O8 #(V"4O8 #3;/O8 #3;/O8  $CK0!O8" */tV|)<#O8$ $,'%O8& tV|,'O8( "'sF{!3)O8* 
+O8f -3LL##'	;S&[); }; C=	;
 
"	#;: -3LL##'	AS&[)A }A C=	A
 
'	(A> -3LL##'	
S&[)
 }
 C=	

 
	
> -3LL##'	
S&[)
 }
 C=	

 
	
@ -3LL)/*0,,(."5S&[)"5 #v+&"5 3;'	"5
 f%"5 
"5L -3LL)/*0,,(."5S&[)"5 #v+&"5 3;'	"5
 f%"5 
"5H
53 
5< 
5
5s 
5| 
57s 7 77C 7O 72# 2 2r+   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   rU   r   r   r   r+   r,   <module>r%     sj     L L L 6 6 8 : 2 ' !}I' }I@~Ho ~HB24 2&X2< X2r+   