o
    f>h6                     @   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                       sD   e Zd ZdZdedeeef def fddZdef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   rfc2822_datetimer   r   r   	_solution)selfr   r   r   	__class__ X/var/www/html/venv/lib/python3.10/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                       st   e Zd Zdedef fddZejfdeee	f de
fddZejfdeee	f de
fd	d
ZdefddZ  ZS )
NewKeyListr   r   c                    s.   t  | d|i| _djdi | 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.jsonNr   )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_asyncc                 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   twilio.baser   r   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r1   r   r   r   r   <module>   s    $