o
    0_Wcã  ã                   @   s†   d dl Z d dlZd dlZd dlZd dlmZ ejr9d dlmZmZ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dS )	é    N)ÚEnum)ÚDictÚListÚOptionalÚUnionÚAny)Údatetime)ÚIntentConfirmationStatus)ÚSlotc                   @   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 )ÚIntentaö  
    An object that represents what the user wants.


    :param name: A string representing the name of the intent.
    :type name: (optional) str
    :param slots: A map of key-value pairs that further describes what the user meant based on a predefined intent schema. The map can be empty.
    :type slots: (optional) dict(str, ask_sdk_model.slot.Slot)
    :param confirmation_status: 
    :type confirmation_status: (optional) ask_sdk_model.intent_confirmation_status.IntentConfirmationStatus

    Ústrz"dict(str, ask_sdk_model.slot.Slot)zAask_sdk_model.intent_confirmation_status.IntentConfirmationStatus)ÚnameÚslotsÚconfirmation_statusr   r   ZconfirmationStatusFNc                 C   s   d| _ || _|| _|| _dS )a  An object that represents what the user wants.

        :param name: A string representing the name of the intent.
        :type name: (optional) str
        :param slots: A map of key-value pairs that further describes what the user meant based on a predefined intent schema. The map can be empty.
        :type slots: (optional) dict(str, ask_sdk_model.slot.Slot)
        :param confirmation_status: 
        :type confirmation_status: (optional) ask_sdk_model.intent_confirmation_status.IntentConfirmationStatus
        N)Z_Intent__discriminator_valuer   r   r   )Úselfr   r   r   © r   ú6D:\Flask\env\Lib\site-packages\ask_sdk_model/intent.pyÚ__init__8   s   
zIntent.__init__c                 C   s¦   i }t  | j¡D ]H\}}t| |ƒ}t|tƒr"ttdd„ |ƒƒ||< qt|tƒr-|j||< qt	|dƒr9| 
¡ ||< qt|tƒrLt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>R   s    z Intent.to_dict.<locals>.<lambda>r   c                 S   sF   t | d dƒr| d | d  ¡ fS t| d tƒr!| 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   I   s&   

ý


û
zIntent.to_dictc                 C   s   t  |  ¡ ¡S )z.Returns the string representation of the model)ÚpprintÚpformatr   ©r   r   r   r   Úto_strg   s   zIntent.to_strc                 C   s   |   ¡ S )zFor `print` and `pprint`)r+   r*   r   r   r   Ú__repr__l   s   zIntent.__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__q   s   
zIntent.__eq__c                 C   s
   | |k S )z*Returns true if both objects are not equalr   r.   r   r   r   Ú__ne__y   s   
zIntent.__ne__)NNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Zattribute_mapZsupports_multiple_typesr   r   r+   r,   r0   r1   r   r   r   r   r      s"    ýý
r   )r(   Úrer   ÚtypingÚenumr   ÚTYPE_CHECKINGr   r   r   r   r   r   Z(ask_sdk_model.intent_confirmation_statusr	   Z!IntentConfirmationStatus_89f2a248Zask_sdk_model.slotr
   ZSlot_9e3ddabeÚobjectr   r   r   r   r   Ú<module>   s   