diff --git a/ask-sdk-model/CHANGELOG.rst b/ask-sdk-model/CHANGELOG.rst index 53576e5..7c6f7ea 100644 --- a/ask-sdk-model/CHANGELOG.rst +++ b/ask-sdk-model/CHANGELOG.rst @@ -371,3 +371,13 @@ This release contains the following changes : This release contains the following changes : - APL for Audio now sends RuntimeError requests that notify developer of any errors that happened during APLA processing. + + +1.30.0 +~~~~~~ + +This release contains the following changes : + +- Add support for APL 1.6 version. More information about the newest version can be found `here `__. + + diff --git a/ask-sdk-model/ask_sdk_model/__version__.py b/ask-sdk-model/ask_sdk_model/__version__.py index d2cde3e..521242a 100644 --- a/ask-sdk-model/ask_sdk_model/__version__.py +++ b/ask-sdk-model/ask_sdk_model/__version__.py @@ -14,7 +14,7 @@ __pip_package_name__ = 'ask-sdk-model' __description__ = 'The ASK SDK Model package provides model definitions, for building Alexa Skills.' __url__ = 'https://github.com/alexa/alexa-apis-for-python' -__version__ = '1.29.0' +__version__ = '1.30.0' __author__ = 'Alexa Skills Kit' __author_email__ = 'ask-sdk-dynamic@amazon.com' __license__ = 'Apache 2.0' diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/__init__.py index c1bfcd2..2093a16 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/__init__.py @@ -43,6 +43,7 @@ from .component_visible_on_screen_media_tag import ComponentVisibleOnScreenMediaTag from .transform_property import TransformProperty from .send_index_list_data_directive import SendIndexListDataDirective +from .select_command import SelectCommand from .align import Align from .highlight_mode import HighlightMode from .sequential_command import SequentialCommand @@ -50,6 +51,7 @@ from .execute_commands_directive import ExecuteCommandsDirective from .component_visible_on_screen_scrollable_tag import ComponentVisibleOnScreenScrollableTag from .move_transform_property import MoveTransformProperty +from .finish_command import FinishCommand from .clear_focus_command import ClearFocusCommand from .component_entity import ComponentEntity from .command import Command @@ -64,10 +66,12 @@ from .send_event_command import SendEventCommand from .component_visible_on_screen_tags import ComponentVisibleOnScreenTags from .alexa_presentation_apl_interface import AlexaPresentationAplInterface +from .reinflate_command import ReinflateCommand from .component_visible_on_screen_viewport_tag import ComponentVisibleOnScreenViewportTag from .set_state_command import SetStateCommand from .rotate_transform_property import RotateTransformProperty from .scroll_to_index_command import ScrollToIndexCommand +from .scroll_to_component_command import ScrollToComponentCommand from .speak_list_command import SpeakListCommand from .media_command_type import MediaCommandType from .rendered_document_state import RenderedDocumentState diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animate_item_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animate_item_command.py index df9d4d6..f1c4d5e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animate_item_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animate_item_command.py @@ -37,6 +37,10 @@ class AnimateItemCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The ID of the animated component. @@ -57,6 +61,8 @@ class AnimateItemCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'component_id': 'str', 'duration': 'int', @@ -70,6 +76,8 @@ class AnimateItemCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'component_id': 'componentId', 'duration': 'duration', @@ -80,14 +88,18 @@ class AnimateItemCommand(Command): } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, component_id=None, duration=None, easing='linear', repeat_count=None, repeat_mode=None, value=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Union[int, str, None], Optional[str], Union[int, str, None], Optional[AnimateItemRepeatMode_22d93893], Optional[List[AnimatedProperty_b438632b]]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, component_id=None, duration=None, easing='linear', repeat_count=None, repeat_mode=None, value=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[str], Union[int, str, None], Optional[str], Union[int, str, None], Optional[AnimateItemRepeatMode_22d93893], Optional[List[AnimatedProperty_b438632b]]) -> None """Runs a fixed-duration animation sequence on one or more properties of a single component. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The ID of the animated component. @@ -106,7 +118,7 @@ def __init__(self, delay=None, description=None, when=None, component_id=None, d self.__discriminator_value = "AnimateItem" # type: str self.object_type = self.__discriminator_value - super(AnimateItemCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(AnimateItemCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.component_id = component_id self.duration = duration self.easing = easing diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/auto_page_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/auto_page_command.py index 9c05c3d..8c69690 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/auto_page_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/auto_page_command.py @@ -35,6 +35,10 @@ class AutoPageCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The id of the Pager component. @@ -49,6 +53,8 @@ class AutoPageCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'component_id': 'str', 'count': 'int', @@ -59,6 +65,8 @@ class AutoPageCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'component_id': 'componentId', 'count': 'count', @@ -66,14 +74,18 @@ class AutoPageCommand(Command): } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, component_id=None, count=None, duration=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Union[int, str, None], Union[int, str, None]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, component_id=None, count=None, duration=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[str], Union[int, str, None], Union[int, str, None]) -> None """Automatically progress through a series of pages displayed in a Pager component. The AutoPage command finishes after the last page has been displayed for the requested time period. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The id of the Pager component. @@ -86,7 +98,7 @@ def __init__(self, delay=None, description=None, when=None, component_id=None, c self.__discriminator_value = "AutoPage" # type: str self.object_type = self.__discriminator_value - super(AutoPageCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(AutoPageCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.component_id = component_id self.count = count self.duration = duration diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/clear_focus_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/clear_focus_command.py index 47d3517..dc34f50 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/clear_focus_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/clear_focus_command.py @@ -35,6 +35,10 @@ class ClearFocusCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool @@ -43,6 +47,8 @@ class ClearFocusCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool' } # type: Dict @@ -50,25 +56,31 @@ class ClearFocusCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when' } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None): - # type: (Union[int, str, None], Optional[str], Optional[bool]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool]) -> None """Removes focus from the component that is currently in focus. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool """ self.__discriminator_value = "ClearFocus" # type: str self.object_type = self.__discriminator_value - super(ClearFocusCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(ClearFocusCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/command.py index 2a2cc9c..8790680 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/command.py @@ -37,6 +37,10 @@ class Command(object): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool @@ -49,6 +53,8 @@ class Command(object): | | ControlMedia: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.control_media_command.ControlMediaCommand`, | + | Finish: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.finish_command.FinishCommand`, + | | AutoPage: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.auto_page_command.AutoPageCommand`, | | PlayMedia: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.play_media_command.PlayMediaCommand`, @@ -63,6 +69,8 @@ class Command(object): | | SpeakList: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.speak_list_command.SpeakListCommand`, | + | Select: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.select_command.SelectCommand`, + | | Sequential: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.sequential_command.SequentialCommand`, | | SetState: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.set_state_command.SetStateCommand`, @@ -73,19 +81,25 @@ class Command(object): | | OpenURL: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.open_url_command.OpenUrlCommand`, | + | Reinflate: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.reinflate_command.ReinflateCommand`, + | | ClearFocus: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.clear_focus_command.ClearFocusCommand`, | | ScrollToIndex: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.scroll_to_index_command.ScrollToIndexCommand`, | | SetValue: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.set_value_command.SetValueCommand`, | - | SetFocus: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.set_focus_command.SetFocusCommand` + | SetFocus: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.set_focus_command.SetFocusCommand`, + | + | ScrollToComponent: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.scroll_to_component_command.ScrollToComponentCommand` """ deserialized_types = { 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool' } # type: Dict @@ -93,6 +107,8 @@ class Command(object): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when' } # type: Dict supports_multiple_types = False @@ -100,6 +116,7 @@ class Command(object): discriminator_value_class_map = { 'SetPage': 'ask_sdk_model.interfaces.alexa.presentation.apl.set_page_command.SetPageCommand', 'ControlMedia': 'ask_sdk_model.interfaces.alexa.presentation.apl.control_media_command.ControlMediaCommand', + 'Finish': 'ask_sdk_model.interfaces.alexa.presentation.apl.finish_command.FinishCommand', 'AutoPage': 'ask_sdk_model.interfaces.alexa.presentation.apl.auto_page_command.AutoPageCommand', 'PlayMedia': 'ask_sdk_model.interfaces.alexa.presentation.apl.play_media_command.PlayMediaCommand', 'Scroll': 'ask_sdk_model.interfaces.alexa.presentation.apl.scroll_command.ScrollCommand', @@ -107,15 +124,18 @@ class Command(object): 'AnimateItem': 'ask_sdk_model.interfaces.alexa.presentation.apl.animate_item_command.AnimateItemCommand', 'SendEvent': 'ask_sdk_model.interfaces.alexa.presentation.apl.send_event_command.SendEventCommand', 'SpeakList': 'ask_sdk_model.interfaces.alexa.presentation.apl.speak_list_command.SpeakListCommand', + 'Select': 'ask_sdk_model.interfaces.alexa.presentation.apl.select_command.SelectCommand', 'Sequential': 'ask_sdk_model.interfaces.alexa.presentation.apl.sequential_command.SequentialCommand', 'SetState': 'ask_sdk_model.interfaces.alexa.presentation.apl.set_state_command.SetStateCommand', 'SpeakItem': 'ask_sdk_model.interfaces.alexa.presentation.apl.speak_item_command.SpeakItemCommand', 'Parallel': 'ask_sdk_model.interfaces.alexa.presentation.apl.parallel_command.ParallelCommand', 'OpenURL': 'ask_sdk_model.interfaces.alexa.presentation.apl.open_url_command.OpenUrlCommand', + 'Reinflate': 'ask_sdk_model.interfaces.alexa.presentation.apl.reinflate_command.ReinflateCommand', 'ClearFocus': 'ask_sdk_model.interfaces.alexa.presentation.apl.clear_focus_command.ClearFocusCommand', 'ScrollToIndex': 'ask_sdk_model.interfaces.alexa.presentation.apl.scroll_to_index_command.ScrollToIndexCommand', 'SetValue': 'ask_sdk_model.interfaces.alexa.presentation.apl.set_value_command.SetValueCommand', - 'SetFocus': 'ask_sdk_model.interfaces.alexa.presentation.apl.set_focus_command.SetFocusCommand' + 'SetFocus': 'ask_sdk_model.interfaces.alexa.presentation.apl.set_focus_command.SetFocusCommand', + 'ScrollToComponent': 'ask_sdk_model.interfaces.alexa.presentation.apl.scroll_to_component_command.ScrollToComponentCommand' } json_discriminator_key = "type" @@ -123,8 +143,8 @@ class Command(object): __metaclass__ = ABCMeta @abstractmethod - def __init__(self, object_type=None, delay=None, description=None, when=None): - # type: (Optional[str], Union[int, str, None], Optional[str], Optional[bool]) -> None + def __init__(self, object_type=None, delay=None, description=None, screen_lock=None, sequencer=None, when=None): + # type: (Optional[str], Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool]) -> None """A message that can change the visual or audio presentation of the content on the screen. :param object_type: Defines the command type and dictates which properties must/can be included. @@ -133,6 +153,10 @@ def __init__(self, object_type=None, delay=None, description=None, when=None): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool """ @@ -141,6 +165,8 @@ def __init__(self, object_type=None, delay=None, description=None, when=None): self.object_type = object_type self.delay = delay self.description = description + self.screen_lock = screen_lock + self.sequencer = sequencer self.when = when @classmethod diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/control_media_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/control_media_command.py index 7cd29e9..f568d14 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/control_media_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/control_media_command.py @@ -36,6 +36,10 @@ class ControlMediaCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param command: The command to issue on the media player @@ -50,6 +54,8 @@ class ControlMediaCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'command': 'ask_sdk_model.interfaces.alexa.presentation.apl.media_command_type.MediaCommandType', 'component_id': 'str', @@ -60,6 +66,8 @@ class ControlMediaCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'command': 'command', 'component_id': 'componentId', @@ -67,14 +75,18 @@ class ControlMediaCommand(Command): } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, command=None, component_id=None, value=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[MediaCommandType_47512d90], Optional[str], Union[int, str, None]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, command=None, component_id=None, value=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[MediaCommandType_47512d90], Optional[str], Union[int, str, None]) -> None """Control a media player to play, pause, change tracks, or perform some other common action. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param command: The command to issue on the media player @@ -87,7 +99,7 @@ def __init__(self, delay=None, description=None, when=None, command=None, compon self.__discriminator_value = "ControlMedia" # type: str self.object_type = self.__discriminator_value - super(ControlMediaCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(ControlMediaCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.command = command self.component_id = component_id self.value = value diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/finish_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/finish_command.py new file mode 100644 index 0000000..5d7a75b --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/finish_command.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +# +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file +# except in compliance with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for +# the specific language governing permissions and limitations under the License. +# + +import pprint +import re # noqa: F401 +import six +import typing +from enum import Enum +from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class FinishCommand(Command): + """ + The finish command closes the current APL document and exits. + + + :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. + :type delay: (optional) int + :param description: A user-provided description of this command. + :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str + :param when: If false, the execution of the command is skipped. Defaults to true. + :type when: (optional) bool + + """ + deserialized_types = { + 'object_type': 'str', + 'delay': 'int', + 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', + 'when': 'bool' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'delay': 'delay', + 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', + 'when': 'when' + } # type: Dict + supports_multiple_types = False + + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool]) -> None + """The finish command closes the current APL document and exits. + + :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. + :type delay: (optional) int + :param description: A user-provided description of this command. + :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str + :param when: If false, the execution of the command is skipped. Defaults to true. + :type when: (optional) bool + """ + self.__discriminator_value = "Finish" # type: str + + self.object_type = self.__discriminator_value + super(FinishCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) + + def to_dict(self): + # type: () -> Dict[str, object] + """Returns the model properties as a dict""" + result = {} # type: Dict + + for attr, _ in six.iteritems(self.deserialized_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else + x.value if isinstance(x, Enum) else x, + value + )) + elif isinstance(value, Enum): + result[attr] = value.value + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else + (item[0], item[1].value) + if isinstance(item[1], Enum) else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, FinishCommand): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (object) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/idle_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/idle_command.py index d70519b..022c7a4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/idle_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/idle_command.py @@ -35,6 +35,10 @@ class IdleCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool @@ -43,6 +47,8 @@ class IdleCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool' } # type: Dict @@ -50,25 +56,31 @@ class IdleCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when' } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None): - # type: (Union[int, str, None], Optional[str], Optional[bool]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool]) -> None """The idle command does nothing. It may be a placeholder or used to insert a calculated delay in a longer series of commands. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool """ self.__discriminator_value = "Idle" # type: str self.object_type = self.__discriminator_value - super(IdleCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(IdleCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/open_url_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/open_url_command.py index 72fa861..28202aa 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/open_url_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/open_url_command.py @@ -36,6 +36,10 @@ class OpenUrlCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param source: The URL to open @@ -48,6 +52,8 @@ class OpenUrlCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'source': 'str', 'on_fail': 'list[ask_sdk_model.interfaces.alexa.presentation.apl.command.Command]' @@ -57,20 +63,26 @@ class OpenUrlCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'source': 'source', 'on_fail': 'onFail' } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, source=None, on_fail=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[List[Command_bc5ff832]]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, source=None, on_fail=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[str], Optional[List[Command_bc5ff832]]) -> None """Opens a url with web browser or other application on the device. The APL author is responsible for providing a suitable URL that works on the current device. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param source: The URL to open @@ -81,7 +93,7 @@ def __init__(self, delay=None, description=None, when=None, source=None, on_fail self.__discriminator_value = "OpenURL" # type: str self.object_type = self.__discriminator_value - super(OpenUrlCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(OpenUrlCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.source = source self.on_fail = on_fail diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/parallel_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/parallel_command.py index f701a42..cf92d1a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/parallel_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/parallel_command.py @@ -36,6 +36,10 @@ class ParallelCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param commands: An un-ordered array of commands to execute in parallel. Once all commands have finished executing the parallel command finishes. Please note that the delay of parallel command and the delay of each command are additive. @@ -46,6 +50,8 @@ class ParallelCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'commands': 'list[ask_sdk_model.interfaces.alexa.presentation.apl.command.Command]' } # type: Dict @@ -54,19 +60,25 @@ class ParallelCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'commands': 'commands' } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, commands=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[List[Command_bc5ff832]]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, commands=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[List[Command_bc5ff832]]) -> None """Execute a series of commands in parallel. The parallel command starts executing all child command simultaneously. The parallel command is considered finished when all of its child commands have finished. When the parallel command is terminated early, all currently executing commands are terminated. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param commands: An un-ordered array of commands to execute in parallel. Once all commands have finished executing the parallel command finishes. Please note that the delay of parallel command and the delay of each command are additive. @@ -75,7 +87,7 @@ def __init__(self, delay=None, description=None, when=None, commands=None): self.__discriminator_value = "Parallel" # type: str self.object_type = self.__discriminator_value - super(ParallelCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(ParallelCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.commands = commands def to_dict(self): diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/play_media_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/play_media_command.py index 07d0e2d..bfc48b5 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/play_media_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/play_media_command.py @@ -37,6 +37,10 @@ class PlayMediaCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param audio_track: The command to issue on the media player @@ -51,6 +55,8 @@ class PlayMediaCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'audio_track': 'ask_sdk_model.interfaces.alexa.presentation.apl.audio_track.AudioTrack', 'component_id': 'str', @@ -61,6 +67,8 @@ class PlayMediaCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'audio_track': 'audioTrack', 'component_id': 'componentId', @@ -68,14 +76,18 @@ class PlayMediaCommand(Command): } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, audio_track=None, component_id=None, source=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[AudioTrack_485ca517], Optional[str], Optional[List[VideoSource_96b69bdd]]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, audio_track=None, component_id=None, source=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[AudioTrack_485ca517], Optional[str], Optional[List[VideoSource_96b69bdd]]) -> None """Plays media on a media player (currently only a Video player; audio may be added in the future). The media may be on the background audio track or may be sequenced with speak directives). :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param audio_track: The command to issue on the media player @@ -88,7 +100,7 @@ def __init__(self, delay=None, description=None, when=None, audio_track=None, co self.__discriminator_value = "PlayMedia" # type: str self.object_type = self.__discriminator_value - super(PlayMediaCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(PlayMediaCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.audio_track = audio_track self.component_id = component_id self.source = source diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/reinflate_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/reinflate_command.py new file mode 100644 index 0000000..13dd652 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/reinflate_command.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +# +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file +# except in compliance with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for +# the specific language governing permissions and limitations under the License. +# + +import pprint +import re # noqa: F401 +import six +import typing +from enum import Enum +from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ReinflateCommand(Command): + """ + The reinflate command reinflates the current document with updated configuration properties. + + + :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. + :type delay: (optional) int + :param description: A user-provided description of this command. + :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str + :param when: If false, the execution of the command is skipped. Defaults to true. + :type when: (optional) bool + + """ + deserialized_types = { + 'object_type': 'str', + 'delay': 'int', + 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', + 'when': 'bool' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'delay': 'delay', + 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', + 'when': 'when' + } # type: Dict + supports_multiple_types = False + + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool]) -> None + """The reinflate command reinflates the current document with updated configuration properties. + + :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. + :type delay: (optional) int + :param description: A user-provided description of this command. + :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str + :param when: If false, the execution of the command is skipped. Defaults to true. + :type when: (optional) bool + """ + self.__discriminator_value = "Reinflate" # type: str + + self.object_type = self.__discriminator_value + super(ReinflateCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) + + def to_dict(self): + # type: () -> Dict[str, object] + """Returns the model properties as a dict""" + result = {} # type: Dict + + for attr, _ in six.iteritems(self.deserialized_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else + x.value if isinstance(x, Enum) else x, + value + )) + elif isinstance(value, Enum): + result[attr] = value.value + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else + (item[0], item[1].value) + if isinstance(item[1], Enum) else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ReinflateCommand): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (object) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scroll_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scroll_command.py index 53b5008..90bc9f3 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scroll_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scroll_command.py @@ -35,6 +35,10 @@ class ScrollCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param distance: The number of pages to scroll. Defaults to 1. @@ -47,6 +51,8 @@ class ScrollCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'distance': 'int', 'component_id': 'str' @@ -56,20 +62,26 @@ class ScrollCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'distance': 'distance', 'component_id': 'componentId' } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, distance=None, component_id=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Union[int, str, None], Optional[str]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, distance=None, component_id=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Union[int, str, None], Optional[str]) -> None """Scroll a ScrollView or Sequence forward or backward by a number of pages. The Scroll command has the following properties in addition to the regular command properties. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param distance: The number of pages to scroll. Defaults to 1. @@ -80,7 +92,7 @@ def __init__(self, delay=None, description=None, when=None, distance=None, compo self.__discriminator_value = "Scroll" # type: str self.object_type = self.__discriminator_value - super(ScrollCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(ScrollCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.distance = distance self.component_id = component_id diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scroll_to_component_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scroll_to_component_command.py new file mode 100644 index 0000000..53270cb --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scroll_to_component_command.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +# +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file +# except in compliance with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for +# the specific language governing permissions and limitations under the License. +# + +import pprint +import re # noqa: F401 +import six +import typing +from enum import Enum +from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.presentation.apl.align import Align as Align_70ae0466 + + +class ScrollToComponentCommand(Command): + """ + Scroll forward or backward through a ScrollView or Sequence to ensure that a particular component is in view. + + + :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. + :type delay: (optional) int + :param description: A user-provided description of this command. + :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str + :param when: If false, the execution of the command is skipped. Defaults to true. + :type when: (optional) bool + :param align: + :type align: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.align.Align + :param component_id: The id of the component. If omitted, the component issuing the ScrollToComponent command is used. + :type component_id: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'delay': 'int', + 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', + 'when': 'bool', + 'align': 'ask_sdk_model.interfaces.alexa.presentation.apl.align.Align', + 'component_id': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'delay': 'delay', + 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', + 'when': 'when', + 'align': 'align', + 'component_id': 'componentId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, align=None, component_id=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[Align_70ae0466], Optional[str]) -> None + """Scroll forward or backward through a ScrollView or Sequence to ensure that a particular component is in view. + + :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. + :type delay: (optional) int + :param description: A user-provided description of this command. + :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str + :param when: If false, the execution of the command is skipped. Defaults to true. + :type when: (optional) bool + :param align: + :type align: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.align.Align + :param component_id: The id of the component. If omitted, the component issuing the ScrollToComponent command is used. + :type component_id: (optional) str + """ + self.__discriminator_value = "ScrollToComponent" # type: str + + self.object_type = self.__discriminator_value + super(ScrollToComponentCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) + self.align = align + self.component_id = component_id + + def to_dict(self): + # type: () -> Dict[str, object] + """Returns the model properties as a dict""" + result = {} # type: Dict + + for attr, _ in six.iteritems(self.deserialized_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else + x.value if isinstance(x, Enum) else x, + value + )) + elif isinstance(value, Enum): + result[attr] = value.value + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else + (item[0], item[1].value) + if isinstance(item[1], Enum) else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ScrollToComponentCommand): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (object) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scroll_to_index_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scroll_to_index_command.py index 076d3fe..9f3e2c4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scroll_to_index_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scroll_to_index_command.py @@ -36,6 +36,10 @@ class ScrollToIndexCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param align: @@ -50,6 +54,8 @@ class ScrollToIndexCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'align': 'ask_sdk_model.interfaces.alexa.presentation.apl.align.Align', 'component_id': 'str', @@ -60,6 +66,8 @@ class ScrollToIndexCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'align': 'align', 'component_id': 'componentId', @@ -67,14 +75,18 @@ class ScrollToIndexCommand(Command): } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, align=None, component_id=None, index=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[Align_70ae0466], Optional[str], Union[int, str, None]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, align=None, component_id=None, index=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[Align_70ae0466], Optional[str], Union[int, str, None]) -> None """Scroll forward or backward through a ScrollView or Sequence to ensure that a particular child component is in view. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param align: @@ -87,7 +99,7 @@ def __init__(self, delay=None, description=None, when=None, align=None, componen self.__discriminator_value = "ScrollToIndex" # type: str self.object_type = self.__discriminator_value - super(ScrollToIndexCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(ScrollToIndexCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.align = align self.component_id = component_id self.index = index diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/select_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/select_command.py new file mode 100644 index 0000000..ca2acd4 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/select_command.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +# +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file +# except in compliance with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for +# the specific language governing permissions and limitations under the License. +# + +import pprint +import re # noqa: F401 +import six +import typing +from enum import Enum +from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command as Command_bc5ff832 + + +class SelectCommand(Command): + """ + Select a single command from an array of commands and data. + + + :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. + :type delay: (optional) int + :param description: A user-provided description of this command. + :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str + :param when: If false, the execution of the command is skipped. Defaults to true. + :type when: (optional) bool + :param commands: An ordered list of commands to select from. + :type commands: (optional) list[ask_sdk_model.interfaces.alexa.presentation.apl.command.Command] + :param data: A list of data to map against the commands. + :type data: (optional) list[object] + :param otherwise: Commands to execute if nothing else runs. + :type otherwise: (optional) list[ask_sdk_model.interfaces.alexa.presentation.apl.command.Command] + + """ + deserialized_types = { + 'object_type': 'str', + 'delay': 'int', + 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', + 'when': 'bool', + 'commands': 'list[ask_sdk_model.interfaces.alexa.presentation.apl.command.Command]', + 'data': 'list[object]', + 'otherwise': 'list[ask_sdk_model.interfaces.alexa.presentation.apl.command.Command]' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'delay': 'delay', + 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', + 'when': 'when', + 'commands': 'commands', + 'data': 'data', + 'otherwise': 'otherwise' + } # type: Dict + supports_multiple_types = False + + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, commands=None, data=None, otherwise=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[List[Command_bc5ff832]], Optional[List[object]], Optional[List[Command_bc5ff832]]) -> None + """Select a single command from an array of commands and data. + + :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. + :type delay: (optional) int + :param description: A user-provided description of this command. + :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str + :param when: If false, the execution of the command is skipped. Defaults to true. + :type when: (optional) bool + :param commands: An ordered list of commands to select from. + :type commands: (optional) list[ask_sdk_model.interfaces.alexa.presentation.apl.command.Command] + :param data: A list of data to map against the commands. + :type data: (optional) list[object] + :param otherwise: Commands to execute if nothing else runs. + :type otherwise: (optional) list[ask_sdk_model.interfaces.alexa.presentation.apl.command.Command] + """ + self.__discriminator_value = "Select" # type: str + + self.object_type = self.__discriminator_value + super(SelectCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) + self.commands = commands + self.data = data + self.otherwise = otherwise + + def to_dict(self): + # type: () -> Dict[str, object] + """Returns the model properties as a dict""" + result = {} # type: Dict + + for attr, _ in six.iteritems(self.deserialized_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else + x.value if isinstance(x, Enum) else x, + value + )) + elif isinstance(value, Enum): + result[attr] = value.value + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else + (item[0], item[1].value) + if isinstance(item[1], Enum) else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SelectCommand): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (object) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/send_event_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/send_event_command.py index 0db308f..d5ed0a6 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/send_event_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/send_event_command.py @@ -35,6 +35,10 @@ class SendEventCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param arguments: An array of argument data to pass to Alexa. @@ -47,6 +51,8 @@ class SendEventCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'arguments': 'list[str]', 'components': 'list[str]' @@ -56,20 +62,26 @@ class SendEventCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'arguments': 'arguments', 'components': 'components' } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, arguments=None, components=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[List[object]], Optional[List[object]]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, arguments=None, components=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[List[object]], Optional[List[object]]) -> None """The SendEvent command allows the APL author to generate and send an event to Alexa. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param arguments: An array of argument data to pass to Alexa. @@ -80,7 +92,7 @@ def __init__(self, delay=None, description=None, when=None, arguments=None, comp self.__discriminator_value = "SendEvent" # type: str self.object_type = self.__discriminator_value - super(SendEventCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(SendEventCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.arguments = arguments self.components = components diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/sequential_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/sequential_command.py index 6bcf5b5..80a0927 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/sequential_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/sequential_command.py @@ -36,6 +36,10 @@ class SequentialCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param catch: An ordered list of commands to execute if this sequence is prematurely terminated. @@ -52,6 +56,8 @@ class SequentialCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'catch': 'list[ask_sdk_model.interfaces.alexa.presentation.apl.command.Command]', 'commands': 'list[ask_sdk_model.interfaces.alexa.presentation.apl.command.Command]', @@ -63,6 +69,8 @@ class SequentialCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'catch': 'catch', 'commands': 'commands', @@ -71,14 +79,18 @@ class SequentialCommand(Command): } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, catch=None, commands=None, object_finally=None, repeat_count=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[List[Command_bc5ff832]], Optional[List[Command_bc5ff832]], Optional[List[Command_bc5ff832]], Union[int, str, None]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, catch=None, commands=None, object_finally=None, repeat_count=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[List[Command_bc5ff832]], Optional[List[Command_bc5ff832]], Optional[List[Command_bc5ff832]], Union[int, str, None]) -> None """A sequential command executes a series of commands in order. The sequential command executes the command list in order, waiting for the previous command to finish before executing the next. The sequential command is finished when all of its child commands have finished. When the Sequential command is terminated early, the currently executing command is terminated and no further commands are executed. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param catch: An ordered list of commands to execute if this sequence is prematurely terminated. @@ -93,7 +105,7 @@ def __init__(self, delay=None, description=None, when=None, catch=None, commands self.__discriminator_value = "Sequential" # type: str self.object_type = self.__discriminator_value - super(SequentialCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(SequentialCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.catch = catch self.commands = commands self.object_finally = object_finally diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_focus_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_focus_command.py index c8d929a..b5691d4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_focus_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_focus_command.py @@ -35,6 +35,10 @@ class SetFocusCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The ID of the component to set focus on. @@ -45,6 +49,8 @@ class SetFocusCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'component_id': 'str' } # type: Dict @@ -53,19 +59,25 @@ class SetFocusCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'component_id': 'componentId' } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, component_id=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, component_id=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[str]) -> None """Changes the actionable component that is in focus. Only one component may have focus at a time. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The ID of the component to set focus on. @@ -74,7 +86,7 @@ def __init__(self, delay=None, description=None, when=None, component_id=None): self.__discriminator_value = "SetFocus" # type: str self.object_type = self.__discriminator_value - super(SetFocusCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(SetFocusCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.component_id = component_id def to_dict(self): diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_page_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_page_command.py index a8d5e2b..05c546c 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_page_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_page_command.py @@ -36,6 +36,10 @@ class SetPageCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The id of the Pager component. @@ -50,6 +54,8 @@ class SetPageCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'component_id': 'str', 'position': 'ask_sdk_model.interfaces.alexa.presentation.apl.position.Position', @@ -60,6 +66,8 @@ class SetPageCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'component_id': 'componentId', 'position': 'position', @@ -67,14 +75,18 @@ class SetPageCommand(Command): } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, component_id=None, position=None, value=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[Position_8c9d1e98], Union[int, str, None]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, component_id=None, position=None, value=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[str], Optional[Position_8c9d1e98], Union[int, str, None]) -> None """Change the page displayed in a Pager component. The SetPage command finishes when the item is fully in view. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The id of the Pager component. @@ -87,7 +99,7 @@ def __init__(self, delay=None, description=None, when=None, component_id=None, p self.__discriminator_value = "SetPage" # type: str self.object_type = self.__discriminator_value - super(SetPageCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(SetPageCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.component_id = component_id self.position = position self.value = value diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_state_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_state_command.py index f8ae3a4..fd3072a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_state_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_state_command.py @@ -36,6 +36,10 @@ class SetStateCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The id of the component whose value should be set. @@ -50,6 +54,8 @@ class SetStateCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'component_id': 'str', 'state': 'ask_sdk_model.interfaces.alexa.presentation.apl.component_state.ComponentState', @@ -60,6 +66,8 @@ class SetStateCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'component_id': 'componentId', 'state': 'state', @@ -67,14 +75,18 @@ class SetStateCommand(Command): } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, component_id=None, state=None, value=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[ComponentState_c92e50c9], Union[bool, str, None]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, component_id=None, state=None, value=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[str], Optional[ComponentState_c92e50c9], Union[bool, str, None]) -> None """The SetState command changes one of the component’s state settings. The SetState command can be used to change the checked, disabled, and focused states. The karaoke and pressed states may not be directly set; use the Select command or SpeakItem commands to change those states. Also, note that the focused state may only be set - it can’t be cleared. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The id of the component whose value should be set. @@ -87,7 +99,7 @@ def __init__(self, delay=None, description=None, when=None, component_id=None, s self.__discriminator_value = "SetState" # type: str self.object_type = self.__discriminator_value - super(SetStateCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(SetStateCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.component_id = component_id self.state = state self.value = value diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_value_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_value_command.py index e774353..29f2f51 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_value_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/set_value_command.py @@ -35,6 +35,10 @@ class SetValueCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The id of the component whose value to set. @@ -49,6 +53,8 @@ class SetValueCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'component_id': 'str', 'object_property': 'str', @@ -59,6 +65,8 @@ class SetValueCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'component_id': 'componentId', 'object_property': 'property', @@ -66,14 +74,18 @@ class SetValueCommand(Command): } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, component_id=None, object_property=None, value=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[str], Optional[str]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, component_id=None, object_property=None, value=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[str], Optional[str], Optional[str]) -> None """Change a dynamic property of a component without redrawing the screen. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param component_id: The id of the component whose value to set. @@ -86,7 +98,7 @@ def __init__(self, delay=None, description=None, when=None, component_id=None, o self.__discriminator_value = "SetValue" # type: str self.object_type = self.__discriminator_value - super(SetValueCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(SetValueCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.component_id = component_id self.object_property = object_property self.value = value diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/speak_item_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/speak_item_command.py index 137a4a6..ccb56b3 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/speak_item_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/speak_item_command.py @@ -37,6 +37,10 @@ class SpeakItemCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param align: @@ -53,6 +57,8 @@ class SpeakItemCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'align': 'ask_sdk_model.interfaces.alexa.presentation.apl.align.Align', 'component_id': 'str', @@ -64,6 +70,8 @@ class SpeakItemCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'align': 'align', 'component_id': 'componentId', @@ -72,14 +80,18 @@ class SpeakItemCommand(Command): } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, align=None, component_id=None, highlight_mode=None, minimum_dwell_time=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[Align_70ae0466], Optional[str], Optional[HighlightMode_9965984d], Union[int, str, None]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, align=None, component_id=None, highlight_mode=None, minimum_dwell_time=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[Align_70ae0466], Optional[str], Optional[HighlightMode_9965984d], Union[int, str, None]) -> None """Reads the contents of a single item on the screen. By default the item will be scrolled into view if it is not currently visible. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param align: @@ -94,7 +106,7 @@ def __init__(self, delay=None, description=None, when=None, align=None, componen self.__discriminator_value = "SpeakItem" # type: str self.object_type = self.__discriminator_value - super(SpeakItemCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(SpeakItemCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.align = align self.component_id = component_id self.highlight_mode = highlight_mode diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/speak_list_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/speak_list_command.py index 56a8a9f..4c66462 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/speak_list_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/speak_list_command.py @@ -36,6 +36,10 @@ class SpeakListCommand(Command): :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param align: @@ -54,6 +58,8 @@ class SpeakListCommand(Command): 'object_type': 'str', 'delay': 'int', 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', 'when': 'bool', 'align': 'ask_sdk_model.interfaces.alexa.presentation.apl.align.Align', 'component_id': 'str', @@ -66,6 +72,8 @@ class SpeakListCommand(Command): 'object_type': 'type', 'delay': 'delay', 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', 'when': 'when', 'align': 'align', 'component_id': 'componentId', @@ -75,14 +83,18 @@ class SpeakListCommand(Command): } # type: Dict supports_multiple_types = False - def __init__(self, delay=None, description=None, when=None, align=None, component_id=None, count=None, minimum_dwell_time=None, start=None): - # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[Align_70ae0466], Optional[str], Union[int, str, None], Union[int, str, None], Union[int, str, None]) -> None + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, align=None, component_id=None, count=None, minimum_dwell_time=None, start=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[Align_70ae0466], Optional[str], Union[int, str, None], Union[int, str, None], Union[int, str, None]) -> None """Read the contents of a range of items inside a common container. Each item will scroll into view before speech. Each item should have a speech property, but it is not required. :param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0. :type delay: (optional) int :param description: A user-provided description of this command. :type description: (optional) str + :param screen_lock: If true, disable the Interaction Timer. + :type screen_lock: (optional) bool + :param sequencer: Specify the sequencer that should execute this command. + :type sequencer: (optional) str :param when: If false, the execution of the command is skipped. Defaults to true. :type when: (optional) bool :param align: @@ -99,7 +111,7 @@ def __init__(self, delay=None, description=None, when=None, align=None, componen self.__discriminator_value = "SpeakList" # type: str self.object_type = self.__discriminator_value - super(SpeakListCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when) + super(SpeakListCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) self.align = align self.component_id = component_id self.count = count