
    gxj                         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 - Taskrouter
 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\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&                  4S\\\4   SS 4S jjr\R&                  4S\\\4   SS 4S jjrS\4S jrSrU =r$ )ActivityInstance   a  
:ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Activity resource.
:ivar available: Whether the Worker is eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` indicates the Activity is available. All other values indicate that it is not. The value cannot be changed after the Activity is created.
:ivar date_created: The date and time in GMT when the resource 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 resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
:ivar friendly_name: The string that you assigned to describe the Activity resource.
:ivar sid: The unique string that we created to identify the Activity resource.
:ivar workspace_sid: The SID of the Workspace that contains the Activity.
:ivar url: The absolute URL of the Activity resource.
:ivar links:
versionpayloadworkspace_sidsidc                 H  > [         TU ]  U5        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        UR                  S5      U l        UR                  S	5      U l        UU=(       d    U R                  S
.U l        S U l        g )Naccount_sid	availabledate_createddate_updatedfriendly_namer   r   urllinksr   r   )super__init__getr   r   r   iso8601_datetimer   r   r   r   r   r    r!   	_solution_context)selfr   r   r   r   	__class__s        t/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/twilio/rest/taskrouter/v1/workspace/activity.pyr$   ActivityInstance.__init__&   s     	!*1++m*D)0[)A0;0L0LKK'1
 1<0L0LKK'1
 -4KK,H")++e"4,3KK,H")++e"429++g2F
 +?$((
 48    returnc                     U R                   c4  [        U R                  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: ActivityContext for this ActivityInstance
r   r   r"   )r(   ActivityContext_versionr'   r)   s    r+   _proxyActivityInstance._proxyC   sE     == +"nn_=NN5)DM
 }}r-   c                 6    U R                   R                  5       $ )S
Deletes the ActivityInstance


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


:returns: True if delete succeeds, False otherwise
N)r3   delete_asyncr2   s    r+   r;   ActivityInstance.delete_async\   s       [[--////   '%'c                 6    U R                   R                  5       $ )E
Fetch the ActivityInstance


:returns: The fetched ActivityInstance
)r3   fetchr2   s    r+   r@   ActivityInstance.fetche   s     {{  ""r-   c                 R   #    U R                   R                  5       I Sh  vN $  N7f)_
Asynchronous coroutine to fetch the ActivityInstance


:returns: The fetched ActivityInstance
N)r3   fetch_asyncr2   s    r+   rD   ActivityInstance.fetch_asyncn   s       [[,,....r=   r   c                 4    U R                   R                  US9$ )  
Update the ActivityInstance

:param friendly_name: A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`.

:returns: The updated ActivityInstance
r   )r3   updater)   r   s     r+   rI   ActivityInstance.updatew   s#     {{!!' " 
 	
r-   c                 P   #    U R                   R                  US9I Sh  vN $  N7f)  
Asynchronous coroutine to update the ActivityInstance

:param friendly_name: A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`.

:returns: The updated ActivityInstance
rH   N)r3   update_asyncrJ   s     r+   rN   ActivityInstance.update_async   s0      [[--' . 
 
 	
 
s   &$&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>,ActivityInstance.__repr__.<locals>.<genexpr>         S<RDA7>>!//<R    "z*<Twilio.Taskrouter.V1.ActivityInstance {}>joinr'   itemsrV   r)   contexts     r+   __repr__ActivityInstance.__repr__   s6     ((SDNN<P<P<RSS;BB7KKr-   )r(   r'   r   r   r   r   r   r!   r   r    r   )N)r.   r0   )r.   r   )__name__
__module____qualname____firstlineno____doc__r   r   strr   r   r$   propertyr3   boolr7   r;   r@   rD   r   unsetr   objectrI   rN   rd   __static_attributes____classcell__r*   s   @r+   r   r      s    
" "88 c3h8 	8
 c]8 8:  $ $0D 0#/ 39,,
"3;/
	
 39,,
"3;/
	
L# L Lr-   r   c                      ^  \ rS rSr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                  4S\\\4   S\
4S jjr\R                  4S\\\4   S\
4S jjrS\4S jrSrU =r$ )r0      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)z
Initialize the ActivityContext

:param version: Version that contains the resource
:param workspace_sid: The SID of the Workspace with the Activity resources to update.
:param sid: The SID of the Activity resource to update.
r"   z,/Workspaces/{workspace_sid}/Activities/{sid}N r#   r$   r'   rV   _uri)r)   r   r   r   r*   s       r+   r$   ActivityContext.__init__   sD     	! +
 CII 
nn
	r-   r.   c                 x    [         R                  " 0 5      nU R                  R                  SU R                  US9$ )r6   DELETEmethoduriheaders)r   ofr1   r7   rx   r)   r   s     r+   r7   ActivityContext.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   r1   r;   rx   r   s     r+   r;   ActivityContext.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   S9$ )r?   application/jsonAcceptGETr|   r   r   r"   )r   r   r1   r@   rx   r   r'   r)   r   r   s      r+   r@   ActivityContext.fetch   si     ))B-.--%%U		7%SMM..9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   S9$  N47f)	rC   r   r   r   r|   Nr   r   r"   )r   r   r1   rD   rx   r   r'   r   s      r+   rD   ActivityContext.fetch_async   s}      ))B-.11dii 2 
 
  MM..9u%	
 	
	
s   AA=A;5A=r   c                    [         R                  " SU05      n[         R                  " 0 5      nSUS'   SUS'   U R                  R                  SU R                  X#S9n[        U R                  UU R                  S   U R                  S	   S
9$ )rG   FriendlyName!application/x-www-form-urlencodedContent-Typer   r   POSTr}   r~   datar   r   r   r"   )r   r   r1   rI   rx   r   r'   r)   r   r   r   r   s        r+   rI   ActivityContext.update   s     yy

 ))B-"E.--&&tyyt ' 
  MM..9u%	
 	
r-   c                 8  #    [         R                  " SU05      n[         R                  " 0 5      nSUS'   SUS'   U R                  R                  SU R                  X#S9I Sh  vN n[        U R                  UU R                  S	   U R                  S
   S9$  N47f)rM   r   r   r   r   r   r   r   Nr   r   r"   )r   r   r1   rN   rx   r   r'   r   s        r+   rN   ActivityContext.update_async  s      yy

 ))B-"E.22tyyt 3 
 
  MM..9u%	
 	
	
s   A!B#B$5Bc                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )rQ   rR   c              3   H   #    U  H  u  pS R                  X5      v   M     g7frT   rU   rW   s      r+   r[   +ActivityContext.__repr__.<locals>.<genexpr>@  r]   r^   z)<Twilio.Taskrouter.V1.ActivityContext {}>r_   rb   s     r+   rd   ActivityContext.__repr__:  s6     ((SDNN<P<P<RSS:AA'JJr-   r'   rx   )rf   rg   rh   ri   r   rk   r$   rm   r7   r;   r   r@   rD   r   rn   r   ro   rI   rN   rd   rp   rq   rr   s   @r+   r0   r0      s    
 
 
# 
&
U 
U
D 

' 
*
#3 
0 39,,
"3;/
	
D 39,,
"3;/
	
BK# K Kr-   r0   c                   >    \ rS rSrS\\\4   S\4S jrS\4S jr	Sr
g)ActivityPageiD  r   r.   c                 D    [        U R                  XR                  S   S9$ )zV
Build an instance of ActivityInstance

:param payload: Payload response from the API
r   r   )r   r1   r'   )r)   r   s     r+   get_instanceActivityPage.get_instanceF  s#      MM7..2Q
 	
r-   c                     g)rQ   z#<Twilio.Taskrouter.V1.ActivityPage>rv   r2   s    r+   rd   ActivityPage.__repr__P       5r-   rv   N)rf   rg   rh   ri   r   rk   r   r   r   rd   rp   rv   r-   r+   r   r   D  s*    
DcN 
7G 
5# 5r-   r   c                   j  ^  \ rS rSrS\S\4U 4S jjr\R                  4S\S\	\
\4   S\4S jjr\R                  4S\S\	\
\4   S\4S	 jjr\R                  \R                  S
S
4S\	\\4   S\	\\4   S\\   S\\   S\\   4
S jjr\R                  \R                  S
S
4S\	\\4   S\	\\4   S\\   S\\   S\\   4
S jjr\R                  \R                  S
S
4S\	\\4   S\	\\4   S\\   S\\   S\\   4
S jjr\R                  \R                  S
S
4S\	\\4   S\	\\4   S\\   S\\   S\\   4
S jjr\R                  \R                  \R                  \R                  \R                  4S\	\\4   S\	\\4   S\	\\4   S\	\\4   S\	\\4   S\4S jjr\R                  \R                  \R                  \R                  \R                  4S\	\\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"$ )ActivityListiY  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 ActivityList

:param version: Version that contains the resource
:param workspace_sid: The SID of the Workspace with the Activity resources to read.

r   z&/Workspaces/{workspace_sid}/ActivitiesNrv   rw   )r)   r   r   r*   s      r+   r$   ActivityList.__init__[  s=     	! ]
 =CCUdnnU	r-   r   r   r.   c                 ,   [         R                  " 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                  X4S9n[        U R                  XPR                  S   S	9$ )
a  
Create the ActivityInstance

:param friendly_name: A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`.
:param available: Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created.

:returns: The created ActivityInstance
r   	Availabler   r   r   r   r   r   r   r   )	r   r   r   boolean_to_stringr1   createrx   r   r'   r)   r   r   r   r   r   s         r+   r   ActivityList.createk  s     yy -&88C
 ))^-PQR"E.--&&tyyt ' 
  MM7..2Q
 	
r-   c                 H  #    [         R                  " 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                  X4S9I Sh  vN n[        U R                  XPR                  S	   S
9$  N%7f)a  
Asynchronously create the ActivityInstance

:param friendly_name: A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`.
:param available: Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created.

:returns: The created ActivityInstance
r   r   r   r   r   r   r   Nr   r   )	r   r   r   r   r1   create_asyncrx   r   r'   r   s         r+   r   ActivityList.create_async  s      yy -&88C
 ))^-PQR"E.22tyyt 3 
 
  MM7..2Q
 	
	
s   A8B":B ;&B"Nlimit	page_sizec                     U R                   R                  X45      nU R                  UUUS   S9nU R                   R                  XeS   5      $ )a`  
Streams ActivityInstance 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 Activity resources to read.
:param str available: Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable.
: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   r   )r1   read_limitspagestreamr)   r   r   r   r   limitsr   s          r+   r   ActivityList.stream  sT    0 **5<yy'[)  
 }}##D/::r-   c                    #    U R                   R                  X45      nU R                  UUUS   S9I Sh  vN nU R                   R                  XeS   5      $  N"7f)ao  
Asynchronously streams ActivityInstance 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 Activity resources to read.
:param str available: Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable.
: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   )r1   r   
page_asyncstream_asyncr   s          r+   r   ActivityList.stream_async  sa     0 **5<__'[) % 
 
 }}))$w@@
s   3AA#Ac           	      8    [        U R                  UUUUS95      $ )a  
Lists ActivityInstance 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 Activity resources to read.
:param str available: Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable.
: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   r   )listr   )r)   r   r   r   r   s        r+   r   ActivityList.list  s.    . KK+##	  
 	
r-   c                 z   #    U R                  U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 ActivityInstance 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 Activity resources to read.
:param str available: Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable.
: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   r   records         r+   
list_asyncActivityList.list_async  sW     2 '+&7&7+##	 '8 ' ! !
 
 !
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     [         R                  " UUUUUS.5      n[         R                  " SS05      nSUS'   U R                  R                  SU R                  XgS9n[        U R                  XR                  5      $ )a  
Retrieve a single page of ActivityInstance records from the API.
Request is executed immediately

:param friendly_name: The `friendly_name` of the Activity resources to read.
:param available: Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable.
: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 ActivityInstance
r   r   	PageTokenr   PageSizer   r   r   r   r   r}   r~   paramsr   )r   r   r1   r   rx   r   r'   	r)   r   r   r   r   r   r   r   responses	            r+   r   ActivityList.page.  s    ( yy -&'#%
 ))^-PQR.==%%dii & 
 DMM8^^DDr-   c                   #    [         R                  " UUUUUS.5      n[         R                  " SS05      nSUS'   U R                  R                  SU R                  XgS9I Sh  vN n[        U R                  XR                  5      $  N$7f)	a  
Asynchronously retrieve a single page of ActivityInstance records from the API.
Request is executed immediately

:param friendly_name: The `friendly_name` of the Activity resources to read.
:param available: Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable.
: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 ActivityInstance
r   r   r   r   r   r   r   N)r   r   r1   r   rx   r   r'   r   s	            r+   r   ActivityList.page_asyncU  s     ( yy -&'#%
 ))^-PQR.11dii 2 
 
 DMM8^^DD
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 ActivityInstance records from the API.
Request is executed immediately

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

:returns: Page of ActivityInstance
r   )r1   domaintwiliorequestr   r'   r)   r   r   s      r+   get_pageActivityList.get_page|  s;     ==''..66ujIDMM8^^DDr-   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 ActivityInstance records from the API.
Request is executed immediately

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

:returns: Page of ActivityInstance
r   N)r1   r   r   request_asyncr   r'   r   s      r+   get_page_asyncActivityList.get_page_async  sG      --44BB5*UUDMM8^^DD Vs   4AA%Ar   c                 F    [        U R                  U R                  S   US9$ zW
Constructs a ActivityContext

:param sid: The SID of the Activity resource to update.
r   r"   r0   r1   r'   r)   r   s     r+   r%   ActivityList.get  %     MM)Hc
 	
r-   c                 F    [        U R                  U R                  S   US9$ r   r   r   s     r+   __call__ActivityList.__call__  r   r-   c                     g)rQ   z#<Twilio.Taskrouter.V1.ActivityList>rv   r2   s    r+   rd   ActivityList.__repr__  r   r-   r   )#rf   rg   rh   ri   r   rk   r$   r   rn   r   rm   ro   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r0   r%   r   rd   rp   rq   rr   s   @r+   r   r   Y  s   V V V" DJ<<
 
-24<-@
	
B DJ<<
 
-24<-@
	
D -3LL(.##';S&[); f%; }	;
 C=; 
"	#;F -3LL(.##'AS&[)A f%A }	A
 C=A 
'	(AF -3LL(.##'
S&[)
 f%
 }	

 C=
 
	
D -3LL(.##'
S&[)
 f%
 }	

 C=
 
	
F -3LL(.)/*0,,(.%ES&[)%E f%%E #v+&	%E
 3;'%E f%%E 
%ER -3LL(.)/*0,,(.%ES&[)%E f%%E #v+&	%E
 3;'%E f%%E 
%EN
E3 
E< 
E
Es 
E| 
E
s 
 

C 
O 
5# 5 5r-   r   N)rj   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   r0   r   r   rv   r-   r+   <module>r      sj     L L L 6 6 8 : 2 ' !AL' ALHdKo dKN54 5*U5< U5r-   