U
    cck                     @   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)SupportedInterfacesc                   @   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 )Devicea  
    An object providing information about the device used to send the request. The device object contains both deviceId and supportedInterfaces properties. The deviceId property uniquely identifies the device. The supportedInterfaces property lists each interface that the device supports. For example, if supportedInterfaces includes AudioPlayer {}, then you know that the device supports streaming audio using the AudioPlayer interface.


    :param device_id: The deviceId property uniquely identifies the device. This identifier is scoped to a skill. Normally, disabling and re-enabling a skill generates a new identifier.
    :type device_id: (optional) str
    :param persistent_endpoint_id: A persistent identifier for the Endpoint ID where the skill request is issued from. An endpoint represents an Alexa-connected Endpoint (like an Echo device, or an application) with which an Alexa customer can interact rather than a physical device,  so it could represent applications on your fire TV or your Alexa phone app.  The persistentEndpointId is a string that represents a unique identifier for the endpoint in the context of a request.  It is in the Amazon Common Identifier format \&quot;amzn1.alexa.endpoint.did.{id}\&quot;. This identifier space is scoped to a vendor, therefore it will stay the same regardless of skill enablement.
    :type persistent_endpoint_id: (optional) str
    :param supported_interfaces: Lists each interface that the device supports. For example, if supportedInterfaces includes AudioPlayer {}, then you know that the device supports streaming audio using the AudioPlayer interface
    :type supported_interfaces: (optional) ask_sdk_model.supported_interfaces.SupportedInterfaces

    strz6ask_sdk_model.supported_interfaces.SupportedInterfaces)	device_idpersistent_endpoint_idsupported_interfacesZdeviceIdZpersistentEndpointIdZsupportedInterfacesFNc                 C   s   d| _ || _|| _|| _dS )a  An object providing information about the device used to send the request. The device object contains both deviceId and supportedInterfaces properties. The deviceId property uniquely identifies the device. The supportedInterfaces property lists each interface that the device supports. For example, if supportedInterfaces includes AudioPlayer {}, then you know that the device supports streaming audio using the AudioPlayer interface.

        :param device_id: The deviceId property uniquely identifies the device. This identifier is scoped to a skill. Normally, disabling and re-enabling a skill generates a new identifier.
        :type device_id: (optional) str
        :param persistent_endpoint_id: A persistent identifier for the Endpoint ID where the skill request is issued from. An endpoint represents an Alexa-connected Endpoint (like an Echo device, or an application) with which an Alexa customer can interact rather than a physical device,  so it could represent applications on your fire TV or your Alexa phone app.  The persistentEndpointId is a string that represents a unique identifier for the endpoint in the context of a request.  It is in the Amazon Common Identifier format \&quot;amzn1.alexa.endpoint.did.{id}\&quot;. This identifier space is scoped to a vendor, therefore it will stay the same regardless of skill enablement.
        :type persistent_endpoint_id: (optional) str
        :param supported_interfaces: Lists each interface that the device supports. For example, if supportedInterfaces includes AudioPlayer {}, then you know that the device supports streaming audio using the AudioPlayer interface
        :type supported_interfaces: (optional) ask_sdk_model.supported_interfaces.SupportedInterfaces
        N)Z_Device__discriminator_valuer   r   r   )selfr   r   r    r   8/tmp/pip-unpacked-wheel-urk6bcke/ask_sdk_model/device.py__init__7   s    zDevice.__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>Q   s   z Device.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Device.to_dictc                 C   s   t |  S )z.Returns the string representation of the model)pprintpformatr   r   r   r   r   to_strf   s    zDevice.to_strc                 C   s   |   S )zFor `print` and `pprint`)r*   r)   r   r   r   __repr__k   s    zDevice.__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Device.__eq__c                 C   s
   | |k S )z*Returns true if both objects are not equalr   r-   r   r   r   __ne__x   s    zDevice.__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.supported_interfacesr	   ZSupportedInterfaces_8ec830f5objectr
   r   r   r   r   <module>   s   