Skip to content

Commit 833242f

Browse files
author
ask-pyth
committed
Release 1.6.1. For changelog, check CHANGELOG.rst
1 parent b2be629 commit 833242f

File tree

8 files changed

+111
-13
lines changed

8 files changed

+111
-13
lines changed

ask-sdk-model/CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,12 @@ This release includes the following:
9090
This release includes the following :
9191

9292
- Models for Reminders
93+
94+
95+
1.6.1
96+
^^^^^^^
97+
98+
This release contains the following changes:
99+
100+
- Updated enum values for Reminder Status
101+
- Updated OutputSpeech model

ask-sdk-model/ask_sdk_model/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
__pip_package_name__ = 'ask-sdk-model'
1515
__description__ = 'The ASK SDK Model package provides model definitions, for building Alexa Skills.'
1616
__url__ = 'https://github.com/alexa/alexa-apis-for-python'
17-
__version__ = '1.6.0'
17+
__version__ = '1.6.1'
1818
__author__ = 'Alexa Skills Kit'
1919
__author_email__ = 'ask-sdk-dynamic@amazon.com'
2020
__license__ = 'Apache 2.0'

ask-sdk-model/ask_sdk_model/services/reminder_management/status.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ class Status(Enum):
3131
3232
3333
34-
Allowed enum values: [true, COMPLETED]
34+
Allowed enum values: [ON, COMPLETED]
3535
"""
36-
true = "true"
36+
ON = "ON"
3737
COMPLETED = "COMPLETED"
3838
def to_dict(self):
3939
# type: () -> Dict[str, object]

ask-sdk-model/ask_sdk_model/ui/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
from .output_speech import OutputSpeech
2323
from .image import Image
2424
from .card import Card
25+
from .play_behavior import PlayBehavior
2526
from .ask_for_permissions_consent_card import AskForPermissionsConsentCard
2627
from .simple_card import SimpleCard

ask-sdk-model/ask_sdk_model/ui/output_speech.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@
2424
if typing.TYPE_CHECKING:
2525
from typing import Dict, List, Optional
2626
from datetime import datetime
27+
from ask_sdk_model.ui.play_behavior import PlayBehavior
2728

2829

2930
class OutputSpeech(object):
3031
"""
3132
3233
:param object_type:
3334
:type object_type: (optional) str
35+
:param play_behavior:
36+
:type play_behavior: (optional) ask_sdk_model.ui.play_behavior.PlayBehavior
3437
3538
.. note::
3639
@@ -43,11 +46,13 @@ class OutputSpeech(object):
4346
4447
"""
4548
deserialized_types = {
46-
'object_type': 'str'
49+
'object_type': 'str',
50+
'play_behavior': 'ask_sdk_model.ui.play_behavior.PlayBehavior'
4751
}
4852

4953
attribute_map = {
50-
'object_type': 'type'
54+
'object_type': 'type',
55+
'play_behavior': 'playBehavior'
5156
}
5257

5358
discriminator_value_class_map = {
@@ -60,16 +65,19 @@ class OutputSpeech(object):
6065
__metaclass__ = ABCMeta
6166

6267
@abstractmethod
63-
def __init__(self, object_type=None):
64-
# type: (Optional[str]) -> None
68+
def __init__(self, object_type=None, play_behavior=None):
69+
# type: (Optional[str], Optional[PlayBehavior]) -> None
6570
"""
6671
6772
:param object_type:
6873
:type object_type: (optional) str
74+
:param play_behavior:
75+
:type play_behavior: (optional) ask_sdk_model.ui.play_behavior.PlayBehavior
6976
"""
7077
self.__discriminator_value = None
7178

7279
self.object_type = object_type
80+
self.play_behavior = play_behavior
7381

7482
@classmethod
7583
def get_real_child_model(cls, data):

ask-sdk-model/ask_sdk_model/ui/plain_text_output_speech.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,43 @@
2424
if typing.TYPE_CHECKING:
2525
from typing import Dict, List, Optional
2626
from datetime import datetime
27+
from ask_sdk_model.ui.play_behavior import PlayBehavior
2728

2829

2930
class PlainTextOutputSpeech(OutputSpeech):
3031
"""
3132
33+
:param play_behavior:
34+
:type play_behavior: (optional) ask_sdk_model.ui.play_behavior.PlayBehavior
3235
:param text:
3336
:type text: (optional) str
3437
3538
"""
3639
deserialized_types = {
3740
'object_type': 'str',
41+
'play_behavior': 'ask_sdk_model.ui.play_behavior.PlayBehavior',
3842
'text': 'str'
3943
}
4044

4145
attribute_map = {
4246
'object_type': 'type',
47+
'play_behavior': 'playBehavior',
4348
'text': 'text'
4449
}
4550

46-
def __init__(self, text=None):
47-
# type: (Optional[str]) -> None
51+
def __init__(self, play_behavior=None, text=None):
52+
# type: (Optional[PlayBehavior], Optional[str]) -> None
4853
"""
4954
55+
:param play_behavior:
56+
:type play_behavior: (optional) ask_sdk_model.ui.play_behavior.PlayBehavior
5057
:param text:
5158
:type text: (optional) str
5259
"""
5360
self.__discriminator_value = "PlainText"
5461

5562
self.object_type = self.__discriminator_value
56-
super(PlainTextOutputSpeech, self).__init__(object_type=self.__discriminator_value)
63+
super(PlainTextOutputSpeech, self).__init__(object_type=self.__discriminator_value, play_behavior=play_behavior)
5764
self.text = text
5865

5966
def to_dict(self):
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# coding: utf-8
2+
3+
#
4+
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
# except in compliance with the License. A copy of the License is located at
8+
#
9+
# http://aws.amazon.com/apache2.0/
10+
#
11+
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
13+
# the specific language governing permissions and limitations under the License.
14+
#
15+
16+
import pprint
17+
import re # noqa: F401
18+
import six
19+
import typing
20+
from enum import Enum
21+
22+
23+
if typing.TYPE_CHECKING:
24+
from typing import Dict, List, Optional
25+
from datetime import datetime
26+
27+
28+
class PlayBehavior(Enum):
29+
"""
30+
Determines whether Alexa will queue or play this output speech immediately interrupting other speech
31+
32+
33+
34+
Allowed enum values: [ENQUEUE, REPLACE_ALL, REPLACE_ENQUEUED]
35+
"""
36+
ENQUEUE = "ENQUEUE"
37+
REPLACE_ALL = "REPLACE_ALL"
38+
REPLACE_ENQUEUED = "REPLACE_ENQUEUED"
39+
def to_dict(self):
40+
# type: () -> Dict[str, object]
41+
"""Returns the model properties as a dict"""
42+
result = {self.name: self.value}
43+
return result
44+
45+
def to_str(self):
46+
# type: () -> str
47+
"""Returns the string representation of the model"""
48+
return pprint.pformat(self.value)
49+
50+
def __repr__(self):
51+
# type: () -> str
52+
"""For `print` and `pprint`"""
53+
return self.to_str()
54+
55+
def __eq__(self, other):
56+
# type: (object) -> bool
57+
"""Returns true if both objects are equal"""
58+
if not isinstance(other, PlayBehavior):
59+
return False
60+
61+
return self.__dict__ == other.__dict__
62+
63+
def __ne__(self, other):
64+
# type: (object) -> bool
65+
"""Returns true if both objects are not equal"""
66+
return not self == other

ask-sdk-model/ask_sdk_model/ui/ssml_output_speech.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,43 @@
2424
if typing.TYPE_CHECKING:
2525
from typing import Dict, List, Optional
2626
from datetime import datetime
27+
from ask_sdk_model.ui.play_behavior import PlayBehavior
2728

2829

2930
class SsmlOutputSpeech(OutputSpeech):
3031
"""
3132
33+
:param play_behavior:
34+
:type play_behavior: (optional) ask_sdk_model.ui.play_behavior.PlayBehavior
3235
:param ssml:
3336
:type ssml: (optional) str
3437
3538
"""
3639
deserialized_types = {
3740
'object_type': 'str',
41+
'play_behavior': 'ask_sdk_model.ui.play_behavior.PlayBehavior',
3842
'ssml': 'str'
3943
}
4044

4145
attribute_map = {
4246
'object_type': 'type',
47+
'play_behavior': 'playBehavior',
4348
'ssml': 'ssml'
4449
}
4550

46-
def __init__(self, ssml=None):
47-
# type: (Optional[str]) -> None
51+
def __init__(self, play_behavior=None, ssml=None):
52+
# type: (Optional[PlayBehavior], Optional[str]) -> None
4853
"""
4954
55+
:param play_behavior:
56+
:type play_behavior: (optional) ask_sdk_model.ui.play_behavior.PlayBehavior
5057
:param ssml:
5158
:type ssml: (optional) str
5259
"""
5360
self.__discriminator_value = "SSML"
5461

5562
self.object_type = self.__discriminator_value
56-
super(SsmlOutputSpeech, self).__init__(object_type=self.__discriminator_value)
63+
super(SsmlOutputSpeech, self).__init__(object_type=self.__discriminator_value, play_behavior=play_behavior)
5764
self.ssml = ssml
5865

5966
def to_dict(self):

0 commit comments

Comments
 (0)