U
    ^g%i6                     @   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	 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 - Api
    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values)InstanceResource)ListResource)Versionc                       s@   e Zd ZdZeeeef ed fddZedddZ	  Z
S )NewKeyInstancea+  
    :ivar sid: The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
    :ivar friendly_name: The string that you assigned to describe the resource.
    :ivar date_created: The date and time in GMT that the API Key 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 new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar secret: The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`).  **Note that for security reasons, this field is ONLY returned when the API Key is first created.**
    )versionpayloadaccount_sidc                    sb   t  | |d| _|d| _t|d| _t|d| _|d| _	d|i| _
d S )Nsidfriendly_namedate_createddate_updatedsecretr   )super__init__getr   r   r   Zrfc2822_datetimer   r   r   	_solution)selfr   r   r   	__class__ d/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/api/v2010/account/new_key.pyr   !   s     zNewKeyInstance.__init__returnc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS )z{}={}N)format).0kvr   r   r   	<genexpr>8   s     z*NewKeyInstance.__repr__.<locals>.<genexpr>z$<Twilio.Api.V2010.NewKeyInstance {}>)joinr   itemsr"   )r   contextr   r   r   __repr__2   s    zNewKeyInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r   r*   __classcell__r   r   r   r   r      s   r   c                       sn   e Zd Zeed fddZejfeee	f e
dddZejfeee	f e
dddZed	d
dZ  ZS )
NewKeyList)r   r   c                    s*   t  | d|i| _djf | j| _dS )z
        Initialize the NewKeyList

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource.

        r   z!/Accounts/{account_sid}/Keys.jsonN)r   r   r   r"   _uri)r   r   r   r   r   r   r   >   s
     zNewKeyList.__init__)r   r   c                 C   sX   t d|i}t ddi}d|d< d|d< | jjd| j||d}t| j|| jd d	S )
z
        Create the NewKeyInstance

        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.

        :returns: The created NewKeyInstance
        FriendlyNameContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheadersr   r   )r   of_versioncreater2   r   r   r   r   r<   r=   r   r   r   r   rA   N   s&          zNewKeyList.createc                    s^   t d|i}t ddi}d|d< d|d< | jjd| j||dI dH }t| j|| jd	 d
S )z
        Asynchronously create the NewKeyInstance

        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.

        :returns: The created NewKeyInstance
        r3   r4   r5   r6   r7   r8   r9   Nr   r>   )r   r?   r@   create_asyncr2   r   r   rB   r   r   r   rC   l   s&          zNewKeyList.create_asyncr   c                 C   s   dS )r    z<Twilio.Api.V2010.NewKeyList>r   )r   r   r   r   r*      s    zNewKeyList.__repr__)r+   r,   r-   r   r/   r   r   unsetr   objectr   rA   rC   r*   r0   r   r   r   r   r1   <   s   

r1   N)r.   r   typingr   r   r   r   Ztwilio.baser   r   Ztwilio.base.instance_resourcer	   Ztwilio.base.list_resourcer
   Ztwilio.base.versionr   r   r1   r   r   r   r   <module>   s   $