U
    ÍZjA  ã                   @   sz   d dl Z d dlZd dlZd dlZd dlmZ ejrfd dlmZmZm	Z	m
Z
mZ d dlmZ d dlmZ G dd„ deƒZdS )é    N)ÚEnum)ÚDictÚListÚOptionalÚUnionÚAny)Údatetime)ÚPermissionsc                   @   s^   e Zd ZdZddddœZddddœZdZdd
d„Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zd	S )ÚUsera  
    An object that describes the Amazon account for which the skill is enabled.


    :param user_id: A string that represents a unique identifier for the user who made the request. The length of this identifier can vary, but is never more than 255 characters. The userId is automatically generated when a user enables the skill in the Alexa app. Note: Disabling and re-enabling a skill generates a new identifier.
    :type user_id: (optional) str
    :param access_token: A token identifying the user in another system. This is only provided if the user has successfully linked their skill account with their Amazon account.
    :type access_token: (optional) str
    :param permissions: 
    :type permissions: (optional) ask_sdk_model.permissions.Permissions

    Ústrz%ask_sdk_model.permissions.Permissions)Úuser_idÚaccess_tokenÚpermissionsZuserIdZaccessTokenr   FNc                 C   s   d| _ || _|| _|| _dS )a  An object that describes the Amazon account for which the skill is enabled.

        :param user_id: A string that represents a unique identifier for the user who made the request. The length of this identifier can vary, but is never more than 255 characters. The userId is automatically generated when a user enables the skill in the Alexa app. Note: Disabling and re-enabling a skill generates a new identifier.
        :type user_id: (optional) str
        :param access_token: A token identifying the user in another system. This is only provided if the user has successfully linked their skill account with their Amazon account.
        :type access_token: (optional) str
        :param permissions: 
        :type permissions: (optional) ask_sdk_model.permissions.Permissions
        N)Z_User__discriminator_valuer   r   r   )Úselfr   r   r   © r   úU/var/www/html/TRUCKING_PROJECT/venv/lib/python3.8/site-packages/ask_sdk_model/user.pyÚ__init__7   s    zUser.__init__c                 C   s¦   i }t  | j¡D ]�\}}t| |ƒ}t|tƒrDttdd„ |ƒƒ||< qt|tƒrZ|j||< qt	|dƒrr| 
¡ ||< qt|tƒr˜ttdd„ | ¡ ƒƒ||< q|||< q|S )z&Returns the model properties as a dictc                 S   s&   t | dƒr|  ¡ S t| tƒr"| jS | S )NÚto_dict©Úhasattrr   Ú
isinstancer   Úvalue)Úxr   r   r   Ú<lambda>Q   s   zUser.to_dict.<locals>.<lambda>r   c                 S   sF   t | d dƒr"| d | d  ¡ fS t| d tƒrB| d | d jfS | S )Né   r   r   r   )Úitemr   r   r   r   [   s
    ÿÿ)ÚsixÚ	iteritemsÚdeserialized_typesÚgetattrr   ÚlistÚmapr   r   r   r   ÚdictÚitems)r   ÚresultÚattrÚ_r   r   r   r   r   H   s&    

ý


û
zUser.to_dictc                 C   s   t  |  ¡ ¡S )z.Returns the string representation of the model)ÚpprintÚpformatr   ©r   r   r   r   Úto_strf   s    zUser.to_strc                 C   s   |   ¡ S )zFor `print` and `pprint`)r*   r)   r   r   r   Ú__repr__k   s    zUser.__repr__c                 C   s   t |tƒsdS | j|jkS )z&Returns true if both objects are equalF)r   r
   Ú__dict__©r   Úotherr   r   r   Ú__eq__p   s    
zUser.__eq__c                 C   s
   | |k S )z*Returns true if both objects are not equalr   r-   r   r   r   Ú__ne__x   s    zUser.__ne__)NNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Zattribute_mapZsupports_multiple_typesr   r   r*   r+   r/   r0   r   r   r   r   r
      s    ýý
r
   )r'   Úrer   ÚtypingÚenumr   ÚTYPE_CHECKINGr   r   r   r   r   r   Zask_sdk_model.permissionsr	   ZPermissions_9a74ccaaÚobjectr
   r   r   r   r   Ú<module>   s   