o
    /i                     @   s|   d Z ddlmZ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 - 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.
    )AnyDictListOptionalUnion)deserialize	serializevalues)InstanceResource)ListResource)Versionc                       s@   e Zd ZdZdedeeef f fddZdefddZ	  Z
S )	DeviceCodeInstanceaY  
    :ivar device_code: The device verification code.
    :ivar user_code: The verification code which end user uses to verify authorization request.
    :ivar verification_uri: The URI that the end user visits to verify authorization request.
    :ivar verification_uri_complete: The URI with user_code that the end-user alternatively visits to verify authorization request.
    :ivar expires_in: The expiration time of the device_code and user_code in seconds.
    :ivar interval: The minimum amount of time in seconds that the client should wait between polling requests to the token endpoint.
    versionpayloadc                    s^   t  | |d| _|d| _|d| _|d| _|d| _t	|d| _
d S )Ndevice_code	user_codeverification_uriverification_uri_complete
expires_ininterval)super__init__getr   r   r   r   r   r   integerr   )selfr   r   	__class__ [/var/www/html/philips/venv/lib/python3.10/site-packages/twilio/rest/oauth/v1/device_code.pyr   #   s   zDeviceCodeInstance.__init__returnc                 C      dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z$<Twilio.Oauth.V1.DeviceCodeInstance>r   r   r   r   r   __repr__/   s   zDeviceCodeInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r   r#   __classcell__r   r   r   r   r      s    	r   c                	       s   e Zd Zdef fddZejfdedee de	ee e
f defdd	Zejfdedee de	ee e
f defd
dZdefddZ  ZS )DeviceCodeListr   c                    s   t  | d| _dS )zl
        Initialize the DeviceCodeList

        :param version: Version that contains the resource

        z/device/codeN)r   r   _uri)r   r   r   r   r   r   :   s   
zDeviceCodeList.__init__
client_sidscopes	audiencesr   c              	   C   sJ   t |t|dd t|dd d}| jjd| j|d}t| j|S )aL  
        Create the DeviceCodeInstance

        :param client_sid: A 34 character string that uniquely identifies this OAuth App.
        :param scopes: An Array of scopes for authorization request
        :param audiences: An array of intended audiences for token requests

        :returns: The created DeviceCodeInstance
        c                 S      | S Nr   er   r   r   <lambda>W       z'DeviceCodeList.create.<locals>.<lambda>c                 S   r/   r0   r   r1   r   r   r   r3   X   r4   	ClientSidScopes	AudiencesPOSTmethoduridata)r	   ofr   map_versioncreater+   r   r   r,   r-   r.   r=   r   r   r   r   rA   E   s   zDeviceCodeList.createc              	      sR   t |t|dd t|dd d}| jjd| j|dI dH }t| j|S )a[  
        Asynchronously create the DeviceCodeInstance

        :param client_sid: A 34 character string that uniquely identifies this OAuth App.
        :param scopes: An Array of scopes for authorization request
        :param audiences: An array of intended audiences for token requests

        :returns: The created DeviceCodeInstance
        c                 S   r/   r0   r   r1   r   r   r   r3   v   r4   z-DeviceCodeList.create_async.<locals>.<lambda>c                 S   r/   r0   r   r1   r   r   r   r3   w   r4   r5   r9   r:   N)r	   r>   r   r?   r@   create_asyncr+   r   rB   r   r   r   rC   d   s   zDeviceCodeList.create_asyncc                 C   r    )r!   z <Twilio.Oauth.V1.DeviceCodeList>r   r"   r   r   r   r#      s   zDeviceCodeList.__repr__)r$   r%   r&   r   r   r	   unsetr(   r   r   objectr   rA   rC   r#   r)   r   r   r   r   r*   9   s.    
#
r*   N)r'   typingr   r   r   r   r   twilio.baser   r   r	   twilio.base.instance_resourcer
   twilio.base.list_resourcer   twilio.base.versionr   r   r*   r   r   r   r   <module>   s    !