B
    `U                 @   st   d Z ddl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 deZ
G d	d
 d
e	ZG dd deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )deserialize)values)InstanceResource)ListResource)Pagec                   s2   e Zd Z fddZejfddZdd Z  ZS )	TokenListc                s.   t t| | d|i| _djf | j| _dS )a:  
        Initialize the TokenList

        :param Version version: Version that contains the resource
        :param account_sid: The SID of the Account that created the resource

        :returns: twilio.rest.api.v2010.account.token.TokenList
        :rtype: twilio.rest.api.v2010.account.token.TokenList
        account_sidz#/Accounts/{account_sid}/Tokens.jsonN)superr   __init__	_solutionformat_uri)selfversionr   )	__class__ R/home/dcms/DCMS/lib/python3.7/site-packages/twilio/rest/api/v2010/account/token.pyr
      s    

zTokenList.__init__c             C   s8   t d|i}| jjd| j|d}t| j|| jd dS )z
        Create the TokenInstance

        :param unicode ttl: The duration in seconds the credentials are valid

        :returns: The created TokenInstance
        :rtype: twilio.rest.api.v2010.account.token.TokenInstance
        ZTtlPOST)methoduridatar   )r   )r   Zof_versioncreater   TokenInstancer   )r   ttlr   payloadr   r   r   r   "   s    	zTokenList.createc             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Api.V2010.TokenList>r   )r   r   r   r   __repr__1   s    zTokenList.__repr__)	__name__
__module____qualname__r
   r   Zunsetr   r   __classcell__r   r   )r   r   r      s   r   c                   s,   e Zd Z fddZdd Zdd Z  ZS )	TokenPagec                s   t t| || || _dS )ar  
        Initialize the TokenPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param account_sid: The SID of the Account that created the resource

        :returns: twilio.rest.api.v2010.account.token.TokenPage
        :rtype: twilio.rest.api.v2010.account.token.TokenPage
        N)r	   r!   r
   r   )r   r   responseZsolution)r   r   r   r
   =   s    zTokenPage.__init__c             C   s   t | j|| jd dS )z
        Build an instance of TokenInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.api.v2010.account.token.TokenInstance
        :rtype: twilio.rest.api.v2010.account.token.TokenInstance
        r   )r   )r   r   r   )r   r   r   r   r   get_instanceM   s    	zTokenPage.get_instancec             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Api.V2010.TokenPage>r   )r   r   r   r   r   X   s    zTokenPage.__repr__)r   r   r   r
   r#   r   r    r   r   )r   r   r!   ;   s   r!   c                   sx   e Zd Z fddZedd Zedd Zedd Zed	d
 Zedd Z	edd Z
edd Zdd Z  ZS )r   c          	      sp   t t| | |dt|dt|d|d|d|d|dd| _d	| _d|i| _d	S )
z
        Initialize the TokenInstance

        :returns: twilio.rest.api.v2010.account.token.TokenInstance
        :rtype: twilio.rest.api.v2010.account.token.TokenInstance
        r   date_createddate_updatedice_serverspasswordr   username)r   r$   r%   r&   r'   r   r(   N)	r	   r   r
   getr   Zrfc2822_datetime_properties_contextr   )r   r   r   r   )r   r   r   r
   d   s    zTokenInstance.__init__c             C   s
   | j d S )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        r   )r*   )r   r   r   r   r   |   s    zTokenInstance.account_sidc             C   s
   | j d S )zt
        :returns: The RFC 2822 date and time in GMT that the resource was created
        :rtype: datetime
        r$   )r*   )r   r   r   r   r$      s    zTokenInstance.date_createdc             C   s
   | j d S )zy
        :returns: The RFC 2822 date and time in GMT that the resource was last updated
        :rtype: datetime
        r%   )r*   )r   r   r   r   r%      s    zTokenInstance.date_updatedc             C   s
   | j d S )zc
        :returns: An array representing the ephemeral credentials
        :rtype: unicode
        r&   )r*   )r   r   r   r   r&      s    zTokenInstance.ice_serversc             C   s
   | j d S )zb
        :returns: The temporary password used for authenticating
        :rtype: unicode
        r'   )r*   )r   r   r   r   r'      s    zTokenInstance.passwordc             C   s
   | j d S )ze
        :returns: The duration in seconds the credentials are valid
        :rtype: unicode
        r   )r*   )r   r   r   r   r      s    zTokenInstance.ttlc             C   s
   | j d S )zk
        :returns: The temporary username that uniquely identifies a Token
        :rtype: unicode
        r(   )r*   )r   r   r   r   r(      s    zTokenInstance.usernamec             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z <Twilio.Api.V2010.TokenInstance>r   )r   r   r   r   r      s    zTokenInstance.__repr__)r   r   r   r
   propertyr   r$   r%   r&   r'   r   r(   r   r    r   r   )r   r   r   b   s   r   N)__doc__Ztwilio.baser   r   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.pager   r   r!   r   r   r   r   r   <module>   s   +'