
    gZN                         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 - Ip_messaging
 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\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S\\   S	S 4S jrS\\   S	S 4S jrS	\4S jrSrU =r$ )RoleInstance   c                       \ rS rSrSrSrSrg)RoleInstance.RoleType   channel
deployment N)__name__
__module____qualname____firstlineno__CHANNEL
DEPLOYMENT__static_attributes__r       p/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/twilio/rest/ip_messaging/v2/service/role.pyRoleTyper      s    !
r#   r%   versionpayloadservice_sidsidc                 H  > [         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U=(       d    U R                  S
.U l        S U l        g )Nr)   account_sidr(   friendly_nametypepermissionsdate_createddate_updatedurlr(   r)   )super__init__getr)   r+   r(   r,   r-   r.   r   iso8601_datetimer/   r0   r1   	_solution_context)selfr&   r'   r(   r)   	__class__s        r$   r4   RoleInstance.__init__+   s     	!")++e"4*1++m*D*1++m*D,3KK,H7>{{67J	07M0J0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4 '?$((
 04r#   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: RoleContext for this RoleInstance
r(   r)   r2   )r8   RoleContext_versionr7   r9   s    r$   _proxyRoleInstance._proxyH   sE     == ' NN=9NN5)DM
 }}r#   c                 6    U R                   R                  5       $ )O
Deletes the RoleInstance


:returns: True if delete succeeds, False otherwise
)rA   deleter@   s    r$   rE   RoleInstance.deleteX   s     {{!!##r#   c                 R   #    U R                   R                  5       I Sh  vN $  N7f)k
Asynchronous coroutine that deletes the RoleInstance


:returns: True if delete succeeds, False otherwise
N)rA   delete_asyncr@   s    r$   rI   RoleInstance.delete_asynca   s       [[--////   '%'c                 6    U R                   R                  5       $ )=
Fetch the RoleInstance


:returns: The fetched RoleInstance
)rA   fetchr@   s    r$   rN   RoleInstance.fetchj   s     {{  ""r#   c                 R   #    U R                   R                  5       I Sh  vN $  N7f)W
Asynchronous coroutine to fetch the RoleInstance


:returns: The fetched RoleInstance
N)rA   fetch_asyncr@   s    r$   rR   RoleInstance.fetch_asyncs   s       [[,,....rK   
permissionc                 4    U R                   R                  US9$ )Q
Update the RoleInstance

:param permission:

:returns: The updated RoleInstance
rT   )rA   updater9   rT   s     r$   rX   RoleInstance.update|   s#     {{!!! " 
 	
r#   c                 P   #    U R                   R                  US9I Sh  vN $  N7f)k
Asynchronous coroutine to update the RoleInstance

:param permission:

:returns: The updated RoleInstance
rW   N)rA   update_asyncrY   s     r$   r]   RoleInstance.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>(RoleInstance.__repr__.<locals>.<genexpr>         S<RDA7>>!//<R    "z'<Twilio.IpMessaging.V2.RoleInstance {}>joinr7   itemsre   r9   contexts     r$   __repr__RoleInstance.__repr__   s6     ((SDNN<P<P<RSS8??HHr#   )r8   r7   r+   r/   r0   r,   r.   r(   r)   r-   r1   N)r<   r>   )r<   r   )r   r   r   r   objectr%   r   r   strr   r   r4   propertyrA   boolrE   rI   rN   rR   r   rX   r]   rs   r"   __classcell__r:   s   @r$   r   r      s    "6 "
" "44 c3h4 	4
 c]4 4:  $ $0D 0#/

c 

~ 



T#Y 

> 

I# I I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S\\   S\
4S jrS\\   S\
4S jrS\4S jrSrU =r$ )r>      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)zp
Initialize the RoleContext

:param version: Version that contains the resource
:param service_sid:
:param sid:
r2   z#/Services/{service_sid}/Roles/{sid}Nr   r3   r4   r7   re   _uri)r9   r&   r(   r)   r:   s       r$   r4   RoleContext.__init__   s>     	! '
 :@@R4>>R	r#   r<   c                 x    [         R                  " 0 5      nU R                  R                  SU R                  US9$ )rD   DELETEmethoduriheaders)r   ofr?   rE   r   r9   r   s     r$   rE   RoleContext.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)rH   r   r   N)r   r   r?   rI   r   r   s     r$   rI   RoleContext.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$ )rM   application/jsonAcceptGETr   r(   r)   r2   )r   r   r?   rN   r   r   r7   r9   r   r'   s      r$   rN   RoleContext.fetch   si     ))B-.--%%U		7%SMM}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   S9$  N47f)	rQ   r   r   r   r   Nr(   r)   r2   )r   r   r?   rR   r   r   r7   r   s      r$   rR   RoleContext.fetch_async   s}      ))B-.11dii 2 
 
 MM}5u%	
 	
	
s   AA=A;5A=rT   c                 H   [         R                  " S[        R                  " US 5      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$ )rV   
Permissionc                     U $ ru   r   es    r$   <lambda>$RoleContext.update.<locals>.<lambda>      !r#   !application/x-www-form-urlencodedContent-Typer   r   POSTr   r   datar   r(   r)   r2   )	r   r   r   mapr?   rX   r   r   r7   r9   rT   r   r   r'   s        r$   rX   RoleContext.update   s     yyimmJD

 ))B-"E.--&&tyyt ' 
 MM}5u%	
 	
r#   c                 d  #    [         R                  " S[        R                  " US 5      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)r\   r   c                     U $ ru   r   r   s    r$   r   *RoleContext.update_async.<locals>.<lambda>!  r   r#   r   r   r   r   r   r   Nr(   r)   r2   )	r   r   r   r   r?   r]   r   r   r7   r   s        r$   r]   RoleContext.update_async  s      yyimmJD

 ))B-"E.22tyyt 3 
 
 MM}5u%	
 	
	
s   A7B09B.:5B0c                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )r`   ra   c              3   H   #    U  H  u  pS R                  X5      v   M     g7frc   rd   rf   s      r$   rj   'RoleContext.__repr__.<locals>.<genexpr>;  rl   rm   z&<Twilio.IpMessaging.V2.RoleContext {}>rn   rq   s     r$   rs   RoleContext.__repr__5  s6     ((SDNN<P<P<RSS7>>wGGr#   r7   r   )r   r   r   r   r   rw   r4   ry   rE   rI   r   rN   rR   r   rX   r]   rs   r"   rz   r{   s   @r$   r>   r>      s    S Sc S S"
U 
U
D 

| 
*
< 
.
c 
| 
>
T#Y 
< 
>H# H Hr#   r>   c                   >    \ rS rSrS\\\4   S\4S jrS\4S jr	Sr
g)RolePagei?  r'   r<   c                 D    [        U R                  XR                  S   S9$ )zR
Build an instance of RoleInstance

:param payload: Payload response from the API
r(   r(   )r   r?   r7   )r9   r'   s     r$   get_instanceRolePage.get_instanceA  s#     MM7}0M
 	
r#   c                     g)r`   z <Twilio.IpMessaging.V2.RolePage>r   r@   s    r$   rs   RolePage.__repr__K       2r#   r   N)r   r   r   r   r   rw   r   r   r   rs   r"   r   r#   r$   r   r   ?  s)    
DcN 
| 
2# 2r#   r   c            	         ^  \ rS rSrS\S\4U 4S jjrS\SSS\\   S	\4S
 jr	S\SSS\\   S	\4S 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!$ )RoleListiT  r&   r(   c                 x   > [         TU ]  U5        SU0U l        SR                  " S0 U R                  D6U l        g)zb
Initialize the RoleList

:param version: Version that contains the resource
:param service_sid:

r(   z/Services/{service_sid}/RolesNr   r   )r9   r&   r(   r:   s      r$   r4   RoleList.__init__V  s=     	! ;
 4::LT^^L	r#   r,   r-   r   rT   r<   c                 2   [         R                  " UU[        R                  " US 5      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                  X`R                  S	   S
9$ )zt
Create the RoleInstance

:param friendly_name:
:param type:
:param permission:

:returns: The created RoleInstance
c                     U $ ru   r   r   s    r$   r   !RoleList.create.<locals>.<lambda>w  r   r#   FriendlyNameTyper   r   r   r   r   r   r   r(   r   )	r   r   r   r   r?   creater   r   r7   r9   r,   r-   rT   r   r   r'   s          r$   r   RoleList.createf  s     yy -'mmJD
 ))^-PQR"E.--&&tyyt ' 
 MM7}0M
 	
r#   c                 N  #    [         R                  " UU[        R                  " US 5      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                  X`R                  S
   S9$  N%7f)z
Asynchronously create the RoleInstance

:param friendly_name:
:param type:
:param permission:

:returns: The created RoleInstance
c                     U $ ru   r   r   s    r$   r   'RoleList.create_async.<locals>.<lambda>  r   r#   r   r   r   r   r   r   r   Nr(   r   )	r   r   r   r   r?   create_asyncr   r   r7   r   s          r$   r   RoleList.create_async  s      yy -'mmJD
 ))^-PQR"E.22tyyt 3 
 
 MM7}0M
 	
	
s   A;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 RoleInstance 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   )r?   read_limitspagestreamr9   r   r   limitsr   s        r$   r   RoleList.stream  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 RoleInstance 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   )r?   r   
page_asyncstream_asyncr   s        r$   r   RoleList.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 RoleInstance 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   )r9   r   r   s      r$   r   RoleList.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 RoleInstance 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   )r9   r   r   records       r$   
list_asyncRoleList.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                  X`R                  5      $ )a5  
Retrieve a single page of RoleInstance 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 RoleInstance
	PageTokenr   PageSizer   r   r   r   r   r   r   paramsr   )r   r   r?   r   r   r   r7   r9   r   r   r   r   r   responses          r$   r   RoleList.page  s{      yy'#%
 ))^-PQR.==%%dii & 
 x@@r#   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                  X`R                  5      $  N$7f)	aD  
Asynchronously retrieve a single page of RoleInstance 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 RoleInstance
r   r   r   r   r   r   r   N)r   r   r?   r   r   r   r7   r   s          r$   r   RoleList.page_async2  s       yy'#%
 ))^-PQR.11dii 2 
 
 x@@
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 RoleInstance records from the API.
Request is executed immediately

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

:returns: Page of RoleInstance
r   )r?   domaintwiliorequestr   r7   r9   r   r   s      r$   get_pageRoleList.get_pageS  s;     ==''..66ujIx@@r#   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 RoleInstance records from the API.
Request is executed immediately

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

:returns: Page of RoleInstance
r   N)r?   r   r   request_asyncr   r7   r   s      r$   get_page_asyncRoleList.get_page_async_  sG      --44BB5*UUx@@ Vs   4AA%Ar)   c                 F    [        U R                  U R                  S   US9$ z'
Constructs a RoleContext

:param sid:
r(   r2   r>   r?   r7   r9   r)   s     r$   r5   RoleList.getk  %     MMt~~m'D#
 	
r#   c                 F    [        U R                  U R                  S   US9$ r   r   r   s     r$   __call__RoleList.__call__u  r   r#   c                     g)r`   z <Twilio.IpMessaging.V2.RoleList>r   r@   s    r$   rs   RoleList.__repr__  r   r#   r   )NN)"r   r   r   r   r   rw   r4   r   r   r   r   r   intr	   r   r
   r   r   r   r   unsetr   rv   r   r   r   r   r   r>   r5   r   rs   r"   rz   r{   s   @r$   r   r   T  st   M Mc M  
  
(? 
MQRUY 
	 
D 
  
(? 
MQRUY 
	 
H  $#';}; C=; 
,		;6  $#'A}A C=A 
|	$	A6  $#'
}
 C=
 
l		
8  $#'
}
 C=
 
l		
: *0*0,,(.	A#v+&A 3;'A f%	A
 
AF *0*0,,(.	A#v+&A 3;'A f%	A
 
AB
A3 
A8 
A
As 
Ax 
A
s 
{ 

C 
K 
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   r>   r   r   r   r#   r$   <module>r     sj     L L L 6 6 8 : 2 ' !BI# BIJ^H/ ^HB2t 2*q2| q2r#   