
    g .                         S r SSKJr  SSK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
\5      r " S S\5      r " S S\5      rg)a  
 This code was generated by
___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
 |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
 |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

 Twilio - Iam
 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OptionalUnion)deserialize	serializevalues)InstanceContext)InstanceResource)ListResource)Versionc                   X  ^  \ 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\R&                  \R&                  4S\\\4   S\\\4   SS 4S jjr\R&                  \R&                  4S\\\4   S\\\4   SS 4S jjrS\4S jrSrU =r$ )ApiKeyInstance   a  
:ivar sid: The unique string that we created to identify the Key resource.
:ivar friendly_name: The string that you assigned to describe the resource.
:ivar date_created: The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
:ivar date_updated: The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
:ivar policy: The \`Policy\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
versionpayloadsidc                   > [         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	        SU=(       d    U R                  0U l
        S U l        g )Nr   friendly_namedate_createddate_updatedpolicy)super__init__getr   r   r   rfc2822_datetimer   r   r   	_solution_context)selfr   r   r   	__class__s       b/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/twilio/rest/iam/v1/api_key.pyr   ApiKeyInstance.__init__!   s     	!")++e"4,3KK,H0;0L0LKK'1
 1<0L0LKK'1
 4;;;x3H 3?$((
 26    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: ApiKeyContext for this ApiKeyInstance
r   r   )r   ApiKeyContext_versionr   r    s    r"   _proxyApiKeyInstance._proxy5   s9     == )NN5)DM }}r$   c                 6    U R                   R                  5       $ )Q
Deletes the ApiKeyInstance


:returns: True if delete succeeds, False otherwise
)r+   deleter*   s    r"   r/   ApiKeyInstance.deleteD   s     {{!!##r$   c                 R   #    U R                   R                  5       I Sh  vN $  N7f)m
Asynchronous coroutine that deletes the ApiKeyInstance


:returns: True if delete succeeds, False otherwise
N)r+   delete_asyncr*   s    r"   r3   ApiKeyInstance.delete_asyncM   s       [[--////   '%'c                 6    U R                   R                  5       $ )A
Fetch the ApiKeyInstance


:returns: The fetched ApiKeyInstance
)r+   fetchr*   s    r"   r8   ApiKeyInstance.fetchV   s     {{  ""r$   c                 R   #    U R                   R                  5       I Sh  vN $  N7f)[
Asynchronous coroutine to fetch the ApiKeyInstance


:returns: The fetched ApiKeyInstance
N)r+   fetch_asyncr*   s    r"   r<   ApiKeyInstance.fetch_async_   s       [[,,....r5   r   r   c                 6    U R                   R                  UUS9$ )  
Update the ApiKeyInstance

:param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
:param policy: The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).

:returns: The updated ApiKeyInstance
r   r   )r+   updater    r   r   s      r"   rA   ApiKeyInstance.updateh   s&     {{!!' " 
 	
r$   c                 R   #    U R                   R                  UUS9I Sh  vN $  N7f)0  
Asynchronous coroutine to update the ApiKeyInstance

:param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
:param policy: The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).

:returns: The updated ApiKeyInstance
r@   N)r+   update_asyncrB   s      r"   rF   ApiKeyInstance.update_asyncz   s3      [[--' . 
 
 	
 
r5   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>*ApiKeyInstance.__repr__.<locals>.<genexpr>         S<RDA7>>!//<R    "z!<Twilio.Iam.V1.ApiKeyInstance {}>joinr   itemsrN   r    contexts     r"   __repr__ApiKeyInstance.__repr__   s6     ((SDNN<P<P<RSS299'BBr$   )r   r   r   r   r   r   r   )N)r%   r(   )r%   r   )__name__
__module____qualname____firstlineno____doc__r   r   strr   r   r   propertyr+   boolr/   r3   r8   r<   r
   unsetr   objectrA   rF   r\   __static_attributes____classcell__r!   s   @r"   r   r      s    OS66)-c3h6>Fsm6 6(  $ $0D 0#/ -3LL(.
S&[)
 ffn%
 
	
( -3LL(.
S&[)
 ffn%
 
	
$C# C Cr$   r   c                   .  ^  \ 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                  4S
\\\4   S\\\4   S\
4S jjr\R                  \R                  4S
\\\4   S\\\4   S\
4S jjrS\4S jrSrU =r$ )r(      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 ApiKeyContext

:param version: Version that contains the resource
:param sid: The Twilio-provided string that uniquely identifies the Key resource to update.
r   z/Keys/{sid}N )r   r   r   rN   _uri)r    r   r   r!   s      r"   r   ApiKeyContext.__init__   s=     	! 3
 "((:4>>:	r$   r%   c                 x    [         R                  " 0 5      nU R                  R                  SU R                  US9$ )r.   DELETEmethoduriheaders)r
   ofr)   r/   ro   r    rv   s     r"   r/   ApiKeyContext.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)r2   rr   rs   N)r
   rw   r)   r3   ro   rx   s     r"   r3   ApiKeyContext.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$ )r7   application/jsonAcceptGETrs   r   r'   )r
   rw   r)   r8   ro   r   r   r    rv   r   s      r"   r8   ApiKeyContext.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)r;   r}   r~   r   rs   Nr   r'   )r
   rw   r)   r<   ro   r   r   r   s      r"   r<   ApiKeyContext.fetch_async   sq      ))B-.11dii 2 
 
 MMu%
 	
	
s   AA/A-'A/r   r   c                 (   [         R                  " U[        R                  " U5      S.5      n[         R                  " 0 5      nSUS'   SUS'   U R                  R                  SU R                  X4S9n[        U R                  XPR                  S   S	9$ )
r?   FriendlyNamePolicy!application/x-www-form-urlencodedContent-Typer}   r~   POSTrt   ru   datarv   r   r'   )	r
   rw   r	   rg   r)   rA   ro   r   r   r    r   r   r   rv   r   s         r"   rA   ApiKeyContext.update   s     yy -#**62
 ))B-"E.--&&tyyt ' 
 dmmW..:OPPr$   c                 D  #    [         R                  " U[        R                  " U5      S.5      n[         R                  " 0 5      nSUS'   SUS'   U R                  R                  SU R                  X4S9I Sh  vN n[        U R                  XPR                  S	   S
9$  N%7f)rE   r   r   r   r}   r~   r   r   Nr   r'   )	r
   rw   r	   rg   r)   rF   ro   r   r   r   s         r"   rF   ApiKeyContext.update_async  s      yy -#**62
 ))B-"E.22tyyt 3 
 
 dmmW..:OPP	
s   A6B 8B9&B c                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )rI   rJ   c              3   H   #    U  H  u  pS R                  X5      v   M     g7frL   rM   rO   s      r"   rS   )ApiKeyContext.__repr__.<locals>.<genexpr>1  rU   rV   z <Twilio.Iam.V1.ApiKeyContext {}>rW   rZ   s     r"   r\   ApiKeyContext.__repr__+  s6     ((SDNN<P<P<RSS188AAr$   )r   ro   )r^   r_   r`   ra   r   rc   r   re   r/   r3   r   r8   r<   r
   rf   r   rg   rA   rF   r\   rh   ri   rj   s   @r"   r(   r(      s    ; ;c ;
U 
U
D 

~ 
(
> 
0 -3LL(.QS&[)Q ffn%Q 
	QD -3LL(.QS&[)Q ffn%Q 
	Q@B# B Br$   r(   c                   b   ^  \ rS rSrS\4U 4S jjrS\S\4S jrS\S\4S jr	S\4S jr
S	rU =r$ )

ApiKeyListi5  r   c                 $   > [         TU ]  U5        g)zP
Initialize the ApiKeyList

:param version: Version that contains the resource

N)r   r   )r    r   r!   s     r"   r   ApiKeyList.__init__7  s     	!r$   r   r%   c                 *    [        U R                  US9$ zy
Constructs a ApiKeyContext

:param sid: The Twilio-provided string that uniquely identifies the Key resource to update.
r'   r(   r)   r    r   s     r"   r   ApiKeyList.get@       T]]44r$   c                 *    [        U R                  US9$ r   r   r   s     r"   __call__ApiKeyList.__call__H  r   r$   c                     g)rI   z<Twilio.Iam.V1.ApiKeyList>rn   r*   s    r"   r\   ApiKeyList.__repr__P  s     ,r$   rn   )r^   r_   r`   ra   r   r   rc   r(   r   r   r\   rh   ri   rj   s   @r"   r   r   5  sF    " "5s 5} 55C 5M 5,# , ,r$   r   N)rb   r   typingr   r   r   r   twilio.baser   r	   r
   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r(   r   rn   r$   r"   <module>r      sV     - - 6 6 8 : 2 '{C% {C|\BO \B~!, !,r$   