a
    !f                     @   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 - Oauth
    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 d fddZedddZ	  Z
S )TokenInstancea  
    :ivar access_token: Token which carries the necessary information to access a Twilio resource directly.
    :ivar refresh_token: Token which carries the information necessary to get a new access token.
    :ivar id_token:
    :ivar refresh_token_expires_at: The date and time in GMT when the refresh token expires in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar access_token_expires_at: The date and time in GMT when the refresh token expires in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    )versionpayloadc                    sX   t  | |d| _|d| _|d| _t|d| _t|d| _	d S )Naccess_tokenrefresh_tokenid_tokenrefresh_token_expires_ataccess_token_expires_at)
super__init__getr   r   r   r   iso8601_datetimer   r   )selfr   r   	__class__ [/var/www/html/python-backend/venv/lib/python3.9/site-packages/twilio/rest/oauth/v1/token.pyr   #   s    zTokenInstance.__init__returnc                 C   s   dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z<Twilio.Oauth.V1.TokenInstance>r   r   r   r   r   __repr__0   s    zTokenInstance.__repr__)__name__
__module____qualname____doc__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ejejejfeeeee	f eee	f eee	f eee	f eee	f eee	f e
d	ddZejejejejejejfeeeee	f eee	f eee	f eee	f eee	f eee	f e
d	ddZed	d
dZ  ZS )	TokenList)r   c                    s   t  | d| _dS )zg
        Initialize the TokenList

        :param version: Version that contains the resource

        z/tokenN)r   r   _uri)r   r   r   r   r   r   ;   s    zTokenList.__init__)	
grant_type
client_sidclient_secretcodecode_verifierdevice_coder   	device_idr   c	                 C   s<   t ||||||||d}	| jjd| j|	d}
t| j|
S )a"  
        Create the TokenInstance

        :param grant_type: Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
        :param client_sid: A 34 character string that uniquely identifies this OAuth App.
        :param client_secret: The credential for confidential OAuth App.
        :param code: JWT token related to the authorization code grant type.
        :param code_verifier: A code which is generation cryptographically.
        :param device_code: JWT token related to the device code grant type.
        :param refresh_token: JWT token related to the refresh token grant type.
        :param device_id: The Id of the device associated with the token (refresh token).

        :returns: The created TokenInstance
        Z	GrantTypeZ	ClientSidZClientSecretZCodeZCodeVerifierZ
DeviceCodeZRefreshTokenZDeviceIdPOSTmethoduridata)r   of_versioncreater)   r   r   r*   r+   r,   r-   r.   r/   r   r0   r6   r   r   r   r   r9   F   s"    zTokenList.createc	                    sB   t ||||||||d}	| jjd| j|	dI dH }
t| j|
S )a1  
        Asynchronously create the TokenInstance

        :param grant_type: Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
        :param client_sid: A 34 character string that uniquely identifies this OAuth App.
        :param client_secret: The credential for confidential OAuth App.
        :param code: JWT token related to the authorization code grant type.
        :param code_verifier: A code which is generation cryptographically.
        :param device_code: JWT token related to the device code grant type.
        :param refresh_token: JWT token related to the refresh token grant type.
        :param device_id: The Id of the device associated with the token (refresh token).

        :returns: The created TokenInstance
        r1   r2   r3   N)r   r7   r8   create_asyncr)   r   r:   r   r   r   r;   t   s"    zTokenList.create_asyncr   c                 C   s   dS )r   z<Twilio.Oauth.V1.TokenList>r   r    r   r   r   r!      s    zTokenList.__repr__)r"   r#   r$   r   r   r   unsetr&   r   objectr   r9   r;   r!   r'   r   r   r   r   r(   :   sH   





2





.r(   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   r(   r   r   r   r   <module>   s   !