U
    ^g%i                     @   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                       sJ   e Zd ZG dd deZeeeef d fddZ	edddZ
  ZS )	NewApiKeyInstancec                   @   s   e Zd ZdZdS )NewApiKeyInstance.KeytypeZ
restrictedN)__name__
__module____qualname__Z
RESTRICTED r   r   ]/var/www/html/api-medvista/venv/lib/python3.8/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   Zrfc2822_datetimer   r   r   r   )selfr   r   	__class__r   r   r   &   s    zNewApiKeyInstance.__init__returnc                 C   s   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ed fddZejejejfeeee	f ede	f ee	e	f e
dddZejejejfeeee	f ede	f ee	e	f e
ddd	Zed
ddZ  ZS )NewApiKeyList)r   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__r   )account_sidr   key_typer   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
        Z
AccountSidZFriendlyNameZKeyTypePolicyContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheaders)r	   ofr   r(   _versioncreater,   r   r    r-   r   r.   r   r9   r:   r   r   r   r   r=   K   s"       zNewApiKeyList.createc                    s`   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
        r/   r1   r2   r3   r4   r5   r6   N)r	   r;   r   r(   r<   create_asyncr,   r   r>   r   r   r   r?   q   s"       zNewApiKeyList.create_asyncr#   c                 C   s   dS )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   r=   r?   r'   r*   r   r   r!   r   r+   >   s,   


)


&r+   N)__doc__r   typingr   r   r   r   Ztwilio.baser   r   r	   Ztwilio.base.instance_resourcer
   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r   r+   r   r   r   r   <module>   s   &