U
    ccG                     @   s   d dl Z d dlZd dlZd dlZd dlm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 G dd	 d	eZdS )
    N)Enum)Request)DictListOptionalUnionAny)datetime)DialogState)Intentc                       sr   e Zd ZdZdddddddZddd	d
dddZdZd fdd	Zdd Zdd Z	dd Z
dd Zdd Z  ZS )IntentRequestua  
    An IntentRequest is an object that represents a request made to a skill based on what the user wants to do.


    :param request_id: Represents the unique identifier for the specific request.
    :type request_id: (optional) str
    :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service.
    :type timestamp: (optional) datetime
    :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
    :type locale: (optional) str
    :param dialog_state: Enumeration indicating the status of the multi-turn dialog. This property is included if the skill meets the requirements to use the Dialog directives. Note that COMPLETED is only possible when you use the Dialog.Delegate directive. If you use intent confirmation, dialogState is considered COMPLETED if the user denies the entire intent (for instance, by answering “no” when asked the confirmation prompt). Be sure to also check the confirmationStatus property on the Intent object before fulfilling the user’s request.
    :type dialog_state: (optional) ask_sdk_model.dialog_state.DialogState
    :param intent: An object that represents what the user wants.
    :type intent: (optional) ask_sdk_model.intent.Intent

    strr	   z&ask_sdk_model.dialog_state.DialogStatezask_sdk_model.intent.Intent)object_type
request_id	timestamplocaledialog_stateintenttypeZ	requestIdr   r   ZdialogStater   FNc                    s8   d| _ | j | _tt| j| j |||d || _|| _dS )u  An IntentRequest is an object that represents a request made to a skill based on what the user wants to do.

        :param request_id: Represents the unique identifier for the specific request.
        :type request_id: (optional) str
        :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service.
        :type timestamp: (optional) datetime
        :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
        :type locale: (optional) str
        :param dialog_state: Enumeration indicating the status of the multi-turn dialog. This property is included if the skill meets the requirements to use the Dialog directives. Note that COMPLETED is only possible when you use the Dialog.Delegate directive. If you use intent confirmation, dialogState is considered COMPLETED if the user denies the entire intent (for instance, by answering “no” when asked the confirmation prompt). Be sure to also check the confirmationStatus property on the Intent object before fulfilling the user’s request.
        :type dialog_state: (optional) ask_sdk_model.dialog_state.DialogState
        :param intent: An object that represents what the user wants.
        :type intent: (optional) ask_sdk_model.intent.Intent
        r   )r   r   r   r   N)Z#_IntentRequest__discriminator_valuer   superr   __init__r   r   )selfr   r   r   r   r   	__class__ @/tmp/pip-unpacked-wheel-urk6bcke/ask_sdk_model/intent_request.pyr   C   s
    zIntentRequest.__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rt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>b   s   z'IntentRequest.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"   l   s
    )six	iteritemsdeserialized_typesgetattrr   listmapr   r    r   r   dictitems)r   resultattr_r    r   r   r   r   Y   s&    





zIntentRequest.to_dictc                 C   s   t |  S )z.Returns the string representation of the model)pprintpformatr   r   r   r   r   to_strw   s    zIntentRequest.to_strc                 C   s   |   S )zFor `print` and `pprint`)r3   r2   r   r   r   __repr__|   s    zIntentRequest.__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IntentRequest.__eq__c                 C   s
   | |k S )z*Returns true if both objects are not equalr   r6   r   r   r   __ne__   s    zIntentRequest.__ne__)NNNNN)__name__
__module____qualname____doc__r'   Zattribute_mapZsupports_multiple_typesr   r   r3   r4   r8   r9   __classcell__r   r   r   r   r      s,   
r   )r0   rer%   typingenumr   Zask_sdk_model.requestr   TYPE_CHECKINGr   r   r   r   r   r	   Zask_sdk_model.dialog_stater
   ZDialogState_2ba20645Zask_sdk_model.intentr   ZIntent_fd0ef0fer   r   r   r   r   <module>   s   