U
    ^g%i\                     @   s   d Z ddlmZ ddlmZ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List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 )TokenInstancea&  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Token resource.
    :ivar date_created: The date and time in GMT that the resource 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 resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar ice_servers: An array representing the ephemeral credentials and the STUN and TURN server URIs.
    :ivar password: The temporary password that the username will use when authenticating with Twilio.
    :ivar ttl: The duration in seconds for which the username and password are valid.
    :ivar username: The temporary username that uniquely identifies a Token.
    )versionpayloadaccount_sidc                    sz   t  | |d| _t|d| _t|d| _|d| _|d| _	|d| _
|d| _d|i| _d S )Nr   date_createddate_updatedice_serverspasswordttlusername)super__init__getr   r   Zrfc2822_datetimer   r   r   r   r   r   	_solution)selfr   r   r   	__class__ b/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/api/v2010/account/token.pyr   #   s     zTokenInstance.__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><   s     z)TokenInstance.__repr__.<locals>.<genexpr>z#<Twilio.Api.V2010.TokenInstance {}>)joinr   itemsr$   )r   contextr   r   r   __repr__6   s    zTokenInstance.__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 )	TokenList)r   r   c                    s*   t  | d|i| _djf | j| _dS )z
        Initialize the TokenList

        :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 create the resource.

        r   z#/Accounts/{account_sid}/Tokens.jsonN)r   r   r   r$   _uri)r   r   r   r   r   r   r   B   s
     zTokenList.__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 TokenInstance

        :param ttl: The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours).

        :returns: The created TokenInstance
        TtlContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheadersr   r   )r	   of_versioncreater4   r   r   r   r   r>   r?   r   r   r   r   rC   R   s&    	      zTokenList.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 TokenInstance

        :param ttl: The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours).

        :returns: The created TokenInstance
        r5   r6   r7   r8   r9   r:   r;   Nr   r@   )r	   rA   rB   create_asyncr4   r   r   rD   r   r   r   rE   n   s&          zTokenList.create_asyncr    c                 C   s   dS )r"   z<Twilio.Api.V2010.TokenList>r   )r   r   r   r   r,      s    zTokenList.__repr__)r-   r.   r/   r   r1   r   r	   unsetr   intobjectr   rC   rE   r,   r2   r   r   r   r   r3   @   s   
r3   N)r0   r   typingr   r   r   r   r   Ztwilio.baser   r	   Ztwilio.base.instance_resourcer
   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r   r3   r   r   r   r   <module>   s   (