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r?d 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 d dlmZ G dd	„ d	eƒZdS )
é    N)ÚEnum)ÚDictÚListÚOptionalÚUnionÚAny)Údatetime)ÚResolutions)ÚSlotConfirmationStatus)Ú	SlotValuec                   @   sf   e Zd ZdZddddddœZdd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 )ÚSlotao  

    :param name: A string that represents the name of the slot.
    :type name: (optional) str
    :param value: A string that represents the value the user spoke for the slot. This is the actual value the user spoke, not necessarily the canonical value or one of the synonyms defined for the entity. Note that AMAZON.LITERAL slot values sent to your service are always in all lower case.
    :type value: (optional) str
    :param confirmation_status: Indication of whether an intent or slot has been explicitly confirmed or denied by the user, or neither.
    :type confirmation_status: (optional) ask_sdk_model.slot_confirmation_status.SlotConfirmationStatus
    :param resolutions: Contains the resultsof entity resolution. These are organized by authority. An authority represents the source for the data provided for the slot. For a custom slot type, the authority is the slot type you defined.
    :type resolutions: (optional) ask_sdk_model.slu.entityresolution.resolutions.Resolutions
    :param slot_value: Object representing the value of the slot.
    :type slot_value: (optional) ask_sdk_model.slot_value.SlotValue

    Ústrz=ask_sdk_model.slot_confirmation_status.SlotConfirmationStatusz:ask_sdk_model.slu.entityresolution.resolutions.Resolutionsz"ask_sdk_model.slot_value.SlotValue)ÚnameÚvalueÚconfirmation_statusÚresolutionsÚ
slot_valuer   r   ZconfirmationStatusr   Z	slotValueFNc                 C   s(   d| _ || _|| _|| _|| _|| _dS )aš  

        :param name: A string that represents the name of the slot.
        :type name: (optional) str
        :param value: A string that represents the value the user spoke for the slot. This is the actual value the user spoke, not necessarily the canonical value or one of the synonyms defined for the entity. Note that AMAZON.LITERAL slot values sent to your service are always in all lower case.
        :type value: (optional) str
        :param confirmation_status: Indication of whether an intent or slot has been explicitly confirmed or denied by the user, or neither.
        :type confirmation_status: (optional) ask_sdk_model.slot_confirmation_status.SlotConfirmationStatus
        :param resolutions: Contains the resultsof entity resolution. These are organized by authority. An authority represents the source for the data provided for the slot. For a custom slot type, the authority is the slot type you defined.
        :type resolutions: (optional) ask_sdk_model.slu.entityresolution.resolutions.Resolutions
        :param slot_value: Object representing the value of the slot.
        :type slot_value: (optional) ask_sdk_model.slot_value.SlotValue
        N)Z_Slot__discriminator_valuer   r   r   r   r   )Úselfr   r   r   r   r   © r   ú4D:\Flask\env\Lib\site-packages\ask_sdk_model/slot.pyÚ__init__?   s   
zSlot.__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   r   )Úxr   r   r   Ú<lambda>_   s    zSlot.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   i   s
   ÿÿ)ÚsixÚ	iteritemsÚdeserialized_typesÚgetattrr   ÚlistÚmapr   r   r   r   ÚdictÚitems)r   ÚresultÚattrÚ_r   r   r   r   r   V   s&   

ý


û
zSlot.to_dictc                 C   s   t  |  ¡ ¡S )z.Returns the string representation of the model)ÚpprintÚpformatr   ©r   r   r   r   Úto_strt   s   zSlot.to_strc                 C   s   |   ¡ S )zFor `print` and `pprint`)r-   r,   r   r   r   Ú__repr__y   s   zSlot.__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__~   s   
zSlot.__eq__c                 C   s
   | |k S )z*Returns true if both objects are not equalr   r0   r   r   r   Ú__ne__†   s   
zSlot.__ne__)NNNNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r!   Zattribute_mapZsupports_multiple_typesr   r   r-   r.   r2   r3   r   r   r   r   r      s*    û	û
r   )r*   Úrer   ÚtypingÚenumr   ÚTYPE_CHECKINGr   r   r   r   r   r   Z.ask_sdk_model.slu.entityresolution.resolutionsr	   ZResolutions_e7d66a3Z&ask_sdk_model.slot_confirmation_statusr
   ZSlotConfirmationStatus_b8466dc8Zask_sdk_model.slot_valuer   ZSlotValue_4725c8c5Úobjectr   r   r   r   r   Ú<module>   s   