Models :ask_sdk_model package

The SDK works on model classes rather than native Alexa JSON requests and responses. These model classes are generated using the Request, Response JSON schemas from the developer docs. The source code for the model classes can be found here.

Subpackages

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.application module

class ask_sdk_model.application.Application(application_id=None)

Bases: object

An object containing an application ID. This is used to verify that the request was intended for your service.

Parameters:application_id ((optional) str) – A string representing the application identifier for your skill.
attribute_map = {'application_id': 'applicationId'}
deserialized_types = {'application_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.cause module

class ask_sdk_model.cause.Cause(object_type=None)

Bases: object

Describes the type of the Cause.

Parameters:object_type ((optional) str) –

Note

This is an abstract class. Use the following mapping, to figure out the model class to be instantiated, that sets type variable.

attribute_map = {'object_type': 'type'}
deserialized_types = {'object_type': 'str'}
discriminator_value_class_map = {'ConnectionCompleted': 'ask_sdk_model.connection_completed.ConnectionCompleted'}
classmethod get_real_child_model(data)

Returns the real base class specified by the discriminator

json_discriminator_key = 'type'
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.connection_completed module

class ask_sdk_model.connection_completed.ConnectionCompleted(token=None, status=None, result=None)

Bases: ask_sdk_model.cause.Cause

Represents the status and result needed to resume a skill's suspended session.

Parameters:
  • token ((optional) str) – This is an echo back string that skills send when during Connections.StartConnection directive. They will receive it when they get the SessionResumedRequest. It is never sent to the skill handling the request.
  • status ((optional) ask_sdk_model.status.Status) –
  • result ((optional) object) – This is the result object to resume the skill's suspended session.
attribute_map = {'object_type': 'type', 'result': 'result', 'status': 'status', 'token': 'token'}
deserialized_types = {'object_type': 'str', 'result': 'object', 'status': 'ask_sdk_model.status.Status', '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.context module

class ask_sdk_model.context.Context(system=None, alexa_presentation_apl=None, audio_player=None, automotive=None, display=None, geolocation=None, viewport=None, viewports=None)

Bases: object

Parameters:
attribute_map = {'alexa_presentation_apl': 'Alexa.Presentation.APL', 'audio_player': 'AudioPlayer', 'automotive': 'Automotive', 'display': 'Display', 'geolocation': 'Geolocation', 'system': 'System', 'viewport': 'Viewport', 'viewports': 'Viewports'}
deserialized_types = {'alexa_presentation_apl': 'ask_sdk_model.interfaces.alexa.presentation.apl.rendered_document_state.RenderedDocumentState', 'audio_player': 'ask_sdk_model.interfaces.audioplayer.audio_player_state.AudioPlayerState', 'automotive': 'ask_sdk_model.interfaces.automotive.automotive_state.AutomotiveState', 'display': 'ask_sdk_model.interfaces.display.display_state.DisplayState', 'geolocation': 'ask_sdk_model.interfaces.geolocation.geolocation_state.GeolocationState', 'system': 'ask_sdk_model.interfaces.system.system_state.SystemState', 'viewport': 'ask_sdk_model.interfaces.viewport.viewport_state.ViewportState', 'viewports': 'list[ask_sdk_model.interfaces.viewport.typed_viewport_state.TypedViewportState]'}
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.device module

class ask_sdk_model.device.Device(device_id=None, supported_interfaces=None)

Bases: object

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.

Parameters:
  • device_id ((optional) str) – The deviceId property uniquely identifies the device.
  • supported_interfaces ((optional) ask_sdk_model.supported_interfaces.SupportedInterfaces) – 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
attribute_map = {'device_id': 'deviceId', 'supported_interfaces': 'supportedInterfaces'}
deserialized_types = {'device_id': 'str', 'supported_interfaces': 'ask_sdk_model.supported_interfaces.SupportedInterfaces'}
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.dialog_state module

class ask_sdk_model.dialog_state.DialogState

Bases: enum.Enum

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.

Allowed enum values: [STARTED, IN_PROGRESS, COMPLETED]

COMPLETED = 'COMPLETED'
IN_PROGRESS = 'IN_PROGRESS'
STARTED = 'STARTED'
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.directive module

class ask_sdk_model.directive.Directive(object_type=None)

Bases: object

Parameters:object_type ((optional) str) –

Note

This is an abstract class. Use the following mapping, to figure out the model class to be instantiated, that sets type variable.







Alexa.Presentation.APL.SendIndexListData: ask_sdk_model.interfaces.alexa.presentation.apl.send_index_list_data_directive.SendIndexListDataDirective,























Alexa.Presentation.APL.UpdateIndexListData: ask_sdk_model.interfaces.alexa.presentation.apl.update_index_list_data_directive.UpdateIndexListDataDirective
attribute_map = {'object_type': 'type'}
deserialized_types = {'object_type': 'str'}
discriminator_value_class_map = {'Alexa.Presentation.APL.ExecuteCommands': 'ask_sdk_model.interfaces.alexa.presentation.apl.execute_commands_directive.ExecuteCommandsDirective', 'Alexa.Presentation.APL.RenderDocument': 'ask_sdk_model.interfaces.alexa.presentation.apl.render_document_directive.RenderDocumentDirective', 'Alexa.Presentation.APL.SendIndexListData': 'ask_sdk_model.interfaces.alexa.presentation.apl.send_index_list_data_directive.SendIndexListDataDirective', 'Alexa.Presentation.APL.UpdateIndexListData': 'ask_sdk_model.interfaces.alexa.presentation.apl.update_index_list_data_directive.UpdateIndexListDataDirective', 'Alexa.Presentation.APLT.ExecuteCommands': 'ask_sdk_model.interfaces.alexa.presentation.aplt.execute_commands_directive.ExecuteCommandsDirective', 'Alexa.Presentation.APLT.RenderDocument': 'ask_sdk_model.interfaces.alexa.presentation.aplt.render_document_directive.RenderDocumentDirective', 'Alexa.Presentation.HTML.HandleMessage': 'ask_sdk_model.interfaces.alexa.presentation.html.handle_message_directive.HandleMessageDirective', 'Alexa.Presentation.HTML.Start': 'ask_sdk_model.interfaces.alexa.presentation.html.start_directive.StartDirective', 'AudioPlayer.ClearQueue': 'ask_sdk_model.interfaces.audioplayer.clear_queue_directive.ClearQueueDirective', 'AudioPlayer.Play': 'ask_sdk_model.interfaces.audioplayer.play_directive.PlayDirective', 'AudioPlayer.Stop': 'ask_sdk_model.interfaces.audioplayer.stop_directive.StopDirective', 'Connections.SendRequest': 'ask_sdk_model.interfaces.connections.send_request_directive.SendRequestDirective', 'Connections.SendResponse': 'ask_sdk_model.interfaces.connections.send_response_directive.SendResponseDirective', 'Connections.StartConnection': 'ask_sdk_model.interfaces.connections.v1.start_connection_directive.StartConnectionDirective', 'CustomInterfaceController.SendDirective': 'ask_sdk_model.interfaces.custom_interface_controller.send_directive_directive.SendDirectiveDirective', 'CustomInterfaceController.StartEventHandler': 'ask_sdk_model.interfaces.custom_interface_controller.start_event_handler_directive.StartEventHandlerDirective', 'CustomInterfaceController.StopEventHandler': 'ask_sdk_model.interfaces.custom_interface_controller.stop_event_handler_directive.StopEventHandlerDirective', 'Dialog.ConfirmIntent': 'ask_sdk_model.dialog.confirm_intent_directive.ConfirmIntentDirective', 'Dialog.ConfirmSlot': 'ask_sdk_model.dialog.confirm_slot_directive.ConfirmSlotDirective', 'Dialog.Delegate': 'ask_sdk_model.dialog.delegate_directive.DelegateDirective', 'Dialog.ElicitSlot': 'ask_sdk_model.dialog.elicit_slot_directive.ElicitSlotDirective', 'Dialog.UpdateDynamicEntities': 'ask_sdk_model.dialog.dynamic_entities_directive.DynamicEntitiesDirective', 'Display.RenderTemplate': 'ask_sdk_model.interfaces.display.render_template_directive.RenderTemplateDirective', 'GadgetController.SetLight': 'ask_sdk_model.interfaces.gadget_controller.set_light_directive.SetLightDirective', 'GameEngine.StartInputHandler': 'ask_sdk_model.interfaces.game_engine.start_input_handler_directive.StartInputHandlerDirective', 'GameEngine.StopInputHandler': 'ask_sdk_model.interfaces.game_engine.stop_input_handler_directive.StopInputHandlerDirective', 'Hint': 'ask_sdk_model.interfaces.display.hint_directive.HintDirective', 'Navigation.Assistance.AnnounceRoadRegulation': 'ask_sdk_model.interfaces.navigation.assistance.announce_road_regulation.AnnounceRoadRegulation', 'Tasks.CompleteTask': 'ask_sdk_model.interfaces.tasks.complete_task_directive.CompleteTaskDirective', 'VideoApp.Launch': 'ask_sdk_model.interfaces.videoapp.launch_directive.LaunchDirective'}
classmethod get_real_child_model(data)

Returns the real base class specified by the discriminator

json_discriminator_key = 'type'
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.intent module

class ask_sdk_model.intent.Intent(name=None, slots=None, confirmation_status=None)

Bases: object

An object that represents what the user wants.

Parameters:
attribute_map = {'confirmation_status': 'confirmationStatus', 'name': 'name', 'slots': 'slots'}
deserialized_types = {'confirmation_status': 'ask_sdk_model.intent_confirmation_status.IntentConfirmationStatus', 'name': 'str', 'slots': 'dict(str, ask_sdk_model.slot.Slot)'}
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.intent_confirmation_status module

class ask_sdk_model.intent_confirmation_status.IntentConfirmationStatus

Bases: enum.Enum

Indication of whether an intent or slot has been explicitly confirmed or denied by the user, or neither.

Allowed enum values: [NONE, DENIED, CONFIRMED]

CONFIRMED = 'CONFIRMED'
DENIED = 'DENIED'
NONE = 'NONE'
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.intent_request module

class ask_sdk_model.intent_request.IntentRequest(request_id=None, timestamp=None, locale=None, dialog_state=None, intent=None)

Bases: ask_sdk_model.request.Request

An IntentRequest is an object that represents a request made to a skill based on what the user wants to do.

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.
  • dialog_state ((optional) ask_sdk_model.dialog_state.DialogState) – 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.
  • intent ((optional) ask_sdk_model.intent.Intent) – An object that represents what the user wants.
attribute_map = {'dialog_state': 'dialogState', 'intent': 'intent', 'locale': 'locale', 'object_type': 'type', 'request_id': 'requestId', 'timestamp': 'timestamp'}
deserialized_types = {'dialog_state': 'ask_sdk_model.dialog_state.DialogState', 'intent': 'ask_sdk_model.intent.Intent', 'locale': 'str', 'object_type': 'str', 'request_id': 'str', 'timestamp': 'datetime'}
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.launch_request module

class ask_sdk_model.launch_request.LaunchRequest(request_id=None, timestamp=None, locale=None, task=None)

Bases: ask_sdk_model.request.Request

Represents that a user made a request to an Alexa skill, but did not provide a specific intent.

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.
  • task ((optional) ask_sdk_model.task.Task) –
attribute_map = {'locale': 'locale', 'object_type': 'type', 'request_id': 'requestId', 'task': 'task', 'timestamp': 'timestamp'}
deserialized_types = {'locale': 'str', 'object_type': 'str', 'request_id': 'str', 'task': 'ask_sdk_model.task.Task', 'timestamp': 'datetime'}
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.permission_status module

class ask_sdk_model.permission_status.PermissionStatus

Bases: enum.Enum

This denotes the status of the permission scope.

Allowed enum values: [GRANTED, DENIED]

DENIED = 'DENIED'
GRANTED = 'GRANTED'
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.permissions module

class ask_sdk_model.permissions.Permissions(consent_token=None, scopes=None)

Bases: object

Contains a consentToken allowing the skill access to information that the customer has consented to provide, such as address information. Note that the consentToken is deprecated. Use the apiAccessToken available in the context object to determine the user’s permissions.

Parameters:
  • consent_token ((optional) str) – A token listing all the permissions granted for this user.
  • scopes ((optional) dict(str, ask_sdk_model.scope.Scope)) – A map where the key is a LoginWithAmazon(LWA) scope and value is a list of key:value pairs which describe the state of user actions on the LWA scope. For e.g. "scopes" :{ "alexa::devices:all:geolocation:read":{"status":"GRANTED"}} This value of "alexa::devices:all:geolocation:read" will determine if the Geolocation data access is granted by the user, or else it will show a card of type AskForPermissionsConsent to the user to get this permission.
attribute_map = {'consent_token': 'consentToken', 'scopes': 'scopes'}
deserialized_types = {'consent_token': 'str', 'scopes': 'dict(str, ask_sdk_model.scope.Scope)'}
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.person module

class ask_sdk_model.person.Person(person_id=None, access_token=None)

Bases: object

An object that describes the user (person) who is making the request.

Parameters:
  • person_id ((optional) str) – A string that represents a unique identifier for the person who is making the request. The length of this identifier can vary, but is never more than 255 characters. It is generated when a recognized user makes a request to your skill.
  • access_token ((optional) str) – A token identifying the user in another system. This is only provided if the recognized user has successfully linked their skill account with their Alexa profile. The accessToken field will not appear if null.
attribute_map = {'access_token': 'accessToken', 'person_id': 'personId'}
deserialized_types = {'access_token': 'str', 'person_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.request module

class ask_sdk_model.request.Request(object_type=None, request_id=None, timestamp=None, locale=None)

Bases: object

A request object that provides the details of the user’s request. The request body contains the parameters necessary for the service to perform its logic and generate a response.

Parameters:
  • object_type ((optional) str) – Describes the type of the request.
  • 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.

Note

This is an abstract class. Use the following mapping, to figure out the model class to be instantiated, that sets type variable.








Alexa.Presentation.APL.LoadIndexListData: ask_sdk_model.interfaces.alexa.presentation.apl.load_index_list_data_event.LoadIndexListDataEvent,


























Alexa.Presentation.APL.RuntimeError: ask_sdk_model.interfaces.alexa.presentation.apl.runtime_error_event.RuntimeErrorEvent,

Alexa.Presentation.HTML.RuntimeError: ask_sdk_model.interfaces.alexa.presentation.html.runtime_error_request.RuntimeErrorRequest,










attribute_map = {'locale': 'locale', 'object_type': 'type', 'request_id': 'requestId', 'timestamp': 'timestamp'}
deserialized_types = {'locale': 'str', 'object_type': 'str', 'request_id': 'str', 'timestamp': 'datetime'}
discriminator_value_class_map = {'Alexa.Presentation.APL.LoadIndexListData': 'ask_sdk_model.interfaces.alexa.presentation.apl.load_index_list_data_event.LoadIndexListDataEvent', 'Alexa.Presentation.APL.RuntimeError': 'ask_sdk_model.interfaces.alexa.presentation.apl.runtime_error_event.RuntimeErrorEvent', 'Alexa.Presentation.APL.UserEvent': 'ask_sdk_model.interfaces.alexa.presentation.apl.user_event.UserEvent', 'Alexa.Presentation.APLT.UserEvent': 'ask_sdk_model.interfaces.alexa.presentation.aplt.user_event.UserEvent', 'Alexa.Presentation.HTML.Message': 'ask_sdk_model.interfaces.alexa.presentation.html.message_request.MessageRequest', 'Alexa.Presentation.HTML.RuntimeError': 'ask_sdk_model.interfaces.alexa.presentation.html.runtime_error_request.RuntimeErrorRequest', 'AlexaHouseholdListEvent.ItemsCreated': 'ask_sdk_model.services.list_management.list_items_created_event_request.ListItemsCreatedEventRequest', 'AlexaHouseholdListEvent.ItemsDeleted': 'ask_sdk_model.services.list_management.list_items_deleted_event_request.ListItemsDeletedEventRequest', 'AlexaHouseholdListEvent.ItemsUpdated': 'ask_sdk_model.services.list_management.list_items_updated_event_request.ListItemsUpdatedEventRequest', 'AlexaHouseholdListEvent.ListCreated': 'ask_sdk_model.services.list_management.list_created_event_request.ListCreatedEventRequest', 'AlexaHouseholdListEvent.ListDeleted': 'ask_sdk_model.services.list_management.list_deleted_event_request.ListDeletedEventRequest', 'AlexaHouseholdListEvent.ListUpdated': 'ask_sdk_model.services.list_management.list_updated_event_request.ListUpdatedEventRequest', 'AlexaSkillEvent.ProactiveSubscriptionChanged': 'ask_sdk_model.events.skillevents.proactive_subscription_changed_request.ProactiveSubscriptionChangedRequest', 'AlexaSkillEvent.SkillAccountLinked': 'ask_sdk_model.events.skillevents.account_linked_request.AccountLinkedRequest', 'AlexaSkillEvent.SkillDisabled': 'ask_sdk_model.events.skillevents.skill_disabled_request.SkillDisabledRequest', 'AlexaSkillEvent.SkillEnabled': 'ask_sdk_model.events.skillevents.skill_enabled_request.SkillEnabledRequest', 'AlexaSkillEvent.SkillPermissionAccepted': 'ask_sdk_model.events.skillevents.permission_accepted_request.PermissionAcceptedRequest', 'AlexaSkillEvent.SkillPermissionChanged': 'ask_sdk_model.events.skillevents.permission_changed_request.PermissionChangedRequest', 'AudioPlayer.PlaybackFailed': 'ask_sdk_model.interfaces.audioplayer.playback_failed_request.PlaybackFailedRequest', 'AudioPlayer.PlaybackFinished': 'ask_sdk_model.interfaces.audioplayer.playback_finished_request.PlaybackFinishedRequest', 'AudioPlayer.PlaybackNearlyFinished': 'ask_sdk_model.interfaces.audioplayer.playback_nearly_finished_request.PlaybackNearlyFinishedRequest', 'AudioPlayer.PlaybackStarted': 'ask_sdk_model.interfaces.audioplayer.playback_started_request.PlaybackStartedRequest', 'AudioPlayer.PlaybackStopped': 'ask_sdk_model.interfaces.audioplayer.playback_stopped_request.PlaybackStoppedRequest', 'CanFulfillIntentRequest': 'ask_sdk_model.canfulfill.can_fulfill_intent_request.CanFulfillIntentRequest', 'Connections.Request': 'ask_sdk_model.interfaces.connections.connections_request.ConnectionsRequest', 'Connections.Response': 'ask_sdk_model.interfaces.connections.connections_response.ConnectionsResponse', 'CustomInterfaceController.EventsReceived': 'ask_sdk_model.interfaces.custom_interface_controller.events_received_request.EventsReceivedRequest', 'CustomInterfaceController.Expired': 'ask_sdk_model.interfaces.custom_interface_controller.expired_request.ExpiredRequest', 'Display.ElementSelected': 'ask_sdk_model.interfaces.display.element_selected_request.ElementSelectedRequest', 'GameEngine.InputHandlerEvent': 'ask_sdk_model.interfaces.game_engine.input_handler_event_request.InputHandlerEventRequest', 'IntentRequest': 'ask_sdk_model.intent_request.IntentRequest', 'LaunchRequest': 'ask_sdk_model.launch_request.LaunchRequest', 'Messaging.MessageReceived': 'ask_sdk_model.interfaces.messaging.message_received_request.MessageReceivedRequest', 'PlaybackController.NextCommandIssued': 'ask_sdk_model.interfaces.playbackcontroller.next_command_issued_request.NextCommandIssuedRequest', 'PlaybackController.PauseCommandIssued': 'ask_sdk_model.interfaces.playbackcontroller.pause_command_issued_request.PauseCommandIssuedRequest', 'PlaybackController.PlayCommandIssued': 'ask_sdk_model.interfaces.playbackcontroller.play_command_issued_request.PlayCommandIssuedRequest', 'PlaybackController.PreviousCommandIssued': 'ask_sdk_model.interfaces.playbackcontroller.previous_command_issued_request.PreviousCommandIssuedRequest', 'Reminders.ReminderCreated': 'ask_sdk_model.services.reminder_management.reminder_created_event_request.ReminderCreatedEventRequest', 'Reminders.ReminderDeleted': 'ask_sdk_model.services.reminder_management.reminder_deleted_event_request.ReminderDeletedEventRequest', 'Reminders.ReminderStarted': 'ask_sdk_model.services.reminder_management.reminder_started_event_request.ReminderStartedEventRequest', 'Reminders.ReminderStatusChanged': 'ask_sdk_model.services.reminder_management.reminder_status_changed_event_request.ReminderStatusChangedEventRequest', 'Reminders.ReminderUpdated': 'ask_sdk_model.services.reminder_management.reminder_updated_event_request.ReminderUpdatedEventRequest', 'SessionEndedRequest': 'ask_sdk_model.session_ended_request.SessionEndedRequest', 'SessionResumedRequest': 'ask_sdk_model.session_resumed_request.SessionResumedRequest', 'System.ExceptionEncountered': 'ask_sdk_model.interfaces.system.exception_encountered_request.ExceptionEncounteredRequest'}
classmethod get_real_child_model(data)

Returns the real base class specified by the discriminator

json_discriminator_key = 'type'
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.request_envelope module

class ask_sdk_model.request_envelope.RequestEnvelope(version=None, session=None, context=None, request=None)

Bases: object

Request wrapper for all requests sent to your Skill.

Parameters:
  • version ((optional) str) – The version specifier for the request.
  • session ((optional) ask_sdk_model.session.Session) – The session object provides additional context associated with the request.
  • context ((optional) ask_sdk_model.context.Context) – The context object provides your skill with information about the current state of the Alexa service and device at the time the request is sent to your service. This is included on all requests. For requests sent in the context of a session (LaunchRequest and IntentRequest), the context object duplicates the user and application information that is also available in the session.
  • request ((optional) ask_sdk_model.request.Request) – A request object that provides the details of the user’s request.
attribute_map = {'context': 'context', 'request': 'request', 'session': 'session', 'version': 'version'}
deserialized_types = {'context': 'ask_sdk_model.context.Context', 'request': 'ask_sdk_model.request.Request', 'session': 'ask_sdk_model.session.Session', 'version': '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.response module

class ask_sdk_model.response.Response(output_speech=None, card=None, reprompt=None, directives=None, should_end_session=None, can_fulfill_intent=None)

Bases: object

Parameters:
attribute_map = {'can_fulfill_intent': 'canFulfillIntent', 'card': 'card', 'directives': 'directives', 'output_speech': 'outputSpeech', 'reprompt': 'reprompt', 'should_end_session': 'shouldEndSession'}
deserialized_types = {'can_fulfill_intent': 'ask_sdk_model.canfulfill.can_fulfill_intent.CanFulfillIntent', 'card': 'ask_sdk_model.ui.card.Card', 'directives': 'list[ask_sdk_model.directive.Directive]', 'output_speech': 'ask_sdk_model.ui.output_speech.OutputSpeech', 'reprompt': 'ask_sdk_model.ui.reprompt.Reprompt', 'should_end_session': 'bool'}
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.response_envelope module

class ask_sdk_model.response_envelope.ResponseEnvelope(version=None, session_attributes=None, user_agent=None, response=None)

Bases: object

Parameters:
attribute_map = {'response': 'response', 'session_attributes': 'sessionAttributes', 'user_agent': 'userAgent', 'version': 'version'}
deserialized_types = {'response': 'ask_sdk_model.response.Response', 'session_attributes': 'dict(str, object)', 'user_agent': 'str', 'version': '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.scope module

class ask_sdk_model.scope.Scope(status=None)

Bases: object

This is the value of LoginWithAmazon(LWA) consent scope. This object is used as in the key-value pairs that are provided in user.permissions.scopes object

Parameters:status ((optional) ask_sdk_model.permission_status.PermissionStatus) –
attribute_map = {'status': 'status'}
deserialized_types = {'status': 'ask_sdk_model.permission_status.PermissionStatus'}
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.session module

class ask_sdk_model.session.Session(new=None, session_id=None, user=None, attributes=None, application=None)

Bases: object

Represents a single execution of the alexa service

Parameters:
  • new ((optional) bool) – A boolean value indicating whether this is a new session. Returns true for a new session or false for an existing session.
  • session_id ((optional) str) – A string that represents a unique identifier per a user’s active session.
  • user ((optional) ask_sdk_model.user.User) – An object that describes the user making the request.
  • attributes ((optional) dict(str, object)) – A map of key-value pairs. The attributes map is empty for requests where a new session has started with the property new set to true. When returning your response, you can include data you need to persist during the session in the sessionAttributes property. The attributes you provide are then passed back to your skill on the next request.
  • application ((optional) ask_sdk_model.application.Application) –
attribute_map = {'application': 'application', 'attributes': 'attributes', 'new': 'new', 'session_id': 'sessionId', 'user': 'user'}
deserialized_types = {'application': 'ask_sdk_model.application.Application', 'attributes': 'dict(str, object)', 'new': 'bool', 'session_id': 'str', 'user': 'ask_sdk_model.user.User'}
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.session_ended_error module

class ask_sdk_model.session_ended_error.SessionEndedError(object_type=None, message=None)

Bases: object

An error object providing more information about the error that occurred.

Parameters:
attribute_map = {'message': 'message', 'object_type': 'type'}
deserialized_types = {'message': 'str', 'object_type': 'ask_sdk_model.session_ended_error_type.SessionEndedErrorType'}
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.session_ended_error_type module

class ask_sdk_model.session_ended_error_type.SessionEndedErrorType

Bases: enum.Enum

A string indicating the type of error that occurred.

Allowed enum values: [INVALID_RESPONSE, DEVICE_COMMUNICATION_ERROR, INTERNAL_SERVICE_ERROR, ENDPOINT_TIMEOUT]

DEVICE_COMMUNICATION_ERROR = 'DEVICE_COMMUNICATION_ERROR'
ENDPOINT_TIMEOUT = 'ENDPOINT_TIMEOUT'
INTERNAL_SERVICE_ERROR = 'INTERNAL_SERVICE_ERROR'
INVALID_RESPONSE = 'INVALID_RESPONSE'
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.session_ended_reason module

class ask_sdk_model.session_ended_reason.SessionEndedReason

Bases: enum.Enum

The reason why session ended when not initiated from the Skill itself.

Allowed enum values: [USER_INITIATED, ERROR, EXCEEDED_MAX_REPROMPTS]

ERROR = 'ERROR'
EXCEEDED_MAX_REPROMPTS = 'EXCEEDED_MAX_REPROMPTS'
USER_INITIATED = 'USER_INITIATED'
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.session_ended_request module

class ask_sdk_model.session_ended_request.SessionEndedRequest(request_id=None, timestamp=None, locale=None, reason=None, error=None)

Bases: ask_sdk_model.request.Request

A SessionEndedRequest is an object that represents a request made to an Alexa skill to notify that a session was ended. Your service receives a SessionEndedRequest when a currently open session is closed for one of the following reasons: <ol><li>The user says “exit”</li><li>the user does not respond or says something that does not match an intent defined in your voice interface while the device is listening for the user’s response</li><li>an error occurs</li></ol>

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.
  • reason ((optional) ask_sdk_model.session_ended_reason.SessionEndedReason) – Describes why the session ended.
  • error ((optional) ask_sdk_model.session_ended_error.SessionEndedError) – An error object providing more information about the error that occurred.
attribute_map = {'error': 'error', 'locale': 'locale', 'object_type': 'type', 'reason': 'reason', 'request_id': 'requestId', 'timestamp': 'timestamp'}
deserialized_types = {'error': 'ask_sdk_model.session_ended_error.SessionEndedError', 'locale': 'str', 'object_type': 'str', 'reason': 'ask_sdk_model.session_ended_reason.SessionEndedReason', 'request_id': 'str', 'timestamp': 'datetime'}
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.session_resumed_request module

class ask_sdk_model.session_resumed_request.SessionResumedRequest(request_id=None, timestamp=None, locale=None, cause=None)

Bases: ask_sdk_model.request.Request

The request to resume a skill's session and tells the skill why it is resumed.

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.
  • cause ((optional) ask_sdk_model.cause.Cause) –
attribute_map = {'cause': 'cause', 'locale': 'locale', 'object_type': 'type', 'request_id': 'requestId', 'timestamp': 'timestamp'}
deserialized_types = {'cause': 'ask_sdk_model.cause.Cause', 'locale': 'str', 'object_type': 'str', 'request_id': 'str', 'timestamp': 'datetime'}
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.slot module

class ask_sdk_model.slot.Slot(name=None, value=None, confirmation_status=None, resolutions=None)

Bases: object

Parameters:
  • name ((optional) str) – A string that represents the name of the slot.
  • value ((optional) str) – 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.
  • confirmation_status ((optional) ask_sdk_model.slot_confirmation_status.SlotConfirmationStatus) – Indication of whether an intent or slot has been explicitly confirmed or denied by the user, or neither.
  • resolutions ((optional) ask_sdk_model.slu.entityresolution.resolutions.Resolutions) – Contains the results of 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.
attribute_map = {'confirmation_status': 'confirmationStatus', 'name': 'name', 'resolutions': 'resolutions', 'value': 'value'}
deserialized_types = {'confirmation_status': 'ask_sdk_model.slot_confirmation_status.SlotConfirmationStatus', 'name': 'str', 'resolutions': 'ask_sdk_model.slu.entityresolution.resolutions.Resolutions', 'value': '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.slot_confirmation_status module

class ask_sdk_model.slot_confirmation_status.SlotConfirmationStatus

Bases: enum.Enum

An enumeration indicating whether the user has explicitly confirmed or denied the value of this slot.

Allowed enum values: [NONE, DENIED, CONFIRMED]

CONFIRMED = 'CONFIRMED'
DENIED = 'DENIED'
NONE = 'NONE'
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model

ask_sdk_model.status module

class ask_sdk_model.status.Status(code=None, message=None)

Bases: object

Status indicates a high level understanding of the result of an execution.

Parameters:
  • code ((optional) str) – This is a code signifying the status of the execution initiated by the skill. Protocol adheres to HTTP status codes.
  • message ((optional) str) – This is a message that goes along with response code that can provide more information about what occurred.
attribute_map = {'code': 'code', 'message': 'message'}
deserialized_types = {'code': 'str', 'message': '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.supported_interfaces module

class ask_sdk_model.supported_interfaces.SupportedInterfaces(alexa_presentation_apl=None, alexa_presentation_aplt=None, alexa_presentation_html=None, audio_player=None, display=None, video_app=None, geolocation=None, navigation=None)

Bases: object

An object listing 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.

Parameters:
attribute_map = {'alexa_presentation_apl': 'Alexa.Presentation.APL', 'alexa_presentation_aplt': 'Alexa.Presentation.APLT', 'alexa_presentation_html': 'Alexa.Presentation.HTML', 'audio_player': 'AudioPlayer', 'display': 'Display', 'geolocation': 'Geolocation', 'navigation': 'Navigation', 'video_app': 'VideoApp'}
deserialized_types = {'alexa_presentation_apl': 'ask_sdk_model.interfaces.alexa.presentation.apl.alexa_presentation_apl_interface.AlexaPresentationAplInterface', 'alexa_presentation_aplt': 'ask_sdk_model.interfaces.alexa.presentation.aplt.alexa_presentation_aplt_interface.AlexaPresentationApltInterface', 'alexa_presentation_html': 'ask_sdk_model.interfaces.alexa.presentation.html.alexa_presentation_html_interface.AlexaPresentationHtmlInterface', 'audio_player': 'ask_sdk_model.interfaces.audioplayer.audio_player_interface.AudioPlayerInterface', 'display': 'ask_sdk_model.interfaces.display.display_interface.DisplayInterface', 'geolocation': 'ask_sdk_model.interfaces.geolocation.geolocation_interface.GeolocationInterface', 'navigation': 'ask_sdk_model.interfaces.navigation.navigation_interface.NavigationInterface', 'video_app': 'ask_sdk_model.interfaces.videoapp.video_app_interface.VideoAppInterface'}
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.task module

class ask_sdk_model.task.Task(name=None, version=None, input=None)

Bases: object

This object encapsulates a specific functionality.

Parameters:
  • name ((optional) str) – Represents the name of the task.
  • version ((optional) str) – Represents the version of the task.
  • input ((optional) object) – Represents the input to handle the task.
attribute_map = {'input': 'input', 'name': 'name', 'version': 'version'}
deserialized_types = {'input': 'object', 'name': 'str', 'version': '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.user module

class ask_sdk_model.user.User(user_id=None, access_token=None, permissions=None)

Bases: object

An object that describes the Amazon account for which the skill is enabled.

Parameters:
  • user_id ((optional) str) – A string that represents a unique identifier for the user who made the request. The length of this identifier can vary, but is never more than 255 characters. The userId is automatically generated when a user enables the skill in the Alexa app. Note: Disabling and re-enabling a skill generates a new identifier.
  • access_token ((optional) str) – A token identifying the user in another system. This is only provided if the user has successfully linked their skill account with their Amazon account.
  • permissions ((optional) ask_sdk_model.permissions.Permissions) –
attribute_map = {'access_token': 'accessToken', 'permissions': 'permissions', 'user_id': 'userId'}
deserialized_types = {'access_token': 'str', 'permissions': 'ask_sdk_model.permissions.Permissions', 'user_id': 'str'}
supports_multiple_types = False
to_dict()

Returns the model properties as a dict

to_str()

Returns the string representation of the model