
    m>h                         d Z ddlmZ ddlmZmZmZmZ ddlmZm	Z	m
Z
 ddlmZ ddlmZ ddlmZ  G d d	e      Z G d
 de      Zy)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)InstanceResource)ListResource)Versionc                   V     e Zd Z G d de      Z	 dedeeef   f fdZ	defdZ
 xZS )KeyInstancec                       e Zd ZdZy)KeyInstance.Keytype
restrictedN)__name__
__module____qualname__
RESTRICTED     Z/var/www/html/DP/alpha_backend/venv/lib/python3.12/site-packages/twilio/rest/iam/v1/key.pyKeytyper      s    !
r   r   versionpayloadc                 x   t         |   |       |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d      | _	        |j                  d      | _
        y )Nsidfriendly_namedate_createddate_updatedsecretpolicy)super__init__getr   r   r   rfc2822_datetimer    r!   r"   r#   )selfr   r   	__class__s      r   r%   zKeyInstance.__init__&   s    !")++e"4,3KK,H0;0L0LKK'1
 1<0L0LKK'1
 &-[[%:3:;;x3Hr   returnc                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z<Twilio.Iam.V1.KeyInstance>r   r(   s    r   __repr__zKeyInstance.__repr__4   s     -r   )r   r   r   objectr   r   r   strr   r%   r.   __classcell__r)   s   @r   r   r      s>    "& "I I$sCx. I-# -r   r   c                   ,    e Zd Zdef fdZej                  ej                  ej                  fdedeee	f   dede	f   dee	e	f   de
f
d	Zej                  ej                  ej                  fdedeee	f   dede	f   dee	e	f   de
f
d
ZdefdZ xZS )KeyListr   c                 2    t         |   |       d| _        y)ze
        Initialize the KeyList

        :param version: Version that contains the resource

        z/KeysN)r$   r%   _uri)r(   r   r)   s     r   r%   zKeyList.__init__@   s     	!	r   account_sidr   key_typer   r#   r*   c                    t        j                  |||t        j                  |      d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )a  
        Create the KeyInstance

        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
        :param key_type:
        :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 created KeyInstance
        
AccountSidFriendlyNameKeyTypePolicyContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheaders)r
   ofr	   r/   _versioncreater6   r   r(   r7   r   r8   r#   rG   rH   r   s           r   rK   zKeyList.createK   s    $ yy) -##**62	
 ))^-PQR"E.--&&tyytW ' 
 4=='22r   c                 8  K   t        j                  |||t        j                  |      d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	a  
        Asynchronously create the KeyInstance

        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
        :param key_type:
        :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 created KeyInstance
        r:   r?   r@   rA   rB   rC   rD   N)r
   rI   r	   r/   rJ   create_asyncr6   r   rL   s           r   rN   zKeyList.create_asyncq   s     $ yy) -##**62	
 ))^-PQR"E.22tyytW 3 
 
 4=='22	
s   A;B=B>Bc                      y)r,   z<Twilio.Iam.V1.KeyList>r   r-   s    r   r.   zKeyList.__repr__   s     )r   )r   r   r   r   r%   r
   unsetr0   r   r/   r   rK   rN   r.   r1   r2   s   @r   r4   r4   >   s    	 	 -3LL9?(.$3$3 S&[)$3 -v56	$3
 ffn%$3 
$3R -3LL9?(.$3$3 S&[)$3 -v56	$3
 ffn%$3 
$3L)# )r   r4   N)__doc__r   typingr   r   r   r   twilio.baser   r	   r
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r4   r   r   r   <module>rW      s@     - - 6 6 : 2 '#-" #-L_)l _)r   