
    d{i                          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 ddlmZ  G d	 d
e      Z G d de      Zy)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)ApiResponse)InstanceResource)ListResource)Versionc                   F     e Zd ZdZdedeeef   def fdZdefdZ	 x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                    t         |   |       |j                  d      | _        t	        j
                  |j                  d            | _        t	        j
                  |j                  d            | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        |j                  d      | _        d|i| _        y )Nr   date_createddate_updatedice_serverspasswordttlusername)super__init__getr   r	   rfc2822_datetimer   r   r   r   r   r   	_solution)selfr   r   r   	__class__s       a/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/api/v2010/account/token.pyr   zTokenInstance.__init__$   s    !*1++m*D0;0L0LKK'1
 1<0L0LKK'1
 18M0J'.{{:'>")++e"4'.{{:'> ;
    returnc                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        yw)z{}={}N)format).0kvs      r"   	<genexpr>z)TokenInstance.__repr__.<locals>.<genexpr>=   s     SDAq7>>!Q/Ss   !z#<Twilio.Api.V2010.TokenInstance {}>)joinr   itemsr)   )r    contexts     r"   __repr__zTokenInstance.__repr__7   s6     ((SDNN<P<P<RSS4;;GDDr#   )__name__
__module____qualname____doc__r   r   strr   r   r1   __classcell__r!   s   @r"   r   r      s8    
 
$sCx. 
s 
&E# Er#   r   c                   `    e Zd Zdedef fdZej                  fdee	e
f   defdZej                  fdee	e
f   defdZej                  fdee	e
f   defdZej                  fdee	e
f   defd	Zej                  fdee	e
f   defd
Zej                  fdee	e
f   defdZdefdZ xZS )	TokenListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)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!   s      r"   r   zTokenList.__init__C   sA     	! ;
 A9@@R4>>R	r#   r   r$   c                     t        j                  d|i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        TtlContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheaders)r
   of_versioncreate_with_response_infor=   r    r   rH   rI   s       r"   _createzTokenList._createS   so     yys

 ))^-PQR"E.}}66tyytW 7 
 	
r#   c                 x    | j                  |      \  }}}t        | j                  || j                  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
        r   r   r   )rN   r   rK   r   r    r   r   _s       r"   createzTokenList.createj   s;     -AMM7}0M
 	
r#   c                     | j                  |      \  }}}t        | j                  || j                  d         }t	        |||      S )a  
        Create the TokenInstance and return response metadata

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

        :returns: ApiResponse with instance, status code, and headers
        rP   r   rQ   rH   status_coderI   )rN   r   rK   r   r   r    r   r   rW   rI   instances         r"   create_with_http_infozTokenList.create_with_http_infow   sJ     )-(=%g MM7}0M
 k7SSr#   c                    K   t        j                  d|i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   S 7 w)	z
        Internal async helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        r?   r@   rA   rB   rC   rD   rE   N)r
   rJ   rK   create_with_response_info_asyncr=   rM   s       r"   _create_asynczTokenList._create_async   s~      yys

 ))^-PQR"E.]]BBtyytW C 
 
 	
 
s   A%A.'A,(A.c                    K   | j                  |       d{   \  }}}t        | j                  || j                  d         S 7 -w)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
        rP   Nr   rQ   )r]   r   rK   r   rR   s       r"   create_asynczTokenList.create_async   sJ      #00S099AMM7}0M
 	
 :s   AA.Ac                    K   | j                  |       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)a   
        Asynchronously create the TokenInstance and return response metadata

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

        :returns: ApiResponse with instance, status code, and headers
        rP   Nr   rQ   rV   )r]   r   rK   r   r   rX   s         r"   create_with_http_info_asyncz%TokenList.create_with_http_info_async   sZ      /3.@.@S.@.I(I%g MM7}0M
 k7SS	 )Js   AA<Ac                      y)r&   z<Twilio.Api.V2010.TokenList>r<   )r    s    r"   r1   zTokenList.__repr__   s     .r#   )r2   r3   r4   r   r6   r   r
   unsetr   intobjecttuplerN   r   rT   r   rZ   r]   r_   ra   r1   r7   r8   s   @r"   r:   r:   A   s   S Sc S  17 
5f- 
 
. 06|| 
%V, 
 
 )/Tf%T	T  =CLL 
uS&['9 
U 
0 )/
f%
	
  )/Tf%T	T .# .r#   r:   N)r5   r   typingr   r   r   r   r   twilio.baser	   r
   twilio.base.api_responser   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r:   r<   r#   r"   <module>rm      sB     3 3 + 0 : 2 '%E$ %EPB. B.r#   