ask_sdk_model.interfaces.custom_interface_controller package

Submodules

Note

Canonical imports have been added in the __init__.py of the package. This helps in importing the class directly from the package, than through the module.

For eg: if package a has module b with class C, you can do from a import C instead of from a.b import C.

ask_sdk_model.interfaces.custom_interface_controller.endpoint module

class ask_sdk_model.interfaces.custom_interface_controller.endpoint.Endpoint(endpoint_id=None)

Bases: object

The endpoint of a gadget.

Parameters:endpoint_id ((optional) str) – The endpoint ID of the gadget.
attribute_map = {'endpoint_id': 'endpointId'}
deserialized_types = {'endpoint_id': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.interfaces.custom_interface_controller.event module

class ask_sdk_model.interfaces.custom_interface_controller.event.Event(header=None, payload=None, endpoint=None)

Bases: object

An Event object defining a single event sent by an endpoint

Parameters:
attribute_map = {'endpoint': 'endpoint', 'header': 'header', 'payload': 'payload'}
deserialized_types = {'endpoint': 'ask_sdk_model.interfaces.custom_interface_controller.endpoint.Endpoint', 'header': 'ask_sdk_model.interfaces.custom_interface_controller.header.Header', 'payload': 'object'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.interfaces.custom_interface_controller.event_filter module

class ask_sdk_model.interfaces.custom_interface_controller.event_filter.EventFilter(filter_expression=None, filter_match_action=None)

Bases: object

Defines the Jsonlogic event filter expression and its corresponding match action. This filter is applied to all events during the event handler's duration. Events that are rejected by the filter expression are not sent to the skill.

Parameters:
attribute_map = {'filter_expression': 'filterExpression', 'filter_match_action': 'filterMatchAction'}
deserialized_types = {'filter_expression': 'object', 'filter_match_action': 'ask_sdk_model.interfaces.custom_interface_controller.filter_match_action.FilterMatchAction'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.interfaces.custom_interface_controller.events_received_request module

class ask_sdk_model.interfaces.custom_interface_controller.events_received_request.EventsReceivedRequest(request_id=None, timestamp=None, locale=None, token=None, events=None)

Bases: ask_sdk_model.request.Request

Skill receives this type of event when an event meets the filter conditions provided in the StartEventHandlerDirective.

Parameters:
  • request_id ((optional) str) – Represents the unique identifier for the specific request.
  • timestamp ((optional) datetime) – 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.
  • locale ((optional) str) – A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
  • token ((optional) str) – Unique identifier associated with the Event Handler that dispatched this event.
  • events ((optional) list[ask_sdk_model.interfaces.custom_interface_controller.event.Event]) – A list of events that meet the filter criteria.
attribute_map = {'events': 'events', 'locale': 'locale', 'object_type': 'type', 'request_id': 'requestId', 'timestamp': 'timestamp', 'token': 'token'}
deserialized_types = {'events': 'list[ask_sdk_model.interfaces.custom_interface_controller.event.Event]', 'locale': 'str', 'object_type': 'str', 'request_id': 'str', 'timestamp': 'datetime', 'token': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.interfaces.custom_interface_controller.expiration module

class ask_sdk_model.interfaces.custom_interface_controller.expiration.Expiration(duration_in_milliseconds=None, expiration_payload=None)

Bases: object

This object defines the duration of the Event Handler and the optional JSON payload that is delivered to the skill when the timer expires.

Parameters:
  • duration_in_milliseconds ((optional) int) – The length of time, in milliseconds, for which events from connected gadgets will be passed to the skill. Your skill will continue to receive events until this duration expires or the event handler is otherwise stopped.
  • expiration_payload ((optional) object) – The payload that was defined in the StartEventHandlerDirective. The skill will receive if and only if the Event Handler duration expired.
attribute_map = {'duration_in_milliseconds': 'durationInMilliseconds', 'expiration_payload': 'expirationPayload'}
deserialized_types = {'duration_in_milliseconds': 'int', 'expiration_payload': 'object'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.interfaces.custom_interface_controller.expired_request module

class ask_sdk_model.interfaces.custom_interface_controller.expired_request.ExpiredRequest(request_id=None, timestamp=None, locale=None, token=None, expiration_payload=None)

Bases: ask_sdk_model.request.Request

This is the event received by the skill at expiry of an Event Handler.

Parameters:
  • request_id ((optional) str) – Represents the unique identifier for the specific request.
  • timestamp ((optional) datetime) – 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.
  • locale ((optional) str) – A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types.
  • token ((optional) str) – The unique token specified by the StartEventHandlerDirective.
  • expiration_payload ((optional) object) – The free form JSON object that the skill will receive if and only if the Event Handler duration expired.
attribute_map = {'expiration_payload': 'expirationPayload', 'locale': 'locale', 'object_type': 'type', 'request_id': 'requestId', 'timestamp': 'timestamp', 'token': 'token'}
deserialized_types = {'expiration_payload': 'object', 'locale': 'str', 'object_type': 'str', 'request_id': 'str', 'timestamp': 'datetime', 'token': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.interfaces.custom_interface_controller.filter_match_action module

class ask_sdk_model.interfaces.custom_interface_controller.filter_match_action.FilterMatchAction

Bases: enum.Enum

The behavior to be performed by the platform on a successful filter expression match.

Allowed enum values: [SEND_AND_TERMINATE, SEND]

SEND = 'SEND'
SEND_AND_TERMINATE = 'SEND_AND_TERMINATE'
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.interfaces.custom_interface_controller.header module

class ask_sdk_model.interfaces.custom_interface_controller.header.Header(namespace=None, name=None)

Bases: object

Endpoint Event header

Parameters:
  • namespace ((optional) str) – The developer-defined namespace for the custom interface.
  • name ((optional) str) – The developer-defined name of the custom interface.
attribute_map = {'name': 'name', 'namespace': 'namespace'}
deserialized_types = {'name': 'str', 'namespace': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.interfaces.custom_interface_controller.send_directive_directive module

class ask_sdk_model.interfaces.custom_interface_controller.send_directive_directive.SendDirectiveDirective(header=None, payload=None, endpoint=None)

Bases: ask_sdk_model.directive.Directive

The directive to be delivered to the gadgets. Each directive is targeted to one gadget (that is, one endpointId). To target the same directive to multiple gadgets, include one directive for each gadget in the response.

Parameters:
attribute_map = {'endpoint': 'endpoint', 'header': 'header', 'object_type': 'type', 'payload': 'payload'}
deserialized_types = {'endpoint': 'ask_sdk_model.interfaces.custom_interface_controller.endpoint.Endpoint', 'header': 'ask_sdk_model.interfaces.custom_interface_controller.header.Header', 'object_type': 'str', 'payload': 'object'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.interfaces.custom_interface_controller.start_event_handler_directive module

class ask_sdk_model.interfaces.custom_interface_controller.start_event_handler_directive.StartEventHandlerDirective(token=None, event_filter=None, expiration=None)

Bases: ask_sdk_model.directive.Directive

This directive configures and starts an event handler. This will enable the skill to receive Custom Events. A skill can only have one active Event Handler at a time.

Parameters:
attribute_map = {'event_filter': 'eventFilter', 'expiration': 'expiration', 'object_type': 'type', 'token': 'token'}
deserialized_types = {'event_filter': 'ask_sdk_model.interfaces.custom_interface_controller.event_filter.EventFilter', 'expiration': 'ask_sdk_model.interfaces.custom_interface_controller.expiration.Expiration', 'object_type': 'str', 'token': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.interfaces.custom_interface_controller.stop_event_handler_directive module

class ask_sdk_model.interfaces.custom_interface_controller.stop_event_handler_directive.StopEventHandlerDirective(token=None)

Bases: ask_sdk_model.directive.Directive

This directive stops a running Event Handler associated with the provided token. The Expiration payload will not be sent if this executed before the Event Handler duration expired.

Parameters:token ((optional) str) – Unique identifier required to close the Event Handler. This token must match the token used in the StartEventHandlerDirective.
attribute_map = {'object_type': 'type', 'token': 'token'}
deserialized_types = {'object_type': 'str', 'token': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model