o
    f>h                     @   s   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	 d	eZG d
d deZdS )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                       sN   e Zd ZG dd deZ	 dedeeef f fddZ	defdd	Z
  ZS )
NewApiKeyInstancec                   @   s   e Zd ZdZdS )NewApiKeyInstance.Keytype
restrictedN)__name__
__module____qualname__
RESTRICTED r   r   Q/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/iam/v1/new_api_key.pyKeytype   s    r   versionpayloadc                    sd   t  | |d| _|d| _t|d| _t|d| _|d| _	|d| _
d S )Nsidfriendly_namedate_createddate_updatedsecretpolicy)super__init__getr   r   r   rfc2822_datetimer   r   r   r   )selfr   r   	__class__r   r   r    &   s   zNewApiKeyInstance.__init__returnc                 C      dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z!<Twilio.Iam.V1.NewApiKeyInstance>r   r#   r   r   r   __repr__4   s   zNewApiKeyInstance.__repr__)r   r   r   objectr   r   r   strr   r    r*   __classcell__r   r   r$   r   r      s
    	r   c                       s   e Zd Zdef fd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
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dZd	efddZ  ZS )NewApiKeyListr   c                    s   t  | d| _dS )zk
        Initialize the NewApiKeyList

        :param version: Version that contains the resource

        z/KeysN)r   r    _uri)r#   r   r$   r   r   r    @   s   
zNewApiKeyList.__init__account_sidr   key_typer   r   r&   c                 C   sZ   t |||t|d}t ddi}d|d< d|d< | jjd| j||d}t| j|S )a  
        Create the NewApiKeyInstance

        :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 NewApiKeyInstance
        
AccountSidFriendlyNameKeyTypePolicyContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheaders)r	   ofr   r+   _versioncreater/   r   r#   r0   r   r1   r   r?   r@   r   r   r   r   rC   K   s   
zNewApiKeyList.createc                    sb   t |||t|d}t ddi}d|d< d|d< | jjd| j||dI dH }t| j|S )	a  
        Asynchronously create the NewApiKeyInstance

        :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 NewApiKeyInstance
        r2   r7   r8   r9   r:   r;   r<   N)r	   rA   r   r+   rB   create_asyncr/   r   rD   r   r   r   rE   q   s   
zNewApiKeyList.create_asyncc                 C   r'   )r(   z<Twilio.Iam.V1.NewApiKeyList>r   r)   r   r   r   r*      s   zNewApiKeyList.__repr__)r   r   r   r   r    r	   unsetr,   r   r+   r   rC   rE   r*   r-   r   r   r$   r   r.   >   s>    



)



&r.   N)__doc__r   typingr   r   r   r   twilio.baser   r   r	   twilio.base.instance_resourcer
   twilio.base.list_resourcer   twilio.base.versionr   r   r.   r   r   r   r   <module>   s    &