U
    ÍZjÒ  ã                   @   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 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)ÚReprompt)Ú	Directive)ÚExperimentTriggerResponse)ÚCanFulfillIntent)ÚOutputSpeech)ÚCardc                	   @   sr   e Zd ZdZdddddddd	d
œZddd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 )"ÚResponsea�  

    :param output_speech: 
    :type output_speech: (optional) ask_sdk_model.ui.output_speech.OutputSpeech
    :param card: 
    :type card: (optional) ask_sdk_model.ui.card.Card
    :param reprompt: 
    :type reprompt: (optional) ask_sdk_model.ui.reprompt.Reprompt
    :param directives: 
    :type directives: (optional) list[ask_sdk_model.directive.Directive]
    :param api_response: API response object containing API response value(s)
    :type api_response: (optional) object
    :param should_end_session: 
    :type should_end_session: (optional) bool
    :param can_fulfill_intent: 
    :type can_fulfill_intent: (optional) ask_sdk_model.canfulfill.can_fulfill_intent.CanFulfillIntent
    :param experimentation: Experiment trigger response from skill
    :type experimentation: (optional) ask_sdk_model.interfaces.alexa.experimentation.experiment_trigger_response.ExperimentTriggerResponse

    z+ask_sdk_model.ui.output_speech.OutputSpeechzask_sdk_model.ui.card.Cardz"ask_sdk_model.ui.reprompt.Repromptz'list[ask_sdk_model.directive.Directive]ÚobjectÚboolz<ask_sdk_model.canfulfill.can_fulfill_intent.CanFulfillIntentzdask_sdk_model.interfaces.alexa.experimentation.experiment_trigger_response.ExperimentTriggerResponse)Úoutput_speechÚcardÚrepromptÚ
directivesÚapi_responseÚshould_end_sessionÚcan_fulfill_intentÚexperimentationZoutputSpeechr   r   r   ZapiResponseZshouldEndSessionZcanFulfillIntentr   FNc	           	      C   s:   d| _ || _|| _|| _|| _|| _|| _|| _|| _dS )aÐ  

        :param output_speech: 
        :type output_speech: (optional) ask_sdk_model.ui.output_speech.OutputSpeech
        :param card: 
        :type card: (optional) ask_sdk_model.ui.card.Card
        :param reprompt: 
        :type reprompt: (optional) ask_sdk_model.ui.reprompt.Reprompt
        :param directives: 
        :type directives: (optional) list[ask_sdk_model.directive.Directive]
        :param api_response: API response object containing API response value(s)
        :type api_response: (optional) object
        :param should_end_session: 
        :type should_end_session: (optional) bool
        :param can_fulfill_intent: 
        :type can_fulfill_intent: (optional) ask_sdk_model.canfulfill.can_fulfill_intent.CanFulfillIntent
        :param experimentation: Experiment trigger response from skill
        :type experimentation: (optional) ask_sdk_model.interfaces.alexa.experimentation.experiment_trigger_response.ExperimentTriggerResponse
        N)	Z_Response__discriminator_valuer   r   r   r   r   r   r   r   )	Úselfr   r   r   r   r   r   r   r   © r   úY/var/www/html/TRUCKING_PROJECT/venv/lib/python3.8/site-packages/ask_sdk_model/response.pyÚ__init__N   s    zResponse.__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>w   s   z"Response.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   n   s&    

ý


û
zResponse.to_dictc                 C   s   t  |  ¡ ¡S )z.Returns the string representation of the model)ÚpprintÚpformatr   ©r   r   r   r   Úto_strŒ   s    zResponse.to_strc                 C   s   |   ¡ S )zFor `print` and `pprint`)r5   r4   r   r   r   Ú__repr__‘   s    zResponse.__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Response.__eq__c                 C   s
   | |k S )z*Returns true if both objects are not equalr   r8   r   r   r   Ú__ne__ž   s    zResponse.__ne__)NNNNNNNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r)   Zattribute_mapZsupports_multiple_typesr   r   r5   r6   r:   r;   r   r   r   r   r   "   s4   øø

 r   )!r2   Úrer'   ÚtypingÚenumr   ÚTYPE_CHECKINGr   r   r   r   r   r   Zask_sdk_model.ui.repromptr	   ZReprompt_ffee6ea4Zask_sdk_model.directiver
   ZDirective_e3e6b000ZJask_sdk_model.interfaces.alexa.experimentation.experiment_trigger_responser   Z"ExperimentTriggerResponse_5daea3f3Z+ask_sdk_model.canfulfill.can_fulfill_intentr   ZCanFulfillIntent_8d777e62Zask_sdk_model.ui.output_speechr   ZOutputSpeech_a070f8fbZask_sdk_model.ui.cardr   ZCard_3a03f3c4r   r   r   r   r   r   Ú<module>   s   