diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e15364bb..e1f23524 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -20,4 +20,4 @@ All Pull Requests will be automatically closed, unless the request is generic an - [ ] My code follows the code style of this project - [ ] My change requires a change to the documentation - [ ] The change is generic and can be done across all model classes. -- [ ] By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. +- [ ] By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. diff --git a/ask-sdk-model/CHANGELOG.rst b/ask-sdk-model/CHANGELOG.rst index 95a024a4..b32d0db4 100644 --- a/ask-sdk-model/CHANGELOG.rst +++ b/ask-sdk-model/CHANGELOG.rst @@ -332,3 +332,416 @@ This release contains the following changes : This release contains the following changes : - Introducing `person-level permissions `__ for Skill events. + + +1.26.0 +~~~~~~ + +This release contains the following changes : + +- Support for 'Alexa for residential' properties. More information about 'Alexa for residential' can be found here : https://developer.amazon.com/en-US/docs/alexa/alexa-smart-properties/about-alexa-for-residential.html + + +1.27.0 +~~~~~~ + +This release contains the following changes : +- Add “onCompletion” field in Connections.StartConnection directive. When sending this directive to start a Skill Connection, requester skill can set onCompletion to be RESUME_SESSION to receive the control back after the task is completed or SEND_ERRORS_ONLY to only receive error notifications without control back. More information about using Skill Connections to Request Tasks can be found `here `__. +- Add “Authorization.Grant” directive support for user specific access token in out-of-session calls. More information can be found `here `__. + + +1.28.0 +~~~~~~ + +This release contains the following changes : + +- Models and support for Extensions interfaces. + + +1.28.1 +^^^^^^ + +This release contains the following changes : + +- Updating model definitions + + +1.29.0 +~~~~~~ + +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 `__. + + + + +1.30.1 +^^^^^^ + +This release contains the following changes : + +- Adding missing definitions for APL 1.6. More information can be found `here `__. + + +1.31.0 +~~~~~~ + +This release includes the following: + +- Adding support for directives in Reprompt + + +1.31.1 +^^^^^^ + +This release contains the following changes : + +- Updating model definitions + +1.32.0 +^^^^^^ + +This release contains the following changes : + +- Models and support for `App Link Interfaces `__. + +1.32.1 +^^^^^^ + +This release contains the following changes : + +- Updated model definitions for reminder_management + +1.33.0 +^^^^^^ + +This release contains the following changes : + +- Support persistent identifier for endpoint ID where the skill request is issued from. + +1.33.1 +^^^^^^ + +This release contains the following changes : + +- Support for A/B testing experimentation SPI for GA + +1.34.0 +^^^^^^ + +This release contains the following changes : + +- Support for FTV and shopping skills +- Updated model definitions for experimentation SPIs + +1.34.1 +^^^^^^ + +This release contains the following changes : + +- Updating model definitions + + +1.34.2 +^^^^^^ + +This release contains the following changes : +* Added dataSources property in APL RenderedDocumentState + + +1.35.0 +~~~~~~ + +This release contains the following changes : + +- Added SearchAndRefineSucceeded event for Alexa.Search + + +1.36.0 +~~~~~~ + +General bug fixes and updates + + +1.37.0 +~~~~~~ + +General bug fixes and updates + + +1.38.0 +~~~~~~ + +General bug fixes and updates + + +1.39.0 +~~~~~~ + +General bug fixes and updates + + +1.40.0 +~~~~~~ + +General bug fixes and updates + + +1.41.0 +~~~~~~ + +General bug fixes and updates + + +1.42.0 +~~~~~~ + +General bug fixes and updates + + +1.43.0 +~~~~~~ + +General bug fixes and updates + + +1.44.0 +~~~~~~ + +General bug fixes and updates + + +1.45.0 +~~~~~~ + +General bug fixes and updates + + +1.46.0 +~~~~~~ + +General bug fixes and updates + + +1.47.0 +~~~~~~ + +General bug fixes and updates + + +1.48.0 +~~~~~~ + +General bug fixes and updates + + +1.49.0 +~~~~~~ + +General bug fixes and updates + + +1.50.0 +~~~~~~ + +General bug fixes and updates + + +1.51.0 +~~~~~~ + +General bug fixes and updates + + +1.52.0 +~~~~~~ + +General bug fixes and updates + + +1.53.0 +~~~~~~ + +General bug fixes and updates + + +1.54.0 +~~~~~~ + +General bug fixes and updates + + +1.55.0 +~~~~~~ + +General bug fixes and updates + + +1.56.0 +~~~~~~ + +General bug fixes and updates + + +1.57.0 +~~~~~~ + +General bug fixes and updates + + +1.58.0 +~~~~~~ + +General bug fixes and updates + + +1.59.0 +~~~~~~ + +General bug fixes and updates + + +1.60.0 +~~~~~~ + +General bug fixes and updates + + +1.61.0 +~~~~~~ + +General bug fixes and updates + + +1.62.0 +~~~~~~ + +General bug fixes and updates + + +1.63.0 +~~~~~~ + +General bug fixes and updates + + +1.64.0 +~~~~~~ + +General bug fixes and updates + + +1.65.0 +~~~~~~ + +General bug fixes and updates + + +1.66.0 +~~~~~~ + +General bug fixes and updates + + +1.67.0 +~~~~~~ + +General bug fixes and updates + + +1.68.0 +~~~~~~ + +General bug fixes and updates + + +1.69.0 +~~~~~~ + +General bug fixes and updates + + +1.70.0 +~~~~~~ + +General bug fixes and updates + + +1.71.0 +~~~~~~ + +General bug fixes and updates + + +1.72.0 +~~~~~~ + +General bug fixes and updates + + +1.73.0 +~~~~~~ + +General bug fixes and updates + + +1.74.0 +~~~~~~ + +General bug fixes and updates + + +1.75.0 +~~~~~~ + +General bug fixes and updates + + +1.76.0 +~~~~~~ + +General bug fixes and updates + + +1.77.0 +~~~~~~ + +General bug fixes and updates + + +1.78.0 +~~~~~~ + +General bug fixes and updates + + +1.79.0 +~~~~~~ + +General bug fixes and updates + + +1.80.0 +~~~~~~ + +General bug fixes and updates + + +1.81.0 +~~~~~~ + +General bug fixes and updates + + +1.82.0 +~~~~~~ + +General bug fixes and updates diff --git a/ask-sdk-model/ask_sdk_model/__init__.py b/ask-sdk-model/ask_sdk_model/__init__.py index cf431969..8685199a 100644 --- a/ask-sdk-model/ask_sdk_model/__init__.py +++ b/ask-sdk-model/ask_sdk_model/__init__.py @@ -14,37 +14,37 @@ # from __future__ import absolute_import +from .request_envelope import RequestEnvelope +from .session_ended_reason import SessionEndedReason from .intent_request import IntentRequest -from .permission_status import PermissionStatus -from .simple_slot_value import SimpleSlotValue +from .scope import Scope +from .dialog_state import DialogState +from .supported_interfaces import SupportedInterfaces +from .task import Task +from .slot_confirmation_status import SlotConfirmationStatus +from .cause import Cause +from .context import Context from .list_slot_value import ListSlotValue +from .session_ended_error_type import SessionEndedErrorType +from .directive import Directive +from .simple_slot_value import SimpleSlotValue +from .intent_confirmation_status import IntentConfirmationStatus +from .slot_value import SlotValue +from .slot import Slot from .application import Application +from .request import Request +from .session_resumed_request import SessionResumedRequest +from .permission_status import PermissionStatus from .permissions import Permissions -from .slot_confirmation_status import SlotConfirmationStatus -from .connection_completed import ConnectionCompleted -from .slot import Slot -from .task import Task -from .intent_confirmation_status import IntentConfirmationStatus -from .supported_interfaces import SupportedInterfaces +from .intent import Intent from .session_ended_error import SessionEndedError -from .status import Status +from .response_envelope import ResponseEnvelope +from .person import Person from .response import Response -from .directive import Directive -from .device import Device -from .session_ended_reason import SessionEndedReason +from .session import Session +from .status import Status from .user import User -from .scope import Scope -from .dialog_state import DialogState -from .slot_value import SlotValue from .launch_request import LaunchRequest -from .session import Session -from .session_resumed_request import SessionResumedRequest -from .response_envelope import ResponseEnvelope -from .request import Request from .session_ended_request import SessionEndedRequest -from .context import Context -from .person import Person -from .cause import Cause -from .request_envelope import RequestEnvelope -from .session_ended_error_type import SessionEndedErrorType -from .intent import Intent +from .device import Device +from .connection_completed import ConnectionCompleted diff --git a/ask-sdk-model/ask_sdk_model/__version__.py b/ask-sdk-model/ask_sdk_model/__version__.py index 01b12ab9..aac9a6b4 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.25.0' +__version__ = '1.82.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/application.py b/ask-sdk-model/ask_sdk_model/application.py index e54718c6..7ba1497d 100644 --- a/ask-sdk-model/ask_sdk_model/application.py +++ b/ask-sdk-model/ask_sdk_model/application.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/authorization/__init__.py b/ask-sdk-model/ask_sdk_model/authorization/__init__.py new file mode 100644 index 00000000..c7848efa --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/authorization/__init__.py @@ -0,0 +1,20 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + +from .grant_type import GrantType +from .authorization_grant_body import AuthorizationGrantBody +from .grant import Grant +from .authorization_grant_request import AuthorizationGrantRequest diff --git a/ask-sdk-model/ask_sdk_model/authorization/authorization_grant_body.py b/ask-sdk-model/ask_sdk_model/authorization/authorization_grant_body.py new file mode 100644 index 00000000..97d795df --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/authorization/authorization_grant_body.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.authorization.grant import Grant as Grant_b5a32265 + + +class AuthorizationGrantBody(object): + """ + Authorization grant body. + + + :param grant: + :type grant: (optional) ask_sdk_model.authorization.grant.Grant + + """ + deserialized_types = { + 'grant': 'ask_sdk_model.authorization.grant.Grant' + } # type: Dict + + attribute_map = { + 'grant': 'grant' + } # type: Dict + supports_multiple_types = False + + def __init__(self, grant=None): + # type: (Optional[Grant_b5a32265]) -> None + """Authorization grant body. + + :param grant: + :type grant: (optional) ask_sdk_model.authorization.grant.Grant + """ + self.__discriminator_value = None # type: str + + self.grant = grant + + 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, AuthorizationGrantBody): + 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/authorization/authorization_grant_request.py b/ask-sdk-model/ask_sdk_model/authorization/authorization_grant_request.py new file mode 100644 index 00000000..903d7cab --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/authorization/authorization_grant_request.py @@ -0,0 +1,132 @@ +# 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.request import Request + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.authorization.authorization_grant_body import AuthorizationGrantBody as AuthorizationGrantBody_afdf2aa3 + + +class AuthorizationGrantRequest(Request): + """ + Represents an authorization code delivered to a skill that has out-of-session permissions without requiring account linking. + + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param body: + :type body: (optional) ask_sdk_model.authorization.authorization_grant_body.AuthorizationGrantBody + + """ + deserialized_types = { + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'body': 'ask_sdk_model.authorization.authorization_grant_body.AuthorizationGrantBody' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', + 'body': 'body' + } # type: Dict + supports_multiple_types = False + + def __init__(self, request_id=None, timestamp=None, locale=None, body=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[AuthorizationGrantBody_afdf2aa3]) -> None + """Represents an authorization code delivered to a skill that has out-of-session permissions without requiring account linking. + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param body: + :type body: (optional) ask_sdk_model.authorization.authorization_grant_body.AuthorizationGrantBody + """ + self.__discriminator_value = "Alexa.Authorization.Grant" # type: str + + self.object_type = self.__discriminator_value + super(AuthorizationGrantRequest, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) + self.body = body + + 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, AuthorizationGrantRequest): + 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/authorization/grant.py b/ask-sdk-model/ask_sdk_model/authorization/grant.py new file mode 100644 index 00000000..d3a0429e --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/authorization/grant.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.authorization.grant_type import GrantType as GrantType_1a5423ca + + +class Grant(object): + """ + Information that identifies a user in Amazon Alexa systems. + + + :param object_type: Type of the grant. + :type object_type: (optional) ask_sdk_model.authorization.grant_type.GrantType + :param code: The authorization code for the user. + :type code: (optional) str + + """ + deserialized_types = { + 'object_type': 'ask_sdk_model.authorization.grant_type.GrantType', + 'code': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'code': 'code' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, code=None): + # type: (Optional[GrantType_1a5423ca], Optional[str]) -> None + """Information that identifies a user in Amazon Alexa systems. + + :param object_type: Type of the grant. + :type object_type: (optional) ask_sdk_model.authorization.grant_type.GrantType + :param code: The authorization code for the user. + :type code: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.code = code + + 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, Grant): + 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-smapi-model/ask_smapi_model/v1/skill/private/accept_status.py b/ask-sdk-model/ask_sdk_model/authorization/grant_type.py similarity index 78% rename from ask-smapi-model/ask_smapi_model/v1/skill/private/accept_status.py rename to ask-sdk-model/ask_sdk_model/authorization/grant_type.py index 3348117a..813fe21c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/private/accept_status.py +++ b/ask-sdk-model/ask_sdk_model/authorization/grant_type.py @@ -21,23 +21,22 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class AcceptStatus(Enum): +class GrantType(Enum): """ - Enterprise IT administrators' action on the private distribution. + One of the grant types supported. - Allowed enum values: [ACCEPTED, PENDING] + Allowed enum values: [OAuth2_AuthorizationCode] """ - ACCEPTED = "ACCEPTED" - PENDING = "PENDING" + OAuth2_AuthorizationCode = "OAuth2.AuthorizationCode" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,14 +52,14 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" - if not isinstance(other, AcceptStatus): + if not isinstance(other, GrantType): return False return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/py.typed b/ask-sdk-model/ask_sdk_model/authorization/py.typed similarity index 100% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/py.typed rename to ask-sdk-model/ask_sdk_model/authorization/py.typed diff --git a/ask-sdk-model/ask_sdk_model/canfulfill/__init__.py b/ask-sdk-model/ask_sdk_model/canfulfill/__init__.py index 93ed2bec..078b1de1 100644 --- a/ask-sdk-model/ask_sdk_model/canfulfill/__init__.py +++ b/ask-sdk-model/ask_sdk_model/canfulfill/__init__.py @@ -14,9 +14,9 @@ # from __future__ import absolute_import -from .can_fulfill_slot import CanFulfillSlot -from .can_fulfill_intent import CanFulfillIntent -from .can_fulfill_intent_request import CanFulfillIntentRequest from .can_fulfill_intent_values import CanFulfillIntentValues -from .can_understand_slot_values import CanUnderstandSlotValues +from .can_fulfill_intent_request import CanFulfillIntentRequest +from .can_fulfill_slot import CanFulfillSlot from .can_fulfill_slot_values import CanFulfillSlotValues +from .can_understand_slot_values import CanUnderstandSlotValues +from .can_fulfill_intent import CanFulfillIntent diff --git a/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent.py b/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent.py index eb33cba7..63c81322 100644 --- a/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent.py +++ b/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.canfulfill.can_fulfill_intent_values import CanFulfillIntentValues - from ask_sdk_model.canfulfill.can_fulfill_slot import CanFulfillSlot + from ask_sdk_model.canfulfill.can_fulfill_intent_values import CanFulfillIntentValues as CanFulfillIntentValues_912ef433 + from ask_sdk_model.canfulfill.can_fulfill_slot import CanFulfillSlot as CanFulfillSlot_d32230a2 class CanFulfillIntent(object): @@ -50,7 +50,7 @@ class CanFulfillIntent(object): supports_multiple_types = False def __init__(self, can_fulfill=None, slots=None): - # type: (Optional[CanFulfillIntentValues], Optional[Dict[str, CanFulfillSlot]]) -> None + # type: (Optional[CanFulfillIntentValues_912ef433], Optional[Dict[str, CanFulfillSlot_d32230a2]]) -> None """CanFulfillIntent represents the response to canFulfillIntentRequest includes the details about whether the skill can understand and fulfill the intent request with detected slots. :param can_fulfill: diff --git a/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent_request.py b/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent_request.py index d25e40b9..20f25c61 100644 --- a/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent_request.py +++ b/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent_request.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.dialog_state import DialogState - from ask_sdk_model.intent import Intent + from ask_sdk_model.dialog_state import DialogState as DialogState_2ba20645 + from ask_sdk_model.intent import Intent as Intent_fd0ef0fe class CanFulfillIntentRequest(Request): @@ -65,7 +65,7 @@ class CanFulfillIntentRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, dialog_state=None, intent=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[DialogState], Optional[Intent]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[DialogState_2ba20645], Optional[Intent_fd0ef0fe]) -> None """An object that represents a request made to skill to query whether the skill can understand and fulfill the intent request with detected slots, before actually asking the skill to take action. Skill should be aware this is not to actually take action, skill should handle this request without causing side-effect, skill should not modify some state outside its scope or has an observable interaction with its calling functions or the outside world besides returning a value, such as playing sound,turning on/off lights, committing a transaction or a charge. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent_values.py b/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent_values.py index 542f821c..0f8d80db 100644 --- a/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent_values.py +++ b/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_intent_values.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class CanFulfillIntentValues(Enum): MAYBE = "MAYBE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CanFulfillIntentValues): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_slot.py b/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_slot.py index 9cb66fcf..99fb451c 100644 --- a/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_slot.py +++ b/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_slot.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.canfulfill.can_fulfill_slot_values import CanFulfillSlotValues - from ask_sdk_model.canfulfill.can_understand_slot_values import CanUnderstandSlotValues + from ask_sdk_model.canfulfill.can_fulfill_slot_values import CanFulfillSlotValues as CanFulfillSlotValues_5e21cab7 + from ask_sdk_model.canfulfill.can_understand_slot_values import CanUnderstandSlotValues as CanUnderstandSlotValues_83ff9bff class CanFulfillSlot(object): @@ -50,7 +50,7 @@ class CanFulfillSlot(object): supports_multiple_types = False def __init__(self, can_understand=None, can_fulfill=None): - # type: (Optional[CanUnderstandSlotValues], Optional[CanFulfillSlotValues]) -> None + # type: (Optional[CanUnderstandSlotValues_83ff9bff], Optional[CanFulfillSlotValues_5e21cab7]) -> None """This represents skill's capability to understand and fulfill each detected slot. :param can_understand: diff --git a/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_slot_values.py b/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_slot_values.py index abdf7ecd..f5d0585d 100644 --- a/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_slot_values.py +++ b/ask-sdk-model/ask_sdk_model/canfulfill/can_fulfill_slot_values.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class CanFulfillSlotValues(Enum): NO = "NO" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CanFulfillSlotValues): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/canfulfill/can_understand_slot_values.py b/ask-sdk-model/ask_sdk_model/canfulfill/can_understand_slot_values.py index 126e8159..686569a0 100644 --- a/ask-sdk-model/ask_sdk_model/canfulfill/can_understand_slot_values.py +++ b/ask-sdk-model/ask_sdk_model/canfulfill/can_understand_slot_values.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class CanUnderstandSlotValues(Enum): MAYBE = "MAYBE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CanUnderstandSlotValues): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/cause.py b/ask-sdk-model/ask_sdk_model/cause.py index e1b5537a..157e8992 100644 --- a/ask-sdk-model/ask_sdk_model/cause.py +++ b/ask-sdk-model/ask_sdk_model/cause.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/connection_completed.py b/ask-sdk-model/ask_sdk_model/connection_completed.py index 87c67d75..7b816646 100644 --- a/ask-sdk-model/ask_sdk_model/connection_completed.py +++ b/ask-sdk-model/ask_sdk_model/connection_completed.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.status import Status + from ask_sdk_model.status import Status as Status_7705e43e class ConnectionCompleted(Cause): @@ -56,7 +56,7 @@ class ConnectionCompleted(Cause): supports_multiple_types = False def __init__(self, token=None, status=None, result=None): - # type: (Optional[str], Optional[Status], Optional[object]) -> None + # type: (Optional[str], Optional[Status_7705e43e], Optional[object]) -> None """Represents the status and result needed to resume a skill's suspended session. :param token: This is an echo back string that skills send when during Connections.StartConnection directive. They will receive it when they get the SessionResumedRequest. It is never sent to the skill handling the request. diff --git a/ask-sdk-model/ask_sdk_model/context.py b/ask-sdk-model/ask_sdk_model/context.py index 1a9bd2c8..3714e794 100644 --- a/ask-sdk-model/ask_sdk_model/context.py +++ b/ask-sdk-model/ask_sdk_model/context.py @@ -21,16 +21,21 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.rendered_document_state import RenderedDocumentState - from ask_sdk_model.interfaces.system.system_state import SystemState - from ask_sdk_model.interfaces.automotive.automotive_state import AutomotiveState - from ask_sdk_model.interfaces.geolocation.geolocation_state import GeolocationState - from ask_sdk_model.interfaces.audioplayer.audio_player_state import AudioPlayerState - from ask_sdk_model.interfaces.viewport.viewport_state import ViewportState - from ask_sdk_model.interfaces.viewport.typed_viewport_state import TypedViewportState - from ask_sdk_model.interfaces.display.display_state import DisplayState + from ask_sdk_model.interfaces.alexa.presentation.apl.rendered_document_state import RenderedDocumentState as RenderedDocumentState_4fad8b14 + from ask_sdk_model.interfaces.automotive.automotive_state import AutomotiveState as AutomotiveState_2b614eea + from ask_sdk_model.interfaces.alexa.experimentation.experimentation_state import ExperimentationState as ExperimentationState_37bb7c62 + from ask_sdk_model.interfaces.alexa.extension.extensions_state import ExtensionsState as ExtensionsState_f02207d3 + from ask_sdk_model.interfaces.applink.app_link_state import AppLinkState as AppLinkState_370eda23 + from ask_sdk_model.interfaces.alexa.presentation.presentation_state import PresentationState as PresentationState_fe98e61a + from ask_sdk_model.interfaces.viewport.viewport_state import ViewportState as ViewportState_a05eceb9 + from ask_sdk_model.interfaces.viewport.typed_viewport_state import TypedViewportState as TypedViewportState_c366f13e + from ask_sdk_model.interfaces.audioplayer.audio_player_state import AudioPlayerState as AudioPlayerState_ac652451 + from ask_sdk_model.interfaces.geolocation.geolocation_state import GeolocationState as GeolocationState_5225020d + from ask_sdk_model.interfaces.system.system_state import SystemState as SystemState_22fcb230 + from ask_sdk_model.interfaces.display.display_state import DisplayState as DisplayState_726e4959 + from ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_manager_state import PackageManagerState as PackageManagerState_9a27c921 class Context(object): @@ -38,6 +43,8 @@ class Context(object): :param system: Provides information about the current state of the Alexa service and the device interacting with your skill. :type system: (optional) ask_sdk_model.interfaces.system.system_state.SystemState + :param alexa_presentation: Provides the current state for the Alexa.Presentation interface. + :type alexa_presentation: (optional) ask_sdk_model.interfaces.alexa.presentation.presentation_state.PresentationState :param alexa_presentation_apl: Provides the current state for the Alexa.Presentation.APL interface. :type alexa_presentation_apl: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.rendered_document_state.RenderedDocumentState :param audio_player: Provides the current state for the AudioPlayer interface. @@ -52,37 +59,57 @@ class Context(object): :type viewport: (optional) ask_sdk_model.interfaces.viewport.viewport_state.ViewportState :param viewports: This object contains a list of viewports characteristics related to the device's viewports. :type viewports: (optional) list[ask_sdk_model.interfaces.viewport.typed_viewport_state.TypedViewportState] + :param extensions: Provides the current state for Extensions interface + :type extensions: (optional) ask_sdk_model.interfaces.alexa.extension.extensions_state.ExtensionsState + :param alexa_data_store_package_manager: Provides the current state for the Alexa.DataStore.PackageManager interface. + :type alexa_data_store_package_manager: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_manager_state.PackageManagerState + :param app_link: Provides the current state for app link capability. + :type app_link: (optional) ask_sdk_model.interfaces.applink.app_link_state.AppLinkState + :param experimentation: Provides the current experimentation state + :type experimentation: (optional) ask_sdk_model.interfaces.alexa.experimentation.experimentation_state.ExperimentationState """ deserialized_types = { 'system': 'ask_sdk_model.interfaces.system.system_state.SystemState', + 'alexa_presentation': 'ask_sdk_model.interfaces.alexa.presentation.presentation_state.PresentationState', 'alexa_presentation_apl': 'ask_sdk_model.interfaces.alexa.presentation.apl.rendered_document_state.RenderedDocumentState', 'audio_player': 'ask_sdk_model.interfaces.audioplayer.audio_player_state.AudioPlayerState', 'automotive': 'ask_sdk_model.interfaces.automotive.automotive_state.AutomotiveState', 'display': 'ask_sdk_model.interfaces.display.display_state.DisplayState', 'geolocation': 'ask_sdk_model.interfaces.geolocation.geolocation_state.GeolocationState', 'viewport': 'ask_sdk_model.interfaces.viewport.viewport_state.ViewportState', - 'viewports': 'list[ask_sdk_model.interfaces.viewport.typed_viewport_state.TypedViewportState]' + 'viewports': 'list[ask_sdk_model.interfaces.viewport.typed_viewport_state.TypedViewportState]', + 'extensions': 'ask_sdk_model.interfaces.alexa.extension.extensions_state.ExtensionsState', + 'alexa_data_store_package_manager': 'ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_manager_state.PackageManagerState', + 'app_link': 'ask_sdk_model.interfaces.applink.app_link_state.AppLinkState', + 'experimentation': 'ask_sdk_model.interfaces.alexa.experimentation.experimentation_state.ExperimentationState' } # type: Dict attribute_map = { 'system': 'System', + 'alexa_presentation': 'Alexa.Presentation', 'alexa_presentation_apl': 'Alexa.Presentation.APL', 'audio_player': 'AudioPlayer', 'automotive': 'Automotive', 'display': 'Display', 'geolocation': 'Geolocation', 'viewport': 'Viewport', - 'viewports': 'Viewports' + 'viewports': 'Viewports', + 'extensions': 'Extensions', + 'alexa_data_store_package_manager': 'Alexa.DataStore.PackageManager', + 'app_link': 'AppLink', + 'experimentation': 'Experimentation' } # type: Dict supports_multiple_types = False - def __init__(self, system=None, alexa_presentation_apl=None, audio_player=None, automotive=None, display=None, geolocation=None, viewport=None, viewports=None): - # type: (Optional[SystemState], Optional[RenderedDocumentState], Optional[AudioPlayerState], Optional[AutomotiveState], Optional[DisplayState], Optional[GeolocationState], Optional[ViewportState], Optional[List[TypedViewportState]]) -> None + def __init__(self, system=None, alexa_presentation=None, alexa_presentation_apl=None, audio_player=None, automotive=None, display=None, geolocation=None, viewport=None, viewports=None, extensions=None, alexa_data_store_package_manager=None, app_link=None, experimentation=None): + # type: (Optional[SystemState_22fcb230], Optional[PresentationState_fe98e61a], Optional[RenderedDocumentState_4fad8b14], Optional[AudioPlayerState_ac652451], Optional[AutomotiveState_2b614eea], Optional[DisplayState_726e4959], Optional[GeolocationState_5225020d], Optional[ViewportState_a05eceb9], Optional[List[TypedViewportState_c366f13e]], Optional[ExtensionsState_f02207d3], Optional[PackageManagerState_9a27c921], Optional[AppLinkState_370eda23], Optional[ExperimentationState_37bb7c62]) -> None """ :param system: Provides information about the current state of the Alexa service and the device interacting with your skill. :type system: (optional) ask_sdk_model.interfaces.system.system_state.SystemState + :param alexa_presentation: Provides the current state for the Alexa.Presentation interface. + :type alexa_presentation: (optional) ask_sdk_model.interfaces.alexa.presentation.presentation_state.PresentationState :param alexa_presentation_apl: Provides the current state for the Alexa.Presentation.APL interface. :type alexa_presentation_apl: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.rendered_document_state.RenderedDocumentState :param audio_player: Provides the current state for the AudioPlayer interface. @@ -97,10 +124,19 @@ def __init__(self, system=None, alexa_presentation_apl=None, audio_player=None, :type viewport: (optional) ask_sdk_model.interfaces.viewport.viewport_state.ViewportState :param viewports: This object contains a list of viewports characteristics related to the device's viewports. :type viewports: (optional) list[ask_sdk_model.interfaces.viewport.typed_viewport_state.TypedViewportState] + :param extensions: Provides the current state for Extensions interface + :type extensions: (optional) ask_sdk_model.interfaces.alexa.extension.extensions_state.ExtensionsState + :param alexa_data_store_package_manager: Provides the current state for the Alexa.DataStore.PackageManager interface. + :type alexa_data_store_package_manager: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_manager_state.PackageManagerState + :param app_link: Provides the current state for app link capability. + :type app_link: (optional) ask_sdk_model.interfaces.applink.app_link_state.AppLinkState + :param experimentation: Provides the current experimentation state + :type experimentation: (optional) ask_sdk_model.interfaces.alexa.experimentation.experimentation_state.ExperimentationState """ self.__discriminator_value = None # type: str self.system = system + self.alexa_presentation = alexa_presentation self.alexa_presentation_apl = alexa_presentation_apl self.audio_player = audio_player self.automotive = automotive @@ -108,6 +144,10 @@ def __init__(self, system=None, alexa_presentation_apl=None, audio_player=None, self.geolocation = geolocation self.viewport = viewport self.viewports = viewports + self.extensions = extensions + self.alexa_data_store_package_manager = alexa_data_store_package_manager + self.app_link = app_link + self.experimentation = experimentation def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-sdk-model/ask_sdk_model/device.py b/ask-sdk-model/ask_sdk_model/device.py index c3f67190..bd6ed0b9 100644 --- a/ask-sdk-model/ask_sdk_model/device.py +++ b/ask-sdk-model/ask_sdk_model/device.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.supported_interfaces import SupportedInterfaces + from ask_sdk_model.supported_interfaces import SupportedInterfaces as SupportedInterfaces_8ec830f5 class Device(object): @@ -31,35 +31,42 @@ class Device(object): An object providing information about the device used to send the request. The device object contains both deviceId and supportedInterfaces properties. The deviceId property uniquely identifies the device. The supportedInterfaces property lists each interface that the device supports. For example, if supportedInterfaces includes AudioPlayer {}, then you know that the device supports streaming audio using the AudioPlayer interface. - :param device_id: The deviceId property uniquely identifies the device. + :param device_id: The deviceId property uniquely identifies the device. This identifier is scoped to a skill. Normally, disabling and re-enabling a skill generates a new identifier. :type device_id: (optional) str + :param persistent_endpoint_id: A persistent identifier for the Endpoint ID where the skill request is issued from. An endpoint represents an Alexa-connected Endpoint (like an Echo device, or an application) with which an Alexa customer can interact rather than a physical device, so it could represent applications on your fire TV or your Alexa phone app. The persistentEndpointId is a string that represents a unique identifier for the endpoint in the context of a request. It is in the Amazon Common Identifier format \"amzn1.alexa.endpoint.did.{id}\". This identifier space is scoped to a vendor, therefore it will stay the same regardless of skill enablement. + :type persistent_endpoint_id: (optional) str :param supported_interfaces: Lists each interface that the device supports. For example, if supportedInterfaces includes AudioPlayer {}, then you know that the device supports streaming audio using the AudioPlayer interface :type supported_interfaces: (optional) ask_sdk_model.supported_interfaces.SupportedInterfaces """ deserialized_types = { 'device_id': 'str', + 'persistent_endpoint_id': 'str', 'supported_interfaces': 'ask_sdk_model.supported_interfaces.SupportedInterfaces' } # type: Dict attribute_map = { 'device_id': 'deviceId', + 'persistent_endpoint_id': 'persistentEndpointId', 'supported_interfaces': 'supportedInterfaces' } # type: Dict supports_multiple_types = False - def __init__(self, device_id=None, supported_interfaces=None): - # type: (Optional[str], Optional[SupportedInterfaces]) -> None + def __init__(self, device_id=None, persistent_endpoint_id=None, supported_interfaces=None): + # type: (Optional[str], Optional[str], Optional[SupportedInterfaces_8ec830f5]) -> None """An object providing information about the device used to send the request. The device object contains both deviceId and supportedInterfaces properties. The deviceId property uniquely identifies the device. The supportedInterfaces property lists each interface that the device supports. For example, if supportedInterfaces includes AudioPlayer {}, then you know that the device supports streaming audio using the AudioPlayer interface. - :param device_id: The deviceId property uniquely identifies the device. + :param device_id: The deviceId property uniquely identifies the device. This identifier is scoped to a skill. Normally, disabling and re-enabling a skill generates a new identifier. :type device_id: (optional) str + :param persistent_endpoint_id: A persistent identifier for the Endpoint ID where the skill request is issued from. An endpoint represents an Alexa-connected Endpoint (like an Echo device, or an application) with which an Alexa customer can interact rather than a physical device, so it could represent applications on your fire TV or your Alexa phone app. The persistentEndpointId is a string that represents a unique identifier for the endpoint in the context of a request. It is in the Amazon Common Identifier format \"amzn1.alexa.endpoint.did.{id}\". This identifier space is scoped to a vendor, therefore it will stay the same regardless of skill enablement. + :type persistent_endpoint_id: (optional) str :param supported_interfaces: Lists each interface that the device supports. For example, if supportedInterfaces includes AudioPlayer {}, then you know that the device supports streaming audio using the AudioPlayer interface :type supported_interfaces: (optional) ask_sdk_model.supported_interfaces.SupportedInterfaces """ self.__discriminator_value = None # type: str self.device_id = device_id + self.persistent_endpoint_id = persistent_endpoint_id self.supported_interfaces = supported_interfaces def to_dict(self): diff --git a/ask-sdk-model/ask_sdk_model/dialog/__init__.py b/ask-sdk-model/ask_sdk_model/dialog/__init__.py index 8282e6eb..0313ec28 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/__init__.py +++ b/ask-sdk-model/ask_sdk_model/dialog/__init__.py @@ -14,16 +14,16 @@ # from __future__ import absolute_import -from .delegate_directive import DelegateDirective -from .delegation_period import DelegationPeriod -from .input_request import InputRequest -from .confirm_slot_directive import ConfirmSlotDirective from .elicit_slot_directive import ElicitSlotDirective -from .updated_request import UpdatedRequest -from .input import Input -from .updated_input_request import UpdatedInputRequest +from .delegate_request_directive import DelegateRequestDirective from .delegation_period_until import DelegationPeriodUntil +from .confirm_slot_directive import ConfirmSlotDirective from .confirm_intent_directive import ConfirmIntentDirective +from .updated_request import UpdatedRequest +from .delegate_directive import DelegateDirective +from .input_request import InputRequest +from .input import Input from .updated_intent_request import UpdatedIntentRequest -from .delegate_request_directive import DelegateRequestDirective +from .updated_input_request import UpdatedInputRequest +from .delegation_period import DelegationPeriod from .dynamic_entities_directive import DynamicEntitiesDirective diff --git a/ask-sdk-model/ask_sdk_model/dialog/confirm_intent_directive.py b/ask-sdk-model/ask_sdk_model/dialog/confirm_intent_directive.py index 1d7125d9..f22b1326 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/confirm_intent_directive.py +++ b/ask-sdk-model/ask_sdk_model/dialog/confirm_intent_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.intent import Intent + from ask_sdk_model.intent import Intent as Intent_fd0ef0fe class ConfirmIntentDirective(Directive): @@ -46,7 +46,7 @@ class ConfirmIntentDirective(Directive): supports_multiple_types = False def __init__(self, updated_intent=None): - # type: (Optional[Intent]) -> None + # type: (Optional[Intent_fd0ef0fe]) -> None """ :param updated_intent: diff --git a/ask-sdk-model/ask_sdk_model/dialog/confirm_slot_directive.py b/ask-sdk-model/ask_sdk_model/dialog/confirm_slot_directive.py index 5b0cb339..eedf6562 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/confirm_slot_directive.py +++ b/ask-sdk-model/ask_sdk_model/dialog/confirm_slot_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.intent import Intent + from ask_sdk_model.intent import Intent as Intent_fd0ef0fe class ConfirmSlotDirective(Directive): @@ -50,7 +50,7 @@ class ConfirmSlotDirective(Directive): supports_multiple_types = False def __init__(self, updated_intent=None, slot_to_confirm=None): - # type: (Optional[Intent], Optional[str]) -> None + # type: (Optional[Intent_fd0ef0fe], Optional[str]) -> None """ :param updated_intent: diff --git a/ask-sdk-model/ask_sdk_model/dialog/delegate_directive.py b/ask-sdk-model/ask_sdk_model/dialog/delegate_directive.py index 9e23ba78..7b68f4c8 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/delegate_directive.py +++ b/ask-sdk-model/ask_sdk_model/dialog/delegate_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.intent import Intent + from ask_sdk_model.intent import Intent as Intent_fd0ef0fe class DelegateDirective(Directive): @@ -46,7 +46,7 @@ class DelegateDirective(Directive): supports_multiple_types = False def __init__(self, updated_intent=None): - # type: (Optional[Intent]) -> None + # type: (Optional[Intent_fd0ef0fe]) -> None """ :param updated_intent: diff --git a/ask-sdk-model/ask_sdk_model/dialog/delegate_request_directive.py b/ask-sdk-model/ask_sdk_model/dialog/delegate_request_directive.py index cff95490..d26c77d1 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/delegate_request_directive.py +++ b/ask-sdk-model/ask_sdk_model/dialog/delegate_request_directive.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.dialog.delegation_period import DelegationPeriod - from ask_sdk_model.dialog.updated_request import UpdatedRequest + from ask_sdk_model.dialog.delegation_period import DelegationPeriod as DelegationPeriod_79d528b5 + from ask_sdk_model.dialog.updated_request import UpdatedRequest as UpdatedRequest_cb727acd class DelegateRequestDirective(Directive): @@ -55,7 +55,7 @@ class DelegateRequestDirective(Directive): supports_multiple_types = False def __init__(self, target=None, period=None, updated_request=None): - # type: (Optional[str], Optional[DelegationPeriod], Optional[UpdatedRequest]) -> None + # type: (Optional[str], Optional[DelegationPeriod_79d528b5], Optional[UpdatedRequest_cb727acd]) -> None """ :param target: The delegation target. diff --git a/ask-sdk-model/ask_sdk_model/dialog/delegation_period.py b/ask-sdk-model/ask_sdk_model/dialog/delegation_period.py index b4d8f782..c042956f 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/delegation_period.py +++ b/ask-sdk-model/ask_sdk_model/dialog/delegation_period.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.dialog.delegation_period_until import DelegationPeriodUntil + from ask_sdk_model.dialog.delegation_period_until import DelegationPeriodUntil as DelegationPeriodUntil_20703f48 class DelegationPeriod(object): @@ -45,7 +45,7 @@ class DelegationPeriod(object): supports_multiple_types = False def __init__(self, until=None): - # type: (Optional[DelegationPeriodUntil]) -> None + # type: (Optional[DelegationPeriodUntil_20703f48]) -> None """The delegation period. :param until: diff --git a/ask-sdk-model/ask_sdk_model/dialog/delegation_period_until.py b/ask-sdk-model/ask_sdk_model/dialog/delegation_period_until.py index 1d48f093..1df9ed87 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/delegation_period_until.py +++ b/ask-sdk-model/ask_sdk_model/dialog/delegation_period_until.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class DelegationPeriodUntil(Enum): NEXT_TURN = "NEXT_TURN" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, DelegationPeriodUntil): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/dialog/dynamic_entities_directive.py b/ask-sdk-model/ask_sdk_model/dialog/dynamic_entities_directive.py index 866016cd..32032d72 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/dynamic_entities_directive.py +++ b/ask-sdk-model/ask_sdk_model/dialog/dynamic_entities_directive.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.er.dynamic.update_behavior import UpdateBehavior - from ask_sdk_model.er.dynamic.entity_list_item import EntityListItem + from ask_sdk_model.er.dynamic.update_behavior import UpdateBehavior as UpdateBehavior_3fa306a1 + from ask_sdk_model.er.dynamic.entity_list_item import EntityListItem as EntityListItem_51f574a class DynamicEntitiesDirective(Directive): @@ -51,7 +51,7 @@ class DynamicEntitiesDirective(Directive): supports_multiple_types = False def __init__(self, update_behavior=None, types=None): - # type: (Optional[UpdateBehavior], Optional[List[EntityListItem]]) -> None + # type: (Optional[UpdateBehavior_3fa306a1], Optional[List[EntityListItem_51f574a]]) -> None """ :param update_behavior: diff --git a/ask-sdk-model/ask_sdk_model/dialog/elicit_slot_directive.py b/ask-sdk-model/ask_sdk_model/dialog/elicit_slot_directive.py index 987779b9..a6cf5abc 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/elicit_slot_directive.py +++ b/ask-sdk-model/ask_sdk_model/dialog/elicit_slot_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.intent import Intent + from ask_sdk_model.intent import Intent as Intent_fd0ef0fe class ElicitSlotDirective(Directive): @@ -50,7 +50,7 @@ class ElicitSlotDirective(Directive): supports_multiple_types = False def __init__(self, updated_intent=None, slot_to_elicit=None): - # type: (Optional[Intent], Optional[str]) -> None + # type: (Optional[Intent_fd0ef0fe], Optional[str]) -> None """ :param updated_intent: diff --git a/ask-sdk-model/ask_sdk_model/dialog/input.py b/ask-sdk-model/ask_sdk_model/dialog/input.py index dd09ad03..c24dec5b 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/input.py +++ b/ask-sdk-model/ask_sdk_model/dialog/input.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.slot import Slot + from ask_sdk_model.slot import Slot as Slot_9e3ddabe class Input(object): @@ -49,7 +49,7 @@ class Input(object): supports_multiple_types = False def __init__(self, name=None, slots=None): - # type: (Optional[str], Optional[Dict[str, Slot]]) -> None + # type: (Optional[str], Optional[Dict[str, Slot_9e3ddabe]]) -> None """Structured input data to send to a dialog manager. Currently, this is an Alexa Conversations input instance. :param name: The Alexa Conversations input name as dictated in the Conversations model. diff --git a/ask-sdk-model/ask_sdk_model/dialog/input_request.py b/ask-sdk-model/ask_sdk_model/dialog/input_request.py index 12773435..ce25b7ec 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/input_request.py +++ b/ask-sdk-model/ask_sdk_model/dialog/input_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.dialog.input import Input + from ask_sdk_model.dialog.input import Input as Input_de301c30 class InputRequest(Request): @@ -60,7 +60,7 @@ class InputRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, input=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[Input]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[Input_de301c30]) -> None """A request representing structured data used to provide dialog input to a dialog manager. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/dialog/updated_input_request.py b/ask-sdk-model/ask_sdk_model/dialog/updated_input_request.py index ac7306f9..d5cdb765 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/updated_input_request.py +++ b/ask-sdk-model/ask_sdk_model/dialog/updated_input_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.dialog.input import Input + from ask_sdk_model.dialog.input import Input as Input_de301c30 class UpdatedInputRequest(UpdatedRequest): @@ -46,7 +46,7 @@ class UpdatedInputRequest(UpdatedRequest): supports_multiple_types = False def __init__(self, input=None): - # type: (Optional[Input]) -> None + # type: (Optional[Input_de301c30]) -> None """ :param input: diff --git a/ask-sdk-model/ask_sdk_model/dialog/updated_intent_request.py b/ask-sdk-model/ask_sdk_model/dialog/updated_intent_request.py index 2fe769a2..5b043454 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/updated_intent_request.py +++ b/ask-sdk-model/ask_sdk_model/dialog/updated_intent_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.intent import Intent + from ask_sdk_model.intent import Intent as Intent_fd0ef0fe class UpdatedIntentRequest(UpdatedRequest): @@ -46,7 +46,7 @@ class UpdatedIntentRequest(UpdatedRequest): supports_multiple_types = False def __init__(self, intent=None): - # type: (Optional[Intent]) -> None + # type: (Optional[Intent_fd0ef0fe]) -> None """ :param intent: diff --git a/ask-sdk-model/ask_sdk_model/dialog/updated_request.py b/ask-sdk-model/ask_sdk_model/dialog/updated_request.py index f487a043..6576dca7 100644 --- a/ask-sdk-model/ask_sdk_model/dialog/updated_request.py +++ b/ask-sdk-model/ask_sdk_model/dialog/updated_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/dialog_state.py b/ask-sdk-model/ask_sdk_model/dialog_state.py index 62fe6a9f..36622fdc 100644 --- a/ask-sdk-model/ask_sdk_model/dialog_state.py +++ b/ask-sdk-model/ask_sdk_model/dialog_state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class DialogState(Enum): COMPLETED = "COMPLETED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, DialogState): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/directive.py b/ask-sdk-model/ask_sdk_model/directive.py index a2909ef8..fb543b43 100644 --- a/ask-sdk-model/ask_sdk_model/directive.py +++ b/ask-sdk-model/ask_sdk_model/directive.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -55,6 +55,8 @@ class Directive(object): | | Dialog.ConfirmIntent: :py:class:`ask_sdk_model.dialog.confirm_intent_directive.ConfirmIntentDirective`, | + | Alexa.Advertisement.InjectAds: :py:class:`ask_sdk_model.interfaces.alexa.advertisement.inject_ads.InjectAds`, + | | CustomInterfaceController.SendDirective: :py:class:`ask_sdk_model.interfaces.custom_interface_controller.send_directive_directive.SendDirectiveDirective`, | | Alexa.Presentation.HTML.HandleMessage: :py:class:`ask_sdk_model.interfaces.alexa.presentation.html.handle_message_directive.HandleMessageDirective`, @@ -65,6 +67,8 @@ class Directive(object): | | Alexa.Presentation.HTML.Start: :py:class:`ask_sdk_model.interfaces.alexa.presentation.html.start_directive.StartDirective`, | + | Alexa.SmartVision.SnapshotProvider.GetSnapshotDirective: :py:class:`ask_sdk_model.interfaces.alexa.smartvision.snapshotprovider.get_snapshot_directive.GetSnapshotDirective`, + | | AudioPlayer.Stop: :py:class:`ask_sdk_model.interfaces.audioplayer.stop_directive.StopDirective`, | | Dialog.ConfirmSlot: :py:class:`ask_sdk_model.dialog.confirm_slot_directive.ConfirmSlotDirective`, @@ -75,6 +79,8 @@ class Directive(object): | | Display.RenderTemplate: :py:class:`ask_sdk_model.interfaces.display.render_template_directive.RenderTemplateDirective`, | + | Conversations.ResetContext: :py:class:`ask_sdk_model.interfaces.conversations.reset_context_directive.ResetContextDirective`, + | | Dialog.DelegateRequest: :py:class:`ask_sdk_model.dialog.delegate_request_directive.DelegateRequestDirective`, | | Hint: :py:class:`ask_sdk_model.interfaces.display.hint_directive.HintDirective`, @@ -97,6 +103,8 @@ class Directive(object): | | Connections.SendResponse: :py:class:`ask_sdk_model.interfaces.connections.send_response_directive.SendResponseDirective`, | + | Alexa.Presentation.APL.SendTokenListData: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.send_token_list_data_directive.SendTokenListDataDirective`, + | | AudioPlayer.ClearQueue: :py:class:`ask_sdk_model.interfaces.audioplayer.clear_queue_directive.ClearQueueDirective`, | | Alexa.Presentation.APL.UpdateIndexListData: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.update_index_list_data_directive.UpdateIndexListDataDirective` @@ -121,16 +129,19 @@ class Directive(object): 'Alexa.Presentation.APL.SendIndexListData': 'ask_sdk_model.interfaces.alexa.presentation.apl.send_index_list_data_directive.SendIndexListDataDirective', 'Dialog.Delegate': 'ask_sdk_model.dialog.delegate_directive.DelegateDirective', 'Dialog.ConfirmIntent': 'ask_sdk_model.dialog.confirm_intent_directive.ConfirmIntentDirective', + 'Alexa.Advertisement.InjectAds': 'ask_sdk_model.interfaces.alexa.advertisement.inject_ads.InjectAds', 'CustomInterfaceController.SendDirective': 'ask_sdk_model.interfaces.custom_interface_controller.send_directive_directive.SendDirectiveDirective', 'Alexa.Presentation.HTML.HandleMessage': 'ask_sdk_model.interfaces.alexa.presentation.html.handle_message_directive.HandleMessageDirective', 'Alexa.Presentation.APLA.RenderDocument': 'ask_sdk_model.interfaces.alexa.presentation.apla.render_document_directive.RenderDocumentDirective', 'Dialog.ElicitSlot': 'ask_sdk_model.dialog.elicit_slot_directive.ElicitSlotDirective', 'Alexa.Presentation.HTML.Start': 'ask_sdk_model.interfaces.alexa.presentation.html.start_directive.StartDirective', + 'Alexa.SmartVision.SnapshotProvider.GetSnapshotDirective': 'ask_sdk_model.interfaces.alexa.smartvision.snapshotprovider.get_snapshot_directive.GetSnapshotDirective', 'AudioPlayer.Stop': 'ask_sdk_model.interfaces.audioplayer.stop_directive.StopDirective', 'Dialog.ConfirmSlot': 'ask_sdk_model.dialog.confirm_slot_directive.ConfirmSlotDirective', 'AudioPlayer.Play': 'ask_sdk_model.interfaces.audioplayer.play_directive.PlayDirective', 'Alexa.Presentation.APL.ExecuteCommands': 'ask_sdk_model.interfaces.alexa.presentation.apl.execute_commands_directive.ExecuteCommandsDirective', 'Display.RenderTemplate': 'ask_sdk_model.interfaces.display.render_template_directive.RenderTemplateDirective', + 'Conversations.ResetContext': 'ask_sdk_model.interfaces.conversations.reset_context_directive.ResetContextDirective', 'Dialog.DelegateRequest': 'ask_sdk_model.dialog.delegate_request_directive.DelegateRequestDirective', 'Hint': 'ask_sdk_model.interfaces.display.hint_directive.HintDirective', 'Connections.StartConnection': 'ask_sdk_model.interfaces.connections.v1.start_connection_directive.StartConnectionDirective', @@ -142,6 +153,7 @@ class Directive(object): 'Tasks.CompleteTask': 'ask_sdk_model.interfaces.tasks.complete_task_directive.CompleteTaskDirective', 'Alexa.Presentation.APL.RenderDocument': 'ask_sdk_model.interfaces.alexa.presentation.apl.render_document_directive.RenderDocumentDirective', 'Connections.SendResponse': 'ask_sdk_model.interfaces.connections.send_response_directive.SendResponseDirective', + 'Alexa.Presentation.APL.SendTokenListData': 'ask_sdk_model.interfaces.alexa.presentation.apl.send_token_list_data_directive.SendTokenListDataDirective', 'AudioPlayer.ClearQueue': 'ask_sdk_model.interfaces.audioplayer.clear_queue_directive.ClearQueueDirective', 'Alexa.Presentation.APL.UpdateIndexListData': 'ask_sdk_model.interfaces.alexa.presentation.apl.update_index_list_data_directive.UpdateIndexListDataDirective' } diff --git a/ask-sdk-model/ask_sdk_model/dynamic_endpoints/__init__.py b/ask-sdk-model/ask_sdk_model/dynamic_endpoints/__init__.py index b0f5f3ca..c090fd05 100644 --- a/ask-sdk-model/ask_sdk_model/dynamic_endpoints/__init__.py +++ b/ask-sdk-model/ask_sdk_model/dynamic_endpoints/__init__.py @@ -14,7 +14,7 @@ # from __future__ import absolute_import -from .base_response import BaseResponse from .success_response import SuccessResponse from .failure_response import FailureResponse from .request import Request +from .base_response import BaseResponse diff --git a/ask-sdk-model/ask_sdk_model/dynamic_endpoints/base_response.py b/ask-sdk-model/ask_sdk_model/dynamic_endpoints/base_response.py index 15abcac4..07e83d3b 100644 --- a/ask-sdk-model/ask_sdk_model/dynamic_endpoints/base_response.py +++ b/ask-sdk-model/ask_sdk_model/dynamic_endpoints/base_response.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/dynamic_endpoints/failure_response.py b/ask-sdk-model/ask_sdk_model/dynamic_endpoints/failure_response.py index b76374db..3ac21e32 100644 --- a/ask-sdk-model/ask_sdk_model/dynamic_endpoints/failure_response.py +++ b/ask-sdk-model/ask_sdk_model/dynamic_endpoints/failure_response.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/dynamic_endpoints/request.py b/ask-sdk-model/ask_sdk_model/dynamic_endpoints/request.py index f84bb4eb..e1350b7e 100644 --- a/ask-sdk-model/ask_sdk_model/dynamic_endpoints/request.py +++ b/ask-sdk-model/ask_sdk_model/dynamic_endpoints/request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/dynamic_endpoints/success_response.py b/ask-sdk-model/ask_sdk_model/dynamic_endpoints/success_response.py index 8ba481f5..776c7ec3 100644 --- a/ask-sdk-model/ask_sdk_model/dynamic_endpoints/success_response.py +++ b/ask-sdk-model/ask_sdk_model/dynamic_endpoints/success_response.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/er/dynamic/__init__.py b/ask-sdk-model/ask_sdk_model/er/dynamic/__init__.py index dda0d193..5ca97d6a 100644 --- a/ask-sdk-model/ask_sdk_model/er/dynamic/__init__.py +++ b/ask-sdk-model/ask_sdk_model/er/dynamic/__init__.py @@ -14,7 +14,7 @@ # from __future__ import absolute_import -from .entity_value_and_synonyms import EntityValueAndSynonyms -from .update_behavior import UpdateBehavior from .entity_list_item import EntityListItem +from .update_behavior import UpdateBehavior from .entity import Entity +from .entity_value_and_synonyms import EntityValueAndSynonyms diff --git a/ask-sdk-model/ask_sdk_model/er/dynamic/entity.py b/ask-sdk-model/ask_sdk_model/er/dynamic/entity.py index 8e61bf4e..7ee6abb3 100644 --- a/ask-sdk-model/ask_sdk_model/er/dynamic/entity.py +++ b/ask-sdk-model/ask_sdk_model/er/dynamic/entity.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.er.dynamic.entity_value_and_synonyms import EntityValueAndSynonyms + from ask_sdk_model.er.dynamic.entity_value_and_synonyms import EntityValueAndSynonyms as EntityValueAndSynonyms_3f32dca5 class Entity(object): @@ -49,7 +49,7 @@ class Entity(object): supports_multiple_types = False def __init__(self, id=None, name=None): - # type: (Optional[str], Optional[EntityValueAndSynonyms]) -> None + # type: (Optional[str], Optional[EntityValueAndSynonyms_3f32dca5]) -> None """Represents an entity that the skill wants to store. An entity has an optional Id and the value and the synonyms for the entity :param id: An unique id associated with the entity diff --git a/ask-sdk-model/ask_sdk_model/er/dynamic/entity_list_item.py b/ask-sdk-model/ask_sdk_model/er/dynamic/entity_list_item.py index 417fdd7d..36e9b6f6 100644 --- a/ask-sdk-model/ask_sdk_model/er/dynamic/entity_list_item.py +++ b/ask-sdk-model/ask_sdk_model/er/dynamic/entity_list_item.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.er.dynamic.entity import Entity + from ask_sdk_model.er.dynamic.entity import Entity as Entity_9ab80dce class EntityListItem(object): @@ -49,7 +49,7 @@ class EntityListItem(object): supports_multiple_types = False def __init__(self, name=None, values=None): - # type: (Optional[str], Optional[List[Entity]]) -> None + # type: (Optional[str], Optional[List[Entity_9ab80dce]]) -> None """Represents an array of entities of a particular type. :param name: The entity type. Must match the slot type as defined in the interaction model. diff --git a/ask-sdk-model/ask_sdk_model/er/dynamic/entity_value_and_synonyms.py b/ask-sdk-model/ask_sdk_model/er/dynamic/entity_value_and_synonyms.py index ae5501c6..23aa3afa 100644 --- a/ask-sdk-model/ask_sdk_model/er/dynamic/entity_value_and_synonyms.py +++ b/ask-sdk-model/ask_sdk_model/er/dynamic/entity_value_and_synonyms.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/er/dynamic/update_behavior.py b/ask-sdk-model/ask_sdk_model/er/dynamic/update_behavior.py index 6af0bf7f..d40e2d3e 100644 --- a/ask-sdk-model/ask_sdk_model/er/dynamic/update_behavior.py +++ b/ask-sdk-model/ask_sdk_model/er/dynamic/update_behavior.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class UpdateBehavior(Enum): CLEAR = "CLEAR" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, UpdateBehavior): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/__init__.py b/ask-sdk-model/ask_sdk_model/events/skillevents/__init__.py index eedc6d63..53e599b8 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/__init__.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/__init__.py @@ -14,14 +14,17 @@ # from __future__ import absolute_import -from .permission_changed_request import PermissionChangedRequest -from .proactive_subscription_changed_body import ProactiveSubscriptionChangedBody -from .account_linked_request import AccountLinkedRequest -from .permission_body import PermissionBody +from .notification_subscription_changed_request import NotificationSubscriptionChangedRequest from .account_linked_body import AccountLinkedBody -from .skill_enabled_request import SkillEnabledRequest from .skill_disabled_request import SkillDisabledRequest +from .permission_changed_request import PermissionChangedRequest from .proactive_subscription_event import ProactiveSubscriptionEvent +from .skill_enabled_request import SkillEnabledRequest +from .permission_body import PermissionBody from .permission import Permission +from .proactive_subscription_changed_body import ProactiveSubscriptionChangedBody +from .notification_subscription_event import NotificationSubscriptionEvent +from .account_linked_request import AccountLinkedRequest from .permission_accepted_request import PermissionAcceptedRequest from .proactive_subscription_changed_request import ProactiveSubscriptionChangedRequest +from .notification_subscription_changed_body import NotificationSubscriptionChangedBody diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/account_linked_body.py b/ask-sdk-model/ask_sdk_model/events/skillevents/account_linked_body.py index 4616ac80..ad658c8d 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/account_linked_body.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/account_linked_body.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/account_linked_request.py b/ask-sdk-model/ask_sdk_model/events/skillevents/account_linked_request.py index c241c82a..26bb4d5b 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/account_linked_request.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/account_linked_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.events.skillevents.account_linked_body import AccountLinkedBody + from ask_sdk_model.events.skillevents.account_linked_body import AccountLinkedBody as AccountLinkedBody_34990fc7 class AccountLinkedRequest(Request): @@ -68,7 +68,7 @@ class AccountLinkedRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[AccountLinkedBody], Optional[datetime], Optional[datetime]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[AccountLinkedBody_34990fc7], Optional[datetime], Optional[datetime]) -> None """This event indicates that a customer has linked an account in a third-party application with the Alexa app. This event is useful for an application that support out-of-session (non-voice) user interactions so that this application can be notified when the internal customer can be associated with the Alexa customer. This event is required for many applications that synchronize customer Alexa lists with application lists. During the account linking process, the Alexa app directs the user to the skill website where the customer logs in. When the customer logs in, the skill then provides an access token and a consent token to Alexa. The event includes the same access token and consent token. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/notification_subscription_changed_body.py b/ask-sdk-model/ask_sdk_model/events/skillevents/notification_subscription_changed_body.py new file mode 100644 index 00000000..78f94f4e --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/notification_subscription_changed_body.py @@ -0,0 +1,107 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.events.skillevents.notification_subscription_event import NotificationSubscriptionEvent as NotificationSubscriptionEvent_fb09fc87 + + +class NotificationSubscriptionChangedBody(object): + """ + + :param subscriptions: The list of to Topics that this user has subscribed/permitted to receive notification from your skill. If a customer unsubscribes for a Topic, this list will contain remaining Topics to which the customer is still subscribed to receive from your skill. If the list of subscriptions is empty, this customer has removed notification subscription for all Topics from your skill. + :type subscriptions: (optional) list[ask_sdk_model.events.skillevents.notification_subscription_event.NotificationSubscriptionEvent] + + """ + deserialized_types = { + 'subscriptions': 'list[ask_sdk_model.events.skillevents.notification_subscription_event.NotificationSubscriptionEvent]' + } # type: Dict + + attribute_map = { + 'subscriptions': 'subscriptions' + } # type: Dict + supports_multiple_types = False + + def __init__(self, subscriptions=None): + # type: (Optional[List[NotificationSubscriptionEvent_fb09fc87]]) -> None + """ + + :param subscriptions: The list of to Topics that this user has subscribed/permitted to receive notification from your skill. If a customer unsubscribes for a Topic, this list will contain remaining Topics to which the customer is still subscribed to receive from your skill. If the list of subscriptions is empty, this customer has removed notification subscription for all Topics from your skill. + :type subscriptions: (optional) list[ask_sdk_model.events.skillevents.notification_subscription_event.NotificationSubscriptionEvent] + """ + self.__discriminator_value = None # type: str + + self.subscriptions = subscriptions + + 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, NotificationSubscriptionChangedBody): + 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/events/skillevents/notification_subscription_changed_request.py b/ask-sdk-model/ask_sdk_model/events/skillevents/notification_subscription_changed_request.py new file mode 100644 index 00000000..49ee161f --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/notification_subscription_changed_request.py @@ -0,0 +1,132 @@ +# 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.request import Request + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.events.skillevents.notification_subscription_changed_body import NotificationSubscriptionChangedBody as NotificationSubscriptionChangedBody_40b159e4 + + +class NotificationSubscriptionChangedRequest(Request): + """ + When a customer changes his topic subscriptions Alexa will send an event back to the skill endpoint notifying the skill owner with the most recent state of the customer's subscriptions. This is to notify skill owners of customers' interest in receiving events from one or more schemas. This event indicates a customer permission to receive notifications from your skill and contains information for that user. You need this information to know the userId in order to send notifications to individual users. Note that these events can arrive out of order, so ensure that your skill service uses the timestamp in the event to correctly record the latest topic subscription state for a customer. + + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param body: + :type body: (optional) ask_sdk_model.events.skillevents.notification_subscription_changed_body.NotificationSubscriptionChangedBody + + """ + deserialized_types = { + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'body': 'ask_sdk_model.events.skillevents.notification_subscription_changed_body.NotificationSubscriptionChangedBody' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', + 'body': 'body' + } # type: Dict + supports_multiple_types = False + + def __init__(self, request_id=None, timestamp=None, locale=None, body=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[NotificationSubscriptionChangedBody_40b159e4]) -> None + """When a customer changes his topic subscriptions Alexa will send an event back to the skill endpoint notifying the skill owner with the most recent state of the customer's subscriptions. This is to notify skill owners of customers' interest in receiving events from one or more schemas. This event indicates a customer permission to receive notifications from your skill and contains information for that user. You need this information to know the userId in order to send notifications to individual users. Note that these events can arrive out of order, so ensure that your skill service uses the timestamp in the event to correctly record the latest topic subscription state for a customer. + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param body: + :type body: (optional) ask_sdk_model.events.skillevents.notification_subscription_changed_body.NotificationSubscriptionChangedBody + """ + self.__discriminator_value = "AlexaSkillEvent.NotificationSubscriptionChanged" # type: str + + self.object_type = self.__discriminator_value + super(NotificationSubscriptionChangedRequest, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) + self.body = body + + 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, NotificationSubscriptionChangedRequest): + 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_result_output.py b/ask-sdk-model/ask_sdk_model/events/skillevents/notification_subscription_event.py similarity index 82% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_result_output.py rename to ask-sdk-model/ask_sdk_model/events/skillevents/notification_subscription_event.py index 81abba18..ff8b1097 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_result_output.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/notification_subscription_event.py @@ -21,36 +21,36 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class EvaluationResultOutput(object): +class NotificationSubscriptionEvent(object): """ - :param transcription: actual transcription returned from ASR for the audio - :type transcription: (optional) str + :param topic_id: The topicId will be one of the Topics specified in your Skill's manifest file. + :type topic_id: (optional) str """ deserialized_types = { - 'transcription': 'str' + 'topic_id': 'str' } # type: Dict attribute_map = { - 'transcription': 'transcription' + 'topic_id': 'topicId' } # type: Dict supports_multiple_types = False - def __init__(self, transcription=None): + def __init__(self, topic_id=None): # type: (Optional[str]) -> None """ - :param transcription: actual transcription returned from ASR for the audio - :type transcription: (optional) str + :param topic_id: The topicId will be one of the Topics specified in your Skill's manifest file. + :type topic_id: (optional) str """ self.__discriminator_value = None # type: str - self.transcription = transcription + self.topic_id = topic_id def to_dict(self): # type: () -> Dict[str, object] @@ -95,7 +95,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, EvaluationResultOutput): + if not isinstance(other, NotificationSubscriptionEvent): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/permission.py b/ask-sdk-model/ask_sdk_model/events/skillevents/permission.py index 79d0d55c..c6393788 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/permission.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/permission.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/permission_accepted_request.py b/ask-sdk-model/ask_sdk_model/events/skillevents/permission_accepted_request.py index d42c3270..e5f6b9c4 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/permission_accepted_request.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/permission_accepted_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.events.skillevents.permission_body import PermissionBody + from ask_sdk_model.events.skillevents.permission_body import PermissionBody as PermissionBody_5f8355f6 class PermissionAcceptedRequest(Request): @@ -66,7 +66,7 @@ class PermissionAcceptedRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[PermissionBody], Optional[datetime], Optional[datetime]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[PermissionBody_5f8355f6], Optional[datetime], Optional[datetime]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/permission_body.py b/ask-sdk-model/ask_sdk_model/events/skillevents/permission_body.py index 706f0cca..ed71fa90 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/permission_body.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/permission_body.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.events.skillevents.permission import Permission + from ask_sdk_model.events.skillevents.permission import Permission as Permission_38016ee5 class PermissionBody(object): @@ -47,7 +47,7 @@ class PermissionBody(object): supports_multiple_types = False def __init__(self, accepted_permissions=None, accepted_person_permissions=None): - # type: (Optional[List[Permission]], Optional[List[Permission]]) -> None + # type: (Optional[List[Permission_38016ee5]], Optional[List[Permission_38016ee5]]) -> None """ :param accepted_permissions: The current list of permissions consented to on the account level. It can be an empty list if there are no account level permissions consented to. diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/permission_changed_request.py b/ask-sdk-model/ask_sdk_model/events/skillevents/permission_changed_request.py index 8901485f..d428cd79 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/permission_changed_request.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/permission_changed_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.events.skillevents.permission_body import PermissionBody + from ask_sdk_model.events.skillevents.permission_body import PermissionBody as PermissionBody_5f8355f6 class PermissionChangedRequest(Request): @@ -66,7 +66,7 @@ class PermissionChangedRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[PermissionBody], Optional[datetime], Optional[datetime]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[PermissionBody_5f8355f6], Optional[datetime], Optional[datetime]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_changed_body.py b/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_changed_body.py index bd9a4903..a2ae522a 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_changed_body.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_changed_body.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.events.skillevents.proactive_subscription_event import ProactiveSubscriptionEvent + from ask_sdk_model.events.skillevents.proactive_subscription_event import ProactiveSubscriptionEvent as ProactiveSubscriptionEvent_a4c7910b class ProactiveSubscriptionChangedBody(object): @@ -43,7 +43,7 @@ class ProactiveSubscriptionChangedBody(object): supports_multiple_types = False def __init__(self, subscriptions=None): - # type: (Optional[List[ProactiveSubscriptionEvent]]) -> None + # type: (Optional[List[ProactiveSubscriptionEvent_a4c7910b]]) -> None """ :param subscriptions: The list of events that this customer is currently subscribed to. If a customer unsubscribes from an event, this list will contain remaining event types to which the customer is still subscribed to receive from your skill. If the list of subscriptions is empty, this customer has unsubscribed from all event types from your skill. diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_changed_request.py b/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_changed_request.py index 86ba300b..a9d1ee2a 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_changed_request.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_changed_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.events.skillevents.proactive_subscription_changed_body import ProactiveSubscriptionChangedBody + from ask_sdk_model.events.skillevents.proactive_subscription_changed_body import ProactiveSubscriptionChangedBody as ProactiveSubscriptionChangedBody_5642f11a class ProactiveSubscriptionChangedRequest(Request): @@ -60,7 +60,7 @@ class ProactiveSubscriptionChangedRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[ProactiveSubscriptionChangedBody]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[ProactiveSubscriptionChangedBody_5642f11a]) -> None """This event indicates a customer subscription to receive events from your skill and contains information for that user and person, if recognized. You need this information to know the userId and personId in order to send events to individual users. Note that these events can arrive out of order, so ensure that your skill service uses the timestamp in the event to correctly record the latest subscription state for a customer. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_event.py b/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_event.py index 3b6289aa..c30d7ddc 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_event.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/proactive_subscription_event.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/skill_disabled_request.py b/ask-sdk-model/ask_sdk_model/events/skillevents/skill_disabled_request.py index f45839f1..4937c790 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/skill_disabled_request.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/skill_disabled_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/events/skillevents/skill_enabled_request.py b/ask-sdk-model/ask_sdk_model/events/skillevents/skill_enabled_request.py index 02c1067f..413b5cff 100644 --- a/ask-sdk-model/ask_sdk_model/events/skillevents/skill_enabled_request.py +++ b/ask-sdk-model/ask_sdk_model/events/skillevents/skill_enabled_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/intent.py b/ask-sdk-model/ask_sdk_model/intent.py index e3fd3697..299e64f2 100644 --- a/ask-sdk-model/ask_sdk_model/intent.py +++ b/ask-sdk-model/ask_sdk_model/intent.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.intent_confirmation_status import IntentConfirmationStatus - from ask_sdk_model.slot import Slot + from ask_sdk_model.intent_confirmation_status import IntentConfirmationStatus as IntentConfirmationStatus_89f2a248 + from ask_sdk_model.slot import Slot as Slot_9e3ddabe class Intent(object): @@ -54,7 +54,7 @@ class Intent(object): supports_multiple_types = False def __init__(self, name=None, slots=None, confirmation_status=None): - # type: (Optional[str], Optional[Dict[str, Slot]], Optional[IntentConfirmationStatus]) -> None + # type: (Optional[str], Optional[Dict[str, Slot_9e3ddabe]], Optional[IntentConfirmationStatus_89f2a248]) -> None """An object that represents what the user wants. :param name: A string representing the name of the intent. diff --git a/ask-sdk-model/ask_sdk_model/intent_confirmation_status.py b/ask-sdk-model/ask_sdk_model/intent_confirmation_status.py index 22ff2b1d..5fcf7e55 100644 --- a/ask-sdk-model/ask_sdk_model/intent_confirmation_status.py +++ b/ask-sdk-model/ask_sdk_model/intent_confirmation_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class IntentConfirmationStatus(Enum): CONFIRMED = "CONFIRMED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, IntentConfirmationStatus): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/intent_request.py b/ask-sdk-model/ask_sdk_model/intent_request.py index a0dbcf82..1c9a9d89 100644 --- a/ask-sdk-model/ask_sdk_model/intent_request.py +++ b/ask-sdk-model/ask_sdk_model/intent_request.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.dialog_state import DialogState - from ask_sdk_model.intent import Intent + from ask_sdk_model.dialog_state import DialogState as DialogState_2ba20645 + from ask_sdk_model.intent import Intent as Intent_fd0ef0fe class IntentRequest(Request): @@ -65,7 +65,7 @@ class IntentRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, dialog_state=None, intent=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[DialogState], Optional[Intent]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[DialogState_2ba20645], Optional[Intent_fd0ef0fe]) -> None """An IntentRequest is an object that represents a request made to a skill based on what the user wants to do. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/__init__.py new file mode 100644 index 00000000..b90fec05 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + +from .alexa_advertisement_interface import AlexaAdvertisementInterface +from .reason import Reason +from .ad_completed import AdCompleted +from .reason_code import ReasonCode +from .ad_not_rendered import AdNotRendered +from .ready_to_enqueue_audio import ReadyToEnqueueAudio +from .inject_ads import InjectAds diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/get_asr_annotation_sets_properties_response.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/ad_completed.py similarity index 52% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/get_asr_annotation_sets_properties_response.py rename to ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/ad_completed.py index 40e11046..95041eb1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/get_asr_annotation_sets_properties_response.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/ad_completed.py @@ -18,58 +18,64 @@ import six import typing from enum import Enum -from ask_smapi_model.v1.skill.asr.annotation_sets.annotation_set_metadata import AnnotationSetMetadata +from ask_sdk_model.request import Request if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class GetASRAnnotationSetsPropertiesResponse(AnnotationSetMetadata): +class AdCompleted(Request): """ + The skill receives this event when the ad playback is finished. More details: https://tiny.amazon.com/tbfio2ru/wamazbinviewAlexTeamASKTInSk - :param name: Name of the ASR annotation set - :type name: (optional) str - :param annotation_count: Number of annotations within an annotation set - :type annotation_count: (optional) int - :param last_updated_timestamp: The timestamp for the most recent update of ASR annotation set - :type last_updated_timestamp: (optional) datetime - :param eligible_for_evaluation: Indicates if the annotation set is eligible for evaluation. A set is not eligible for evaluation if any annotation within the set has a missing uploadId, filePathInUpload, expectedTranscription, or evaluationWeight. - :type eligible_for_evaluation: (optional) bool + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param token: The current token representing the ad stream being played. + :type token: (optional) str """ deserialized_types = { - 'name': 'str', - 'annotation_count': 'int', - 'last_updated_timestamp': 'datetime', - 'eligible_for_evaluation': 'bool' + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'token': 'str' } # type: Dict attribute_map = { - 'name': 'name', - 'annotation_count': 'annotationCount', - 'last_updated_timestamp': 'lastUpdatedTimestamp', - 'eligible_for_evaluation': 'eligibleForEvaluation' + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', + 'token': 'token' } # type: Dict supports_multiple_types = False - def __init__(self, name=None, annotation_count=None, last_updated_timestamp=None, eligible_for_evaluation=None): - # type: (Optional[str], Optional[int], Optional[datetime], Optional[bool]) -> None - """ - - :param name: Name of the ASR annotation set - :type name: (optional) str - :param annotation_count: Number of annotations within an annotation set - :type annotation_count: (optional) int - :param last_updated_timestamp: The timestamp for the most recent update of ASR annotation set - :type last_updated_timestamp: (optional) datetime - :param eligible_for_evaluation: Indicates if the annotation set is eligible for evaluation. A set is not eligible for evaluation if any annotation within the set has a missing uploadId, filePathInUpload, expectedTranscription, or evaluationWeight. - :type eligible_for_evaluation: (optional) bool + def __init__(self, request_id=None, timestamp=None, locale=None, token=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[str]) -> None + """The skill receives this event when the ad playback is finished. More details: https://tiny.amazon.com/tbfio2ru/wamazbinviewAlexTeamASKTInSk + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param token: The current token representing the ad stream being played. + :type token: (optional) str """ - self.__discriminator_value = None # type: str + self.__discriminator_value = "Alexa.Advertisement.AdCompleted" # type: str - super(GetASRAnnotationSetsPropertiesResponse, self).__init__(name=name, annotation_count=annotation_count, last_updated_timestamp=last_updated_timestamp, eligible_for_evaluation=eligible_for_evaluation) + self.object_type = self.__discriminator_value + super(AdCompleted, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) + self.token = token def to_dict(self): # type: () -> Dict[str, object] @@ -114,7 +120,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, GetASRAnnotationSetsPropertiesResponse): + if not isinstance(other, AdCompleted): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/ad_not_rendered.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/ad_not_rendered.py new file mode 100644 index 00000000..31e32889 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/ad_not_rendered.py @@ -0,0 +1,132 @@ +# 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.request import Request + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.advertisement.reason import Reason as Reason_83932c76 + + +class AdNotRendered(Request): + """ + The skill receives this event when the ad cannot be displayed or played due to certain reasons. More details: https://tiny.amazon.com/16bnoj5db/wamazbinviewAlexTeamASKTInSk + + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param reason: The object encapsulates information regarding the reasons why the ad is not being rendered. + :type reason: (optional) ask_sdk_model.interfaces.alexa.advertisement.reason.Reason + + """ + deserialized_types = { + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'reason': 'ask_sdk_model.interfaces.alexa.advertisement.reason.Reason' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', + 'reason': 'reason' + } # type: Dict + supports_multiple_types = False + + def __init__(self, request_id=None, timestamp=None, locale=None, reason=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[Reason_83932c76]) -> None + """The skill receives this event when the ad cannot be displayed or played due to certain reasons. More details: https://tiny.amazon.com/16bnoj5db/wamazbinviewAlexTeamASKTInSk + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param reason: The object encapsulates information regarding the reasons why the ad is not being rendered. + :type reason: (optional) ask_sdk_model.interfaces.alexa.advertisement.reason.Reason + """ + self.__discriminator_value = "Alexa.Advertisement.AdNotRendered" # type: str + + self.object_type = self.__discriminator_value + super(AdNotRendered, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) + self.reason = reason + + 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, AdNotRendered): + 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/advertisement/alexa_advertisement_interface.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/alexa_advertisement_interface.py new file mode 100644 index 00000000..936b039a --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/alexa_advertisement_interface.py @@ -0,0 +1,100 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class AlexaAdvertisementInterface(object): + """ + The interface provides skills with the ability to seamlessly integrate advertisements during their interactions with users. + + + + """ + deserialized_types = { + } # type: Dict + + attribute_map = { + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """The interface provides skills with the ability to seamlessly integrate advertisements during their interactions with users. + + """ + self.__discriminator_value = None # type: str + + 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, AlexaAdvertisementInterface): + 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/advertisement/inject_ads.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/inject_ads.py new file mode 100644 index 00000000..fbe633b1 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/inject_ads.py @@ -0,0 +1,111 @@ +# 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.directive import Directive + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class InjectAds(Directive): + """ + + :param expected_previous_token: The optional expected previous token represents the content currently being played, and it is utilized to enqueue the advertisement after the ongoing audio content. More details: https://tiny.amazon.com/l9h6ejjr/wamazbinviewAlexTeamASKTInSk + :type expected_previous_token: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'expected_previous_token': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'expected_previous_token': 'expectedPreviousToken' + } # type: Dict + supports_multiple_types = False + + def __init__(self, expected_previous_token=None): + # type: (Optional[str]) -> None + """ + + :param expected_previous_token: The optional expected previous token represents the content currently being played, and it is utilized to enqueue the advertisement after the ongoing audio content. More details: https://tiny.amazon.com/l9h6ejjr/wamazbinviewAlexTeamASKTInSk + :type expected_previous_token: (optional) str + """ + self.__discriminator_value = "Alexa.Advertisement.InjectAds" # type: str + + self.object_type = self.__discriminator_value + super(InjectAds, self).__init__(object_type=self.__discriminator_value) + self.expected_previous_token = expected_previous_token + + 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, InjectAds): + 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/py.typed b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/py.typed similarity index 100% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/py.typed rename to ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/py.typed diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/ready_to_enqueue_audio.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/ready_to_enqueue_audio.py new file mode 100644 index 00000000..7b4b03e5 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/ready_to_enqueue_audio.py @@ -0,0 +1,138 @@ +# 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.request import Request + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ReadyToEnqueueAudio(Request): + """ + This event is sent to the skill as a signal that it can enqueue the next audio content in the audio player. This allows the third-party skill to resume content playback after the advertisement. + + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param token: The token currently representing the ad stream being played can be used as the expectedPreviousToken in the AudioPlayer.Play directive. This allows the skill to enqueue the next content seamlessly after the ad stream. + :type token: (optional) str + :param previous_token: The expectedPreviousToken passed in the InjectAds request, which can be utilized by a skill to maintain an ordered list and find the next content from the current content. + :type previous_token: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'token': 'str', + 'previous_token': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', + 'token': 'token', + 'previous_token': 'previousToken' + } # type: Dict + supports_multiple_types = False + + def __init__(self, request_id=None, timestamp=None, locale=None, token=None, previous_token=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[str]) -> None + """This event is sent to the skill as a signal that it can enqueue the next audio content in the audio player. This allows the third-party skill to resume content playback after the advertisement. + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param token: The token currently representing the ad stream being played can be used as the expectedPreviousToken in the AudioPlayer.Play directive. This allows the skill to enqueue the next content seamlessly after the ad stream. + :type token: (optional) str + :param previous_token: The expectedPreviousToken passed in the InjectAds request, which can be utilized by a skill to maintain an ordered list and find the next content from the current content. + :type previous_token: (optional) str + """ + self.__discriminator_value = "Alexa.Advertisement.ReadyToEnqueueAudio" # type: str + + self.object_type = self.__discriminator_value + super(ReadyToEnqueueAudio, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) + self.token = token + self.previous_token = previous_token + + 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, ReadyToEnqueueAudio): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/localized_health_info.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/reason.py similarity index 63% rename from ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_health_info.py rename to ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/reason.py index 63562a3a..0eed4861 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_health_info.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/reason.py @@ -21,46 +21,46 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.health_alias import HealthAliasV1 + from ask_sdk_model.interfaces.alexa.advertisement.reason_code import ReasonCode as ReasonCode_3e4eb6ef -class LocalizedHealthInfo(object): +class Reason(object): """ - Defines the structure for health skill locale specific publishing information in the skill manifest. + The object encapsulates information regarding the reasons why the ad is not being rendered. - :param prompt_name: SSML supported name to use when Alexa renders the health skill name in a prompt to the user. - :type prompt_name: (optional) str - :param aliases: Defines the names to use when a user tries to invoke the health skill. - :type aliases: (optional) list[ask_smapi_model.v1.skill.manifest.health_alias.HealthAlias] + :param object_type: The enum represents various details explaining why the ad is not being rendered. + :type object_type: (optional) ask_sdk_model.interfaces.alexa.advertisement.reason_code.ReasonCode + :param message: The message provides an explanation of the specific details as to why the ad is not being rendered. + :type message: (optional) str """ deserialized_types = { - 'prompt_name': 'str', - 'aliases': 'list[ask_smapi_model.v1.skill.manifest.health_alias.HealthAlias]' + 'object_type': 'ask_sdk_model.interfaces.alexa.advertisement.reason_code.ReasonCode', + 'message': 'str' } # type: Dict attribute_map = { - 'prompt_name': 'promptName', - 'aliases': 'aliases' + 'object_type': 'type', + 'message': 'message' } # type: Dict supports_multiple_types = False - def __init__(self, prompt_name=None, aliases=None): - # type: (Optional[str], Optional[List[HealthAliasV1]]) -> None - """Defines the structure for health skill locale specific publishing information in the skill manifest. + def __init__(self, object_type=None, message=None): + # type: (Optional[ReasonCode_3e4eb6ef], Optional[str]) -> None + """The object encapsulates information regarding the reasons why the ad is not being rendered. - :param prompt_name: SSML supported name to use when Alexa renders the health skill name in a prompt to the user. - :type prompt_name: (optional) str - :param aliases: Defines the names to use when a user tries to invoke the health skill. - :type aliases: (optional) list[ask_smapi_model.v1.skill.manifest.health_alias.HealthAlias] + :param object_type: The enum represents various details explaining why the ad is not being rendered. + :type object_type: (optional) ask_sdk_model.interfaces.alexa.advertisement.reason_code.ReasonCode + :param message: The message provides an explanation of the specific details as to why the ad is not being rendered. + :type message: (optional) str """ self.__discriminator_value = None # type: str - self.prompt_name = prompt_name - self.aliases = aliases + self.object_type = object_type + self.message = message def to_dict(self): # type: () -> Dict[str, object] @@ -105,7 +105,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, LocalizedHealthInfo): + if not isinstance(other, Reason): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/reason_code.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/reason_code.py new file mode 100644 index 00000000..b75f8272 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/advertisement/reason_code.py @@ -0,0 +1,70 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ReasonCode(Enum): + """ + The enum represents various details explaining why the ad is not being rendered. + + + + Allowed enum values: [DEVICE_OCCUPIED, UNSUPPORTED_DEVICE, SKILL_DAILY_CAP_LIMIT_REACHED, DOMAIN_DAILY_CAP_LIMIT_REACHED, INTERNAL_SERVER_ERROR, AD_NOT_AVAILABLE] + """ + DEVICE_OCCUPIED = "DEVICE_OCCUPIED" + UNSUPPORTED_DEVICE = "UNSUPPORTED_DEVICE" + SKILL_DAILY_CAP_LIMIT_REACHED = "SKILL_DAILY_CAP_LIMIT_REACHED" + DOMAIN_DAILY_CAP_LIMIT_REACHED = "DOMAIN_DAILY_CAP_LIMIT_REACHED" + INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR" + AD_NOT_AVAILABLE = "AD_NOT_AVAILABLE" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ReasonCode): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/comms/messagingcontroller/status_map.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/comms/messagingcontroller/status_map.py index 32444d6d..0f3cc208 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/comms/messagingcontroller/status_map.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/comms/messagingcontroller/status_map.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/__init__.py new file mode 100644 index 00000000..fa6cdd01 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/__init__.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + +from .commands_error import CommandsError +from .error import Error +from .data_store_internal_error import DataStoreInternalError +from .execution_error_content import ExecutionErrorContent +from .storage_limit_execeeded_error import StorageLimitExeceededError +from .device_unavailable_error import DeviceUnavailableError +from .dispatch_error_content import DispatchErrorContent +from .device_permanantly_unavailable_error import DevicePermanantlyUnavailableError +from .data_store_error import DataStoreError diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/commands_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/commands_error.py new file mode 100644 index 00000000..588c3c1f --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/commands_error.py @@ -0,0 +1,141 @@ +# 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 abc import ABCMeta, abstractmethod + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class CommandsError(object): + """ + DataStore error object payload. + + + :param object_type: Describes the type of the error. + :type object_type: (optional) str + + .. note:: + + This is an abstract class. Use the following mapping, to figure out + the model class to be instantiated, that sets ``type`` variable. + + | DEVICE_UNAVAILABLE: :py:class:`ask_sdk_model.interfaces.alexa.datastore.device_unavailable_error.DeviceUnavailableError`, + | + | DEVICE_PERMANENTLY_UNAVAILABLE: :py:class:`ask_sdk_model.interfaces.alexa.datastore.device_permanantly_unavailable_error.DevicePermanantlyUnavailableError`, + | + | DATASTORE_INTERNAL_ERROR: :py:class:`ask_sdk_model.interfaces.alexa.datastore.data_store_internal_error.DataStoreInternalError`, + | + | STORAGE_LIMIT_EXCEEDED: :py:class:`ask_sdk_model.interfaces.alexa.datastore.storage_limit_execeeded_error.StorageLimitExeceededError` + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'DEVICE_UNAVAILABLE': 'ask_sdk_model.interfaces.alexa.datastore.device_unavailable_error.DeviceUnavailableError', + 'DEVICE_PERMANENTLY_UNAVAILABLE': 'ask_sdk_model.interfaces.alexa.datastore.device_permanantly_unavailable_error.DevicePermanantlyUnavailableError', + 'DATASTORE_INTERNAL_ERROR': 'ask_sdk_model.interfaces.alexa.datastore.data_store_internal_error.DataStoreInternalError', + 'STORAGE_LIMIT_EXCEEDED': 'ask_sdk_model.interfaces.alexa.datastore.storage_limit_execeeded_error.StorageLimitExeceededError' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None): + # type: (Optional[str]) -> None + """DataStore error object payload. + + :param object_type: Describes the type of the error. + :type object_type: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + + @classmethod + def get_real_child_model(cls, data): + # type: (Dict[str, str]) -> Optional[str] + """Returns the real base class specified by the discriminator""" + discriminator_value = data[cls.json_discriminator_key] + return cls.discriminator_value_class_map.get(discriminator_value) + + 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, CommandsError): + 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_result.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/data_store_error.py similarity index 51% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_result.py rename to ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/data_store_error.py index 1fb91408..c248fb26 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_result.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/data_store_error.py @@ -18,65 +18,64 @@ import six import typing from enum import Enum +from ask_sdk_model.request import Request if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_status import EvaluationResultStatusV1 - from ask_smapi_model.v1.skill.asr.evaluations.error_object import ErrorObjectV1 - from ask_smapi_model.v1.skill.asr.evaluations.annotation_with_audio_asset import AnnotationWithAudioAssetV1 - from ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_output import EvaluationResultOutputV1 + from ask_sdk_model.interfaces.alexa.datastore.commands_error import CommandsError as CommandsError_b28d55c9 -class EvaluationResult(object): +class DataStoreError(Request): """ - evaluation detailed result + This event is sent by DSCS to forward ExecutionError from device or to inform about delivery error. - :param status: - :type status: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_status.EvaluationResultStatus - :param annotation: - :type annotation: (optional) ask_smapi_model.v1.skill.asr.evaluations.annotation_with_audio_asset.AnnotationWithAudioAsset - :param output: - :type output: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_output.EvaluationResultOutput + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str :param error: - :type error: (optional) ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject + :type error: (optional) ask_sdk_model.interfaces.alexa.datastore.commands_error.CommandsError """ deserialized_types = { - 'status': 'ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_status.EvaluationResultStatus', - 'annotation': 'ask_smapi_model.v1.skill.asr.evaluations.annotation_with_audio_asset.AnnotationWithAudioAsset', - 'output': 'ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_output.EvaluationResultOutput', - 'error': 'ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject' + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'error': 'ask_sdk_model.interfaces.alexa.datastore.commands_error.CommandsError' } # type: Dict attribute_map = { - 'status': 'status', - 'annotation': 'annotation', - 'output': 'output', + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', 'error': 'error' } # type: Dict supports_multiple_types = False - def __init__(self, status=None, annotation=None, output=None, error=None): - # type: (Optional[EvaluationResultStatusV1], Optional[AnnotationWithAudioAssetV1], Optional[EvaluationResultOutputV1], Optional[ErrorObjectV1]) -> None - """evaluation detailed result + def __init__(self, request_id=None, timestamp=None, locale=None, error=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[CommandsError_b28d55c9]) -> None + """This event is sent by DSCS to forward ExecutionError from device or to inform about delivery error. - :param status: - :type status: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_status.EvaluationResultStatus - :param annotation: - :type annotation: (optional) ask_smapi_model.v1.skill.asr.evaluations.annotation_with_audio_asset.AnnotationWithAudioAsset - :param output: - :type output: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_output.EvaluationResultOutput + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str :param error: - :type error: (optional) ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject + :type error: (optional) ask_sdk_model.interfaces.alexa.datastore.commands_error.CommandsError """ - self.__discriminator_value = None # type: str + self.__discriminator_value = "Alexa.DataStore.Error" # type: str - self.status = status - self.annotation = annotation - self.output = output + self.object_type = self.__discriminator_value + super(DataStoreError, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) self.error = error def to_dict(self): @@ -122,7 +121,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, EvaluationResult): + if not isinstance(other, DataStoreError): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/data_store_internal_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/data_store_internal_error.py new file mode 100644 index 00000000..098b3bac --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/data_store_internal_error.py @@ -0,0 +1,114 @@ +# 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.datastore.commands_error import CommandsError + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.execution_error_content import ExecutionErrorContent as ExecutionErrorContent_aa5000b0 + + +class DataStoreInternalError(CommandsError): + """ + Describes an execution error for unknown error from device DataStore. + + + :param content: + :type content: (optional) ask_sdk_model.interfaces.alexa.datastore.execution_error_content.ExecutionErrorContent + + """ + deserialized_types = { + 'object_type': 'str', + 'content': 'ask_sdk_model.interfaces.alexa.datastore.execution_error_content.ExecutionErrorContent' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'content': 'content' + } # type: Dict + supports_multiple_types = False + + def __init__(self, content=None): + # type: (Optional[ExecutionErrorContent_aa5000b0]) -> None + """Describes an execution error for unknown error from device DataStore. + + :param content: + :type content: (optional) ask_sdk_model.interfaces.alexa.datastore.execution_error_content.ExecutionErrorContent + """ + self.__discriminator_value = "DATASTORE_INTERNAL_ERROR" # type: str + + self.object_type = self.__discriminator_value + super(DataStoreInternalError, self).__init__(object_type=self.__discriminator_value) + self.content = content + + 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, DataStoreInternalError): + 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/datastore/device_permanantly_unavailable_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/device_permanantly_unavailable_error.py new file mode 100644 index 00000000..47237b8a --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/device_permanantly_unavailable_error.py @@ -0,0 +1,114 @@ +# 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.datastore.commands_error import CommandsError + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.dispatch_error_content import DispatchErrorContent as DispatchErrorContent_def97636 + + +class DevicePermanantlyUnavailableError(CommandsError): + """ + Describes a dispatch error when device is no longer available. Skill must stop pushing data to this device in the future. + + + :param content: + :type content: (optional) ask_sdk_model.interfaces.alexa.datastore.dispatch_error_content.DispatchErrorContent + + """ + deserialized_types = { + 'object_type': 'str', + 'content': 'ask_sdk_model.interfaces.alexa.datastore.dispatch_error_content.DispatchErrorContent' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'content': 'content' + } # type: Dict + supports_multiple_types = False + + def __init__(self, content=None): + # type: (Optional[DispatchErrorContent_def97636]) -> None + """Describes a dispatch error when device is no longer available. Skill must stop pushing data to this device in the future. + + :param content: + :type content: (optional) ask_sdk_model.interfaces.alexa.datastore.dispatch_error_content.DispatchErrorContent + """ + self.__discriminator_value = "DEVICE_PERMANENTLY_UNAVAILABLE" # type: str + + self.object_type = self.__discriminator_value + super(DevicePermanantlyUnavailableError, self).__init__(object_type=self.__discriminator_value) + self.content = content + + 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, DevicePermanantlyUnavailableError): + 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-smapi-model/ask_smapi_model/v1/skill/private/private_distribution_account.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/device_unavailable_error.py similarity index 66% rename from ask-smapi-model/ask_smapi_model/v1/skill/private/private_distribution_account.py rename to ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/device_unavailable_error.py index d5abf5b5..f1f3977e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/private/private_distribution_account.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/device_unavailable_error.py @@ -18,49 +18,47 @@ import six import typing from enum import Enum +from ask_sdk_model.interfaces.alexa.datastore.commands_error import CommandsError if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.private.accept_status import AcceptStatusV1 + from ask_sdk_model.interfaces.alexa.datastore.dispatch_error_content import DispatchErrorContent as DispatchErrorContent_def97636 -class PrivateDistributionAccount(object): +class DeviceUnavailableError(CommandsError): """ - Contains information of the private distribution account with given id. + Describes a dispatch error when device is not available. - :param principal: 12-digit numerical account ID for AWS account holders. - :type principal: (optional) str - :param accept_status: - :type accept_status: (optional) ask_smapi_model.v1.skill.private.accept_status.AcceptStatus + :param content: + :type content: (optional) ask_sdk_model.interfaces.alexa.datastore.dispatch_error_content.DispatchErrorContent """ deserialized_types = { - 'principal': 'str', - 'accept_status': 'ask_smapi_model.v1.skill.private.accept_status.AcceptStatus' + 'object_type': 'str', + 'content': 'ask_sdk_model.interfaces.alexa.datastore.dispatch_error_content.DispatchErrorContent' } # type: Dict attribute_map = { - 'principal': 'principal', - 'accept_status': 'acceptStatus' + 'object_type': 'type', + 'content': 'content' } # type: Dict supports_multiple_types = False - def __init__(self, principal=None, accept_status=None): - # type: (Optional[str], Optional[AcceptStatusV1]) -> None - """Contains information of the private distribution account with given id. + def __init__(self, content=None): + # type: (Optional[DispatchErrorContent_def97636]) -> None + """Describes a dispatch error when device is not available. - :param principal: 12-digit numerical account ID for AWS account holders. - :type principal: (optional) str - :param accept_status: - :type accept_status: (optional) ask_smapi_model.v1.skill.private.accept_status.AcceptStatus + :param content: + :type content: (optional) ask_sdk_model.interfaces.alexa.datastore.dispatch_error_content.DispatchErrorContent """ - self.__discriminator_value = None # type: str + self.__discriminator_value = "DEVICE_UNAVAILABLE" # type: str - self.principal = principal - self.accept_status = accept_status + self.object_type = self.__discriminator_value + super(DeviceUnavailableError, self).__init__(object_type=self.__discriminator_value) + self.content = content def to_dict(self): # type: () -> Dict[str, object] @@ -105,7 +103,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, PrivateDistributionAccount): + if not isinstance(other, DeviceUnavailableError): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/dispatch_error_content.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/dispatch_error_content.py new file mode 100644 index 00000000..dfe6f97f --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/dispatch_error_content.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.services.datastore.v1.command import Command as Command_6778502c + + +class DispatchErrorContent(object): + """ + Content of a commands dispatch error. + + + :param device_id: Identifier of the device where execution error happens. + :type device_id: (optional) str + :param commands: Commands in the same order of request time so that skill can extend deliver expiry. + :type commands: (optional) list[ask_sdk_model.services.datastore.v1.command.Command] + + """ + deserialized_types = { + 'device_id': 'str', + 'commands': 'list[ask_sdk_model.services.datastore.v1.command.Command]' + } # type: Dict + + attribute_map = { + 'device_id': 'deviceId', + 'commands': 'commands' + } # type: Dict + supports_multiple_types = False + + def __init__(self, device_id=None, commands=None): + # type: (Optional[str], Optional[List[Command_6778502c]]) -> None + """Content of a commands dispatch error. + + :param device_id: Identifier of the device where execution error happens. + :type device_id: (optional) str + :param commands: Commands in the same order of request time so that skill can extend deliver expiry. + :type commands: (optional) list[ask_sdk_model.services.datastore.v1.command.Command] + """ + self.__discriminator_value = None # type: str + + self.device_id = device_id + self.commands = commands + + 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, DispatchErrorContent): + 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/datastore/error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/error.py new file mode 100644 index 00000000..43d563ad --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/error.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Error(object): + """ + Type of error. Modules can also use this event to report global error like permission denied. Supported values [STORAGE_LIMIT_EXCEEDED, PERMISSION_DENIED, VALIDATION_ERROR, DATASTORE_INTERNAL_ERROR] + + + :param object_type: Type of error. Modules can also use this event to report global error like permission denied + :type object_type: (optional) str + :param content: Opaque payload which will contain additional details about error. + :type content: (optional) object + + """ + deserialized_types = { + 'object_type': 'str', + 'content': 'object' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'content': 'content' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, content=None): + # type: (Optional[str], Optional[object]) -> None + """Type of error. Modules can also use this event to report global error like permission denied. Supported values [STORAGE_LIMIT_EXCEEDED, PERMISSION_DENIED, VALIDATION_ERROR, DATASTORE_INTERNAL_ERROR] + + :param object_type: Type of error. Modules can also use this event to report global error like permission denied + :type object_type: (optional) str + :param content: Opaque payload which will contain additional details about error. + :type content: (optional) object + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.content = content + + 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, Error): + 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/datastore/execution_error_content.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/execution_error_content.py new file mode 100644 index 00000000..cdd0b266 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/execution_error_content.py @@ -0,0 +1,123 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.services.datastore.v1.command import Command as Command_6778502c + + +class ExecutionErrorContent(object): + """ + Content of an execution error. + + + :param device_id: Identifier of the device where execution error happens. + :type device_id: (optional) str + :param failed_command: the command that was not executed successfully because of the error. + :type failed_command: (optional) ask_sdk_model.services.datastore.v1.command.Command + :param message: Opaque message describing the error. + :type message: (optional) str + + """ + deserialized_types = { + 'device_id': 'str', + 'failed_command': 'ask_sdk_model.services.datastore.v1.command.Command', + 'message': 'str' + } # type: Dict + + attribute_map = { + 'device_id': 'deviceId', + 'failed_command': 'failedCommand', + 'message': 'message' + } # type: Dict + supports_multiple_types = False + + def __init__(self, device_id=None, failed_command=None, message=None): + # type: (Optional[str], Optional[Command_6778502c], Optional[str]) -> None + """Content of an execution error. + + :param device_id: Identifier of the device where execution error happens. + :type device_id: (optional) str + :param failed_command: the command that was not executed successfully because of the error. + :type failed_command: (optional) ask_sdk_model.services.datastore.v1.command.Command + :param message: Opaque message describing the error. + :type message: (optional) str + """ + self.__discriminator_value = None # type: str + + self.device_id = device_id + self.failed_command = failed_command + self.message = message + + 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, ExecutionErrorContent): + 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/datastore/packagemanager/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/__init__.py new file mode 100644 index 00000000..8d2ad84a --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + +from .usages_removed import UsagesRemoved +from .update_request import UpdateRequest +from .error_type import ErrorType +from .package_install_usage import PackageInstallUsage +from .package import Package +from .alexa_data_store_package_manager_interface import AlexaDataStorePackageManagerInterface +from .locations import Locations +from .usages_installed import UsagesInstalled +from .installation_error import InstallationError +from .usages_removed_request import UsagesRemovedRequest +from .package_remove_usage import PackageRemoveUsage +from .usages_install_request import UsagesInstallRequest +from .package_error import PackageError +from .package_manager_state import PackageManagerState +from .package_state_information import PackageStateInformation diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/alexa_data_store_package_manager_interface.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/alexa_data_store_package_manager_interface.py new file mode 100644 index 00000000..ae40a02a --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/alexa_data_store_package_manager_interface.py @@ -0,0 +1,100 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class AlexaDataStorePackageManagerInterface(object): + """ + Interface using which skills communicate with DataStore Package Manager on the device. + + + + """ + deserialized_types = { + } # type: Dict + + attribute_map = { + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """Interface using which skills communicate with DataStore Package Manager on the device. + + """ + self.__discriminator_value = None # type: str + + 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, AlexaDataStorePackageManagerInterface): + 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/datastore/packagemanager/error_type.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/error_type.py new file mode 100644 index 00000000..82a868fc --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/error_type.py @@ -0,0 +1,65 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ErrorType(Enum): + """ + Type of package error. Allowed values are [INTERNAL_ERROR] + + + + Allowed enum values: [INTERNAL_ERROR] + """ + INTERNAL_ERROR = "INTERNAL_ERROR" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ErrorType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/installation_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/installation_error.py new file mode 100644 index 00000000..a518febb --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/installation_error.py @@ -0,0 +1,146 @@ +# 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.request import Request + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_error import PackageError as PackageError_11bd3c82 + + +class InstallationError(Request): + """ + This event is sent by device DataStore Package Manager to let the skill developer know that there was a problem installing/updating the package. + + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param package_id: Unique package identifier for a client. + :type package_id: (optional) str + :param version: Current version of the package trying to be installed/updated on the device. + :type version: (optional) str + :param error: + :type error: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_error.PackageError + + """ + deserialized_types = { + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'package_id': 'str', + 'version': 'str', + 'error': 'ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_error.PackageError' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', + 'package_id': 'packageId', + 'version': 'version', + 'error': 'error' + } # type: Dict + supports_multiple_types = False + + def __init__(self, request_id=None, timestamp=None, locale=None, package_id=None, version=None, error=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[str], Optional[PackageError_11bd3c82]) -> None + """This event is sent by device DataStore Package Manager to let the skill developer know that there was a problem installing/updating the package. + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param package_id: Unique package identifier for a client. + :type package_id: (optional) str + :param version: Current version of the package trying to be installed/updated on the device. + :type version: (optional) str + :param error: + :type error: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_error.PackageError + """ + self.__discriminator_value = "Alexa.DataStore.PackageManager.InstallationError" # type: str + + self.object_type = self.__discriminator_value + super(InstallationError, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) + self.package_id = package_id + self.version = version + self.error = error + + 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, InstallationError): + 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/datastore/packagemanager/locations.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/locations.py new file mode 100644 index 00000000..dc12a14d --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/locations.py @@ -0,0 +1,65 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Locations(Enum): + """ + Location where the package can be rendered on the device. + + + + Allowed enum values: [FAVORITE] + """ + FAVORITE = "FAVORITE" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, Locations): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package.py new file mode 100644 index 00000000..4637c836 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package.py @@ -0,0 +1,108 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Package(object): + """ + Information of the package that is being installed on the device. + + + :param package_version: Version of a package manifest schema. Currently supported schema version is 1.0. + :type package_version: (optional) str + + """ + deserialized_types = { + 'package_version': 'str' + } # type: Dict + + attribute_map = { + 'package_version': 'packageVersion' + } # type: Dict + supports_multiple_types = False + + def __init__(self, package_version=None): + # type: (Optional[str]) -> None + """Information of the package that is being installed on the device. + + :param package_version: Version of a package manifest schema. Currently supported schema version is 1.0. + :type package_version: (optional) str + """ + self.__discriminator_value = None # type: str + + self.package_version = package_version + + 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, Package): + 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/datastore/packagemanager/package_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package_error.py new file mode 100644 index 00000000..e37e6c35 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package_error.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.packagemanager.error_type import ErrorType as ErrorType_68078ba6 + + +class PackageError(object): + """ + Additional information about the package installation/update error. + + + :param object_type: + :type object_type: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.error_type.ErrorType + :param content: Opaque payload which will contain additional details about error. + :type content: (optional) object + + """ + deserialized_types = { + 'object_type': 'ask_sdk_model.interfaces.alexa.datastore.packagemanager.error_type.ErrorType', + 'content': 'object' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'content': 'content' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, content=None): + # type: (Optional[ErrorType_68078ba6], Optional[object]) -> None + """Additional information about the package installation/update error. + + :param object_type: + :type object_type: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.error_type.ErrorType + :param content: Opaque payload which will contain additional details about error. + :type content: (optional) object + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.content = content + + 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, PackageError): + 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/datastore/packagemanager/package_install_usage.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package_install_usage.py new file mode 100644 index 00000000..2c28109a --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package_install_usage.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.packagemanager.locations import Locations as Locations_7ffdf38d + + +class PackageInstallUsage(object): + """ + Places where the package is going to be used on the device. This object is passed as part of the InstallRequest to the skill. + + + :param location: + :type location: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.locations.Locations + :param instance_id: Identifier of the instance of the package. + :type instance_id: (optional) str + + """ + deserialized_types = { + 'location': 'ask_sdk_model.interfaces.alexa.datastore.packagemanager.locations.Locations', + 'instance_id': 'str' + } # type: Dict + + attribute_map = { + 'location': 'location', + 'instance_id': 'instanceId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, location=None, instance_id=None): + # type: (Optional[Locations_7ffdf38d], Optional[str]) -> None + """Places where the package is going to be used on the device. This object is passed as part of the InstallRequest to the skill. + + :param location: + :type location: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.locations.Locations + :param instance_id: Identifier of the instance of the package. + :type instance_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.location = location + self.instance_id = instance_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, PackageInstallUsage): + 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/datastore/packagemanager/package_manager_state.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package_manager_state.py new file mode 100644 index 00000000..da764344 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package_manager_state.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_state_information import PackageStateInformation as PackageStateInformation_1aed7297 + + +class PackageManagerState(object): + """ + Provides context about the list of packages installed on the device. + + + :param installed_packages: Includes all installed packages on the device. + :type installed_packages: (optional) list[ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_state_information.PackageStateInformation] + + """ + deserialized_types = { + 'installed_packages': 'list[ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_state_information.PackageStateInformation]' + } # type: Dict + + attribute_map = { + 'installed_packages': 'installedPackages' + } # type: Dict + supports_multiple_types = False + + def __init__(self, installed_packages=None): + # type: (Optional[List[PackageStateInformation_1aed7297]]) -> None + """Provides context about the list of packages installed on the device. + + :param installed_packages: Includes all installed packages on the device. + :type installed_packages: (optional) list[ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_state_information.PackageStateInformation] + """ + self.__discriminator_value = None # type: str + + self.installed_packages = installed_packages + + 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, PackageManagerState): + 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/datastore/packagemanager/package_remove_usage.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package_remove_usage.py new file mode 100644 index 00000000..24b630c6 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package_remove_usage.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.packagemanager.locations import Locations as Locations_7ffdf38d + + +class PackageRemoveUsage(object): + """ + Places where the package is going to be not used anymore on the device. This object is passed as part of the PackageRemovedRequest to the skill. + + + :param location: + :type location: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.locations.Locations + :param instance_id: Identifier of the instance of the package. + :type instance_id: (optional) str + + """ + deserialized_types = { + 'location': 'ask_sdk_model.interfaces.alexa.datastore.packagemanager.locations.Locations', + 'instance_id': 'str' + } # type: Dict + + attribute_map = { + 'location': 'location', + 'instance_id': 'instanceId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, location=None, instance_id=None): + # type: (Optional[Locations_7ffdf38d], Optional[str]) -> None + """Places where the package is going to be not used anymore on the device. This object is passed as part of the PackageRemovedRequest to the skill. + + :param location: + :type location: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.locations.Locations + :param instance_id: Identifier of the instance of the package. + :type instance_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.location = location + self.instance_id = instance_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, PackageRemoveUsage): + 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/datastore/packagemanager/package_state_information.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package_state_information.py new file mode 100644 index 00000000..2035be04 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/package_state_information.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class PackageStateInformation(object): + """ + State information of the DataStore package version installed on the device. + + + :param package_id: Unique package identifier for a client. + :type package_id: (optional) str + :param version: Unique version of a package. + :type version: (optional) str + + """ + deserialized_types = { + 'package_id': 'str', + 'version': 'str' + } # type: Dict + + attribute_map = { + 'package_id': 'packageId', + 'version': 'version' + } # type: Dict + supports_multiple_types = False + + def __init__(self, package_id=None, version=None): + # type: (Optional[str], Optional[str]) -> None + """State information of the DataStore package version installed on the device. + + :param package_id: Unique package identifier for a client. + :type package_id: (optional) str + :param version: Unique version of a package. + :type version: (optional) str + """ + self.__discriminator_value = None # type: str + + self.package_id = package_id + self.version = version + + 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, PackageStateInformation): + 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-smapi-model/ask_smapi_model/v1/skill/asr/py.typed b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/py.typed similarity index 100% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/py.typed rename to ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/py.typed diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/update_request.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/update_request.py new file mode 100644 index 00000000..92f98844 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/update_request.py @@ -0,0 +1,145 @@ +# 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.request import Request + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class UpdateRequest(Request): + """ + This event is request sent by device DataStore Package Manager asking the skill developer them to update the version of the package on device. + + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param package_id: Unique package identifier for a client. + :type package_id: (optional) str + :param from_version: Current version of a package installed on the device. + :type from_version: (optional) str + :param to_version: Latest version of a package being installed on the device. + :type to_version: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'package_id': 'str', + 'from_version': 'str', + 'to_version': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', + 'package_id': 'packageId', + 'from_version': 'fromVersion', + 'to_version': 'toVersion' + } # type: Dict + supports_multiple_types = False + + def __init__(self, request_id=None, timestamp=None, locale=None, package_id=None, from_version=None, to_version=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[str], Optional[str]) -> None + """This event is request sent by device DataStore Package Manager asking the skill developer them to update the version of the package on device. + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param package_id: Unique package identifier for a client. + :type package_id: (optional) str + :param from_version: Current version of a package installed on the device. + :type from_version: (optional) str + :param to_version: Latest version of a package being installed on the device. + :type to_version: (optional) str + """ + self.__discriminator_value = "Alexa.DataStore.PackageManager.UpdateRequest" # type: str + + self.object_type = self.__discriminator_value + super(UpdateRequest, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) + self.package_id = package_id + self.from_version = from_version + self.to_version = to_version + + 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, UpdateRequest): + 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/datastore/packagemanager/usages_install_request.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/usages_install_request.py new file mode 100644 index 00000000..eb8299a7 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/usages_install_request.py @@ -0,0 +1,123 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_install_usage import PackageInstallUsage as PackageInstallUsage_b05bea81 + + +class UsagesInstallRequest(object): + """ + Information about the package that is going to be installed on the device and also where its going to be used on the device. + + + :param package_id: Unique package identifier for a client. + :type package_id: (optional) str + :param package_version: Version of a package being installed on the device. + :type package_version: (optional) str + :param usages: Areas where package is going to be used on the device. + :type usages: (optional) list[ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_install_usage.PackageInstallUsage] + + """ + deserialized_types = { + 'package_id': 'str', + 'package_version': 'str', + 'usages': 'list[ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_install_usage.PackageInstallUsage]' + } # type: Dict + + attribute_map = { + 'package_id': 'packageId', + 'package_version': 'packageVersion', + 'usages': 'usages' + } # type: Dict + supports_multiple_types = False + + def __init__(self, package_id=None, package_version=None, usages=None): + # type: (Optional[str], Optional[str], Optional[List[PackageInstallUsage_b05bea81]]) -> None + """Information about the package that is going to be installed on the device and also where its going to be used on the device. + + :param package_id: Unique package identifier for a client. + :type package_id: (optional) str + :param package_version: Version of a package being installed on the device. + :type package_version: (optional) str + :param usages: Areas where package is going to be used on the device. + :type usages: (optional) list[ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_install_usage.PackageInstallUsage] + """ + self.__discriminator_value = None # type: str + + self.package_id = package_id + self.package_version = package_version + self.usages = usages + + 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, UsagesInstallRequest): + 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/datastore/packagemanager/usages_installed.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/usages_installed.py new file mode 100644 index 00000000..cc41c794 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/usages_installed.py @@ -0,0 +1,132 @@ +# 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.request import Request + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_install_request import UsagesInstallRequest as UsagesInstallRequest_32338955 + + +class UsagesInstalled(Request): + """ + This event is sent by device DataStore Package Manager to the skill developer to let them know about the usages of the packages being installed on the device. + + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param payload: + :type payload: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_install_request.UsagesInstallRequest + + """ + deserialized_types = { + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'payload': 'ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_install_request.UsagesInstallRequest' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', + 'payload': 'payload' + } # type: Dict + supports_multiple_types = False + + def __init__(self, request_id=None, timestamp=None, locale=None, payload=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[UsagesInstallRequest_32338955]) -> None + """This event is sent by device DataStore Package Manager to the skill developer to let them know about the usages of the packages being installed on the device. + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param payload: + :type payload: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_install_request.UsagesInstallRequest + """ + self.__discriminator_value = "Alexa.DataStore.PackageManager.UsagesInstalled" # type: str + + self.object_type = self.__discriminator_value + super(UsagesInstalled, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) + self.payload = payload + + 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, UsagesInstalled): + 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/datastore/packagemanager/usages_removed.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/usages_removed.py new file mode 100644 index 00000000..a94cd1e7 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/usages_removed.py @@ -0,0 +1,132 @@ +# 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.request import Request + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_removed_request import UsagesRemovedRequest as UsagesRemovedRequest_8fb83e4b + + +class UsagesRemoved(Request): + """ + This event is sent by device DataStore Package Manager to let the skill developer know about the usages of packages removed from the device. + + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param payload: + :type payload: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_removed_request.UsagesRemovedRequest + + """ + deserialized_types = { + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'payload': 'ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_removed_request.UsagesRemovedRequest' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', + 'payload': 'payload' + } # type: Dict + supports_multiple_types = False + + def __init__(self, request_id=None, timestamp=None, locale=None, payload=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[UsagesRemovedRequest_8fb83e4b]) -> None + """This event is sent by device DataStore Package Manager to let the skill developer know about the usages of packages removed from the device. + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param payload: + :type payload: (optional) ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_removed_request.UsagesRemovedRequest + """ + self.__discriminator_value = "Alexa.DataStore.PackageManager.UsagesRemoved" # type: str + + self.object_type = self.__discriminator_value + super(UsagesRemoved, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) + self.payload = payload + + 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, UsagesRemoved): + 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/datastore/packagemanager/usages_removed_request.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/usages_removed_request.py new file mode 100644 index 00000000..4eebff33 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/packagemanager/usages_removed_request.py @@ -0,0 +1,123 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_remove_usage import PackageRemoveUsage as PackageRemoveUsage_81b685a5 + + +class UsagesRemovedRequest(object): + """ + Information about where the package has been removed and where its not being used anymore. + + + :param package_id: Unique package identifier for a client. + :type package_id: (optional) str + :param package_version: Version of a package being removed from the device. + :type package_version: (optional) str + :param usages: Areas where package is going to be not used on the device. + :type usages: (optional) list[ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_remove_usage.PackageRemoveUsage] + + """ + deserialized_types = { + 'package_id': 'str', + 'package_version': 'str', + 'usages': 'list[ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_remove_usage.PackageRemoveUsage]' + } # type: Dict + + attribute_map = { + 'package_id': 'packageId', + 'package_version': 'packageVersion', + 'usages': 'usages' + } # type: Dict + supports_multiple_types = False + + def __init__(self, package_id=None, package_version=None, usages=None): + # type: (Optional[str], Optional[str], Optional[List[PackageRemoveUsage_81b685a5]]) -> None + """Information about where the package has been removed and where its not being used anymore. + + :param package_id: Unique package identifier for a client. + :type package_id: (optional) str + :param package_version: Version of a package being removed from the device. + :type package_version: (optional) str + :param usages: Areas where package is going to be not used on the device. + :type usages: (optional) list[ask_sdk_model.interfaces.alexa.datastore.packagemanager.package_remove_usage.PackageRemoveUsage] + """ + self.__discriminator_value = None # type: str + + self.package_id = package_id + self.package_version = package_version + self.usages = usages + + 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, UsagesRemovedRequest): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/py.typed b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/py.typed similarity index 100% rename from ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/py.typed rename to ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/py.typed diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/storage_limit_execeeded_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/storage_limit_execeeded_error.py new file mode 100644 index 00000000..f43c6375 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/datastore/storage_limit_execeeded_error.py @@ -0,0 +1,114 @@ +# 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.datastore.commands_error import CommandsError + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.datastore.execution_error_content import ExecutionErrorContent as ExecutionErrorContent_aa5000b0 + + +class StorageLimitExeceededError(CommandsError): + """ + Describes an execution error for exceeding storage limit. + + + :param content: + :type content: (optional) ask_sdk_model.interfaces.alexa.datastore.execution_error_content.ExecutionErrorContent + + """ + deserialized_types = { + 'object_type': 'str', + 'content': 'ask_sdk_model.interfaces.alexa.datastore.execution_error_content.ExecutionErrorContent' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'content': 'content' + } # type: Dict + supports_multiple_types = False + + def __init__(self, content=None): + # type: (Optional[ExecutionErrorContent_aa5000b0]) -> None + """Describes an execution error for exceeding storage limit. + + :param content: + :type content: (optional) ask_sdk_model.interfaces.alexa.datastore.execution_error_content.ExecutionErrorContent + """ + self.__discriminator_value = "STORAGE_LIMIT_EXCEEDED" # type: str + + self.object_type = self.__discriminator_value + super(StorageLimitExeceededError, self).__init__(object_type=self.__discriminator_value) + self.content = content + + 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, StorageLimitExeceededError): + 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/experimentation/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/__init__.py new file mode 100644 index 00000000..26b0f3cc --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/__init__.py @@ -0,0 +1,20 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + +from .experimentation_state import ExperimentationState +from .experiment_trigger_response import ExperimentTriggerResponse +from .treatment_id import TreatmentId +from .experiment_assignment import ExperimentAssignment diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/experiment_assignment.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/experiment_assignment.py new file mode 100644 index 00000000..1f22c265 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/experiment_assignment.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.experimentation.treatment_id import TreatmentId as TreatmentId_29cc9e4c + + +class ExperimentAssignment(object): + """ + Represents the state of an active experiment's assignment + + + :param id: + :type id: (optional) str + :param treatment_id: + :type treatment_id: (optional) ask_sdk_model.interfaces.alexa.experimentation.treatment_id.TreatmentId + + """ + deserialized_types = { + 'id': 'str', + 'treatment_id': 'ask_sdk_model.interfaces.alexa.experimentation.treatment_id.TreatmentId' + } # type: Dict + + attribute_map = { + 'id': 'id', + 'treatment_id': 'treatmentId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None, treatment_id=None): + # type: (Optional[str], Optional[TreatmentId_29cc9e4c]) -> None + """Represents the state of an active experiment's assignment + + :param id: + :type id: (optional) str + :param treatment_id: + :type treatment_id: (optional) ask_sdk_model.interfaces.alexa.experimentation.treatment_id.TreatmentId + """ + self.__discriminator_value = None # type: str + + self.id = id + self.treatment_id = treatment_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, ExperimentAssignment): + 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/experimentation/experiment_trigger_response.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/experiment_trigger_response.py new file mode 100644 index 00000000..705c193c --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/experiment_trigger_response.py @@ -0,0 +1,108 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ExperimentTriggerResponse(object): + """ + Experiment trigger response from skill + + + :param triggered_experiments: Contains array of triggered experiment ids + :type triggered_experiments: (optional) list[str] + + """ + deserialized_types = { + 'triggered_experiments': 'list[str]' + } # type: Dict + + attribute_map = { + 'triggered_experiments': 'triggeredExperiments' + } # type: Dict + supports_multiple_types = False + + def __init__(self, triggered_experiments=None): + # type: (Optional[List[object]]) -> None + """Experiment trigger response from skill + + :param triggered_experiments: Contains array of triggered experiment ids + :type triggered_experiments: (optional) list[str] + """ + self.__discriminator_value = None # type: str + + self.triggered_experiments = triggered_experiments + + 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, ExperimentTriggerResponse): + 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/experimentation/experimentation_state.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/experimentation_state.py new file mode 100644 index 00000000..bb6fdcfd --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/experimentation_state.py @@ -0,0 +1,107 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.experimentation.experiment_assignment import ExperimentAssignment as ExperimentAssignment_7422d82e + + +class ExperimentationState(object): + """ + + :param active_experiments: + :type active_experiments: (optional) list[ask_sdk_model.interfaces.alexa.experimentation.experiment_assignment.ExperimentAssignment] + + """ + deserialized_types = { + 'active_experiments': 'list[ask_sdk_model.interfaces.alexa.experimentation.experiment_assignment.ExperimentAssignment]' + } # type: Dict + + attribute_map = { + 'active_experiments': 'activeExperiments' + } # type: Dict + supports_multiple_types = False + + def __init__(self, active_experiments=None): + # type: (Optional[List[ExperimentAssignment_7422d82e]]) -> None + """ + + :param active_experiments: + :type active_experiments: (optional) list[ask_sdk_model.interfaces.alexa.experimentation.experiment_assignment.ExperimentAssignment] + """ + self.__discriminator_value = None # type: str + + self.active_experiments = active_experiments + + 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, ExperimentationState): + 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-smapi-model/ask_smapi_model/v1/skill/private/py.typed b/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/py.typed similarity index 100% rename from ask-smapi-model/ask_smapi_model/v1/skill/private/py.typed rename to ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/py.typed diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/treatment_id.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/treatment_id.py new file mode 100644 index 00000000..ffc10c3c --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/experimentation/treatment_id.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class TreatmentId(Enum): + """ + Experiment treatment identifier + + + + Allowed enum values: [C, T1] + """ + C = "C" + T1 = "T1" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, TreatmentId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/extension/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/extension/__init__.py new file mode 100644 index 00000000..3334e5ad --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/extension/__init__.py @@ -0,0 +1,18 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + +from .extensions_state import ExtensionsState +from .available_extension import AvailableExtension diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/audio_asset_download_url_expiry_time.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/extension/available_extension.py similarity index 89% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/audio_asset_download_url_expiry_time.py rename to ask-sdk-model/ask_sdk_model/interfaces/alexa/extension/available_extension.py index 1e8f3a72..ed3e2c00 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/audio_asset_download_url_expiry_time.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/extension/available_extension.py @@ -21,13 +21,13 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class AudioAssetDownloadUrlExpiryTime(object): +class AvailableExtension(object): """ - Timestamp when the audio download url expire in ISO 8601 format + This object describes an extension that skill can request at runtime. @@ -41,7 +41,7 @@ class AudioAssetDownloadUrlExpiryTime(object): def __init__(self): # type: () -> None - """Timestamp when the audio download url expire in ISO 8601 format + """This object describes an extension that skill can request at runtime. """ self.__discriminator_value = None # type: str @@ -89,7 +89,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, AudioAssetDownloadUrlExpiryTime): + if not isinstance(other, AvailableExtension): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/extension/extensions_state.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/extension/extensions_state.py new file mode 100644 index 00000000..7c1e64a4 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/extension/extensions_state.py @@ -0,0 +1,107 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.extension.available_extension import AvailableExtension as AvailableExtension_67e7ad39 + + +class ExtensionsState(object): + """ + + :param available: A map from extension URI to extension object where the object space is reserved for providing authorization information or other such data in the future. + :type available: (optional) dict(str, ask_sdk_model.interfaces.alexa.extension.available_extension.AvailableExtension) + + """ + deserialized_types = { + 'available': 'dict(str, ask_sdk_model.interfaces.alexa.extension.available_extension.AvailableExtension)' + } # type: Dict + + attribute_map = { + 'available': 'available' + } # type: Dict + supports_multiple_types = False + + def __init__(self, available=None): + # type: (Optional[Dict[str, AvailableExtension_67e7ad39]]) -> None + """ + + :param available: A map from extension URI to extension object where the object space is reserved for providing authorization information or other such data in the future. + :type available: (optional) dict(str, ask_sdk_model.interfaces.alexa.extension.available_extension.AvailableExtension) + """ + self.__discriminator_value = None # type: str + + self.available = available + + 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, ExtensionsState): + 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/extension/py.typed b/ask-sdk-model/ask_sdk_model/interfaces/alexa/extension/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/__init__.py index 57220ec5..965d0188 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/__init__.py @@ -14,3 +14,6 @@ # from __future__ import absolute_import +from .presentation_state import PresentationState +from .presentation_state_context import PresentationStateContext +from .apl_presentation_state_context import AplPresentationStateContext 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 c1bfcd22..f5e9ccf2 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 @@ -14,62 +14,72 @@ # from __future__ import absolute_import -from .component_visible_on_screen_media_tag_state_enum import ComponentVisibleOnScreenMediaTagStateEnum +from .back_type import BackType +from .transform_property import TransformProperty +from .runtime import Runtime +from .clear_focus_command import ClearFocusCommand from .component_visible_on_screen_pager_tag import ComponentVisibleOnScreenPagerTag -from .position import Position -from .idle_command import IdleCommand +from .component_state import ComponentState +from .component_entity import ComponentEntity from .open_url_command import OpenUrlCommand -from .user_event import UserEvent +from .speak_item_command import SpeakItemCommand +from .component_visible_on_screen_list_tag import ComponentVisibleOnScreenListTag from .list_runtime_error_reason import ListRuntimeErrorReason +from .skew_transform_property import SkewTransformProperty +from .reinflate_command import ReinflateCommand +from .animated_transform_property import AnimatedTransformProperty +from .set_page_command import SetPageCommand +from .set_focus_command import SetFocusCommand +from .position import Position +from .command import Command +from .animated_opacity_property import AnimatedOpacityProperty +from .component_visible_on_screen_scrollable_tag import ComponentVisibleOnScreenScrollableTag from .play_media_command import PlayMediaCommand -from .component_visible_on_screen import ComponentVisibleOnScreen -from .render_document_directive import RenderDocumentDirective -from .runtime_error import RuntimeError from .audio_track import AudioTrack -from .parallel_command import ParallelCommand -from .animated_opacity_property import AnimatedOpacityProperty -from .set_value_command import SetValueCommand -from .scroll_command import ScrollCommand +from .send_event_command import SendEventCommand +from .component_visible_on_screen_list_item_tag import ComponentVisibleOnScreenListItemTag +from .alexa_presentation_apl_interface import AlexaPresentationAplInterface +from .set_state_command import SetStateCommand +from .animate_item_repeat_mode import AnimateItemRepeatMode +from .sequential_command import SequentialCommand from .update_index_list_data_directive import UpdateIndexListDataDirective +from .idle_command import IdleCommand +from .go_back_command import GoBackCommand +from .component_visible_on_screen_scrollable_tag_direction_enum import ComponentVisibleOnScreenScrollableTagDirectionEnum +from .media_command_type import MediaCommandType +from .component_visible_on_screen import ComponentVisibleOnScreen +from .speak_list_command import SpeakListCommand +from .parallel_command import ParallelCommand from .auto_page_command import AutoPageCommand -from .speak_item_command import SpeakItemCommand -from .video_source import VideoSource -from .animate_item_repeat_mode import AnimateItemRepeatMode -from .animated_property import AnimatedProperty -from .skew_transform_property import SkewTransformProperty -from .animated_transform_property import AnimatedTransformProperty +from .scroll_command import ScrollCommand +from .show_overlay_command import ShowOverlayCommand from .runtime_error_event import RuntimeErrorEvent +from .hide_overlay_command import HideOverlayCommand +from .align import Align +from .render_document_directive import RenderDocumentDirective +from .rotate_transform_property import RotateTransformProperty +from .component_visible_on_screen_media_tag_state_enum import ComponentVisibleOnScreenMediaTagStateEnum from .animate_item_command import AnimateItemCommand +from .scale_transform_property import ScaleTransformProperty +from .set_value_command import SetValueCommand +from .rendered_document_state import RenderedDocumentState +from .list_runtime_error import ListRuntimeError +from .execute_commands_directive import ExecuteCommandsDirective from .component_visible_on_screen_media_tag import ComponentVisibleOnScreenMediaTag -from .transform_property import TransformProperty -from .send_index_list_data_directive import SendIndexListDataDirective -from .align import Align +from .runtime_error import RuntimeError +from .control_media_command import ControlMediaCommand +from .finish_command import FinishCommand +from .animated_property import AnimatedProperty from .highlight_mode import HighlightMode -from .sequential_command import SequentialCommand -from .runtime import Runtime -from .execute_commands_directive import ExecuteCommandsDirective -from .component_visible_on_screen_scrollable_tag import ComponentVisibleOnScreenScrollableTag +from .load_index_list_data_event import LoadIndexListDataEvent +from .scroll_to_index_command import ScrollToIndexCommand +from .scroll_to_component_command import ScrollToComponentCommand +from .load_token_list_data_event import LoadTokenListDataEvent from .move_transform_property import MoveTransformProperty -from .clear_focus_command import ClearFocusCommand -from .component_entity import ComponentEntity -from .command import Command -from .set_focus_command import SetFocusCommand -from .control_media_command import ControlMediaCommand -from .list_runtime_error import ListRuntimeError -from .component_visible_on_screen_list_tag import ComponentVisibleOnScreenListTag -from .set_page_command import SetPageCommand -from .component_visible_on_screen_list_item_tag import ComponentVisibleOnScreenListItemTag -from .component_visible_on_screen_scrollable_tag_direction_enum import ComponentVisibleOnScreenScrollableTagDirectionEnum -from .scale_transform_property import ScaleTransformProperty -from .send_event_command import SendEventCommand -from .component_visible_on_screen_tags import ComponentVisibleOnScreenTags -from .alexa_presentation_apl_interface import AlexaPresentationAplInterface +from .send_index_list_data_directive import SendIndexListDataDirective 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 .speak_list_command import SpeakListCommand -from .media_command_type import MediaCommandType -from .rendered_document_state import RenderedDocumentState -from .component_state import ComponentState -from .load_index_list_data_event import LoadIndexListDataEvent +from .user_event import UserEvent +from .component_visible_on_screen_tags import ComponentVisibleOnScreenTags +from .select_command import SelectCommand +from .video_source import VideoSource +from .send_token_list_data_directive import SendTokenListDataDirective diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/alexa_presentation_apl_interface.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/alexa_presentation_apl_interface.py index d141d449..6b2ad40f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/alexa_presentation_apl_interface.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/alexa_presentation_apl_interface.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.runtime import Runtime + from ask_sdk_model.interfaces.alexa.presentation.apl.runtime import Runtime as Runtime_dab8fc4c class AlexaPresentationAplInterface(object): @@ -43,7 +43,7 @@ class AlexaPresentationAplInterface(object): supports_multiple_types = False def __init__(self, runtime=None): - # type: (Optional[Runtime]) -> None + # type: (Optional[Runtime_dab8fc4c]) -> None """ :param runtime: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/align.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/align.py index 6e5d7985..be84d319 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/align.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/align.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class Align(Enum): visible = "visible" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Align): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/animate_item_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animate_item_command.py index aff85964..f1c4d5e0 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 @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.animated_property import AnimatedProperty - from ask_sdk_model.interfaces.alexa.presentation.apl.animate_item_repeat_mode import AnimateItemRepeatMode + from ask_sdk_model.interfaces.alexa.presentation.apl.animated_property import AnimatedProperty as AnimatedProperty_b438632b + from ask_sdk_model.interfaces.alexa.presentation.apl.animate_item_repeat_mode import AnimateItemRepeatMode as AnimateItemRepeatMode_22d93893 class AnimateItemCommand(Command): @@ -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], Optional[List[AnimatedProperty]]) -> 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/animate_item_repeat_mode.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animate_item_repeat_mode.py index cb7c25fd..d5fecf9f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animate_item_repeat_mode.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animate_item_repeat_mode.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class AnimateItemRepeatMode(Enum): reverse = "reverse" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, AnimateItemRepeatMode): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/animated_opacity_property.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animated_opacity_property.py index 9804ed68..bd723872 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animated_opacity_property.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animated_opacity_property.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animated_property.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animated_property.py index 846dae8e..55ced389 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animated_property.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animated_property.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animated_transform_property.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animated_transform_property.py index eba66fb2..74fb6091 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animated_transform_property.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/animated_transform_property.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.transform_property import TransformProperty + from ask_sdk_model.interfaces.alexa.presentation.apl.transform_property import TransformProperty as TransformProperty_5119bfb1 class AnimatedTransformProperty(AnimatedProperty): @@ -50,7 +50,7 @@ class AnimatedTransformProperty(AnimatedProperty): supports_multiple_types = False def __init__(self, object_from=None, to=None): - # type: (Optional[List[TransformProperty]], Optional[List[TransformProperty]]) -> None + # type: (Optional[List[TransformProperty_5119bfb1]], Optional[List[TransformProperty_5119bfb1]]) -> None """ :param object_from: The starting value of the property. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/audio_track.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/audio_track.py index 362c22cf..34ca430e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/audio_track.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/audio_track.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -31,12 +31,14 @@ class AudioTrack(Enum): - Allowed enum values: [foreground] + Allowed enum values: [foreground, background, none] """ foreground = "foreground" + background = "background" + none = "none" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, AudioTrack): return False @@ -60,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/auto_page_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/auto_page_command.py index b2a95267..8c696900 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 @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -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/back_type.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/back_type.py new file mode 100644 index 00000000..69882c0f --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/back_type.py @@ -0,0 +1,67 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class BackType(Enum): + """ + The type of back navigation to use. Defaults to count. + + + + Allowed enum values: [count, index, id] + """ + count = "count" + index = "index" + id = "id" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, BackType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> 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/clear_focus_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/clear_focus_command.py index 919b00df..dc34f508 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 @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -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 ac9387a1..754d94d4 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 @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -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,10 +53,14 @@ 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`, | + | GoBack: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.go_back_command.GoBackCommand`, + | | Scroll: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.scroll_command.ScrollCommand`, | | Idle: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.idle_command.IdleCommand`, @@ -61,8 +69,14 @@ class Command(object): | | SendEvent: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.send_event_command.SendEventCommand`, | + | ShowOverlay: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.show_overlay_command.ShowOverlayCommand`, + | | 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`, + | + | HideOverlay: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.hide_overlay_command.HideOverlayCommand`, + | | 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 +87,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 +113,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,22 +122,29 @@ 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', + 'GoBack': 'ask_sdk_model.interfaces.alexa.presentation.apl.go_back_command.GoBackCommand', 'Scroll': 'ask_sdk_model.interfaces.alexa.presentation.apl.scroll_command.ScrollCommand', 'Idle': 'ask_sdk_model.interfaces.alexa.presentation.apl.idle_command.IdleCommand', 'AnimateItem': 'ask_sdk_model.interfaces.alexa.presentation.apl.animate_item_command.AnimateItemCommand', 'SendEvent': 'ask_sdk_model.interfaces.alexa.presentation.apl.send_event_command.SendEventCommand', + 'ShowOverlay': 'ask_sdk_model.interfaces.alexa.presentation.apl.show_overlay_command.ShowOverlayCommand', 'SpeakList': 'ask_sdk_model.interfaces.alexa.presentation.apl.speak_list_command.SpeakListCommand', + 'Select': 'ask_sdk_model.interfaces.alexa.presentation.apl.select_command.SelectCommand', + 'HideOverlay': 'ask_sdk_model.interfaces.alexa.presentation.apl.hide_overlay_command.HideOverlayCommand', '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 +152,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 +162,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 +174,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/component_entity.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_entity.py index a1c185eb..4fbcf7e0 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_entity.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_entity.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_state.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_state.py index 1d27ca9e..6bc20728 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ComponentState(Enum): focused = "focused" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ComponentState): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/component_visible_on_screen.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen.py index fd8a5735..3c1a0c41 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen import ComponentVisibleOnScreen - from ask_sdk_model.interfaces.alexa.presentation.apl.component_entity import ComponentEntity - from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_tags import ComponentVisibleOnScreenTags + from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen import ComponentVisibleOnScreen as ComponentVisibleOnScreen_c94bf507 + from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_tags import ComponentVisibleOnScreenTags as ComponentVisibleOnScreenTags_2ad43cf6 + from ask_sdk_model.interfaces.alexa.presentation.apl.component_entity import ComponentEntity as ComponentEntity_262ae12d class ComponentVisibleOnScreen(object): @@ -79,7 +79,7 @@ class ComponentVisibleOnScreen(object): supports_multiple_types = False def __init__(self, children=None, entities=None, id=None, position=None, tags=None, transform=None, object_type=None, uid=None, visibility=None): - # type: (Optional[List[ComponentVisibleOnScreen]], Optional[List[ComponentEntity]], Optional[str], Optional[str], Optional[ComponentVisibleOnScreenTags], Optional[List[object]], Optional[str], Optional[str], Optional[float]) -> None + # type: (Optional[List[ComponentVisibleOnScreen_c94bf507]], Optional[List[ComponentEntity_262ae12d]], Optional[str], Optional[str], Optional[ComponentVisibleOnScreenTags_2ad43cf6], Optional[List[object]], Optional[str], Optional[str], Optional[float]) -> None """Definition of a visible APL element shown on screen. :param children: All child elements of the displayed element. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_list_item_tag.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_list_item_tag.py index 93ab8c34..2939565d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_list_item_tag.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_list_item_tag.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_list_tag.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_list_tag.py index 0a6758e4..4dd6315c 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_list_tag.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_list_tag.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_media_tag.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_media_tag.py index 3901169e..d2328db5 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_media_tag.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_media_tag.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.component_entity import ComponentEntity - from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_media_tag_state_enum import ComponentVisibleOnScreenMediaTagStateEnum + from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_media_tag_state_enum import ComponentVisibleOnScreenMediaTagStateEnum as ComponentVisibleOnScreenMediaTagStateEnum_669eb6d5 + from ask_sdk_model.interfaces.alexa.presentation.apl.component_entity import ComponentEntity as ComponentEntity_262ae12d class ComponentVisibleOnScreenMediaTag(object): @@ -74,7 +74,7 @@ class ComponentVisibleOnScreenMediaTag(object): supports_multiple_types = False def __init__(self, position_in_milliseconds=None, state=None, allow_adjust_seek_position_forward=None, allow_adjust_seek_position_backwards=None, allow_next=None, allow_previous=None, entities=None, url=None): - # type: (Optional[int], Optional[ComponentVisibleOnScreenMediaTagStateEnum], Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[List[ComponentEntity]], Optional[str]) -> None + # type: (Optional[int], Optional[ComponentVisibleOnScreenMediaTagStateEnum_669eb6d5], Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[List[ComponentEntity_262ae12d]], Optional[str]) -> None """Media player :param position_in_milliseconds: Current position of the play head from the start of the track. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_media_tag_state_enum.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_media_tag_state_enum.py index 140a35ba..5683609b 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_media_tag_state_enum.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_media_tag_state_enum.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ComponentVisibleOnScreenMediaTagStateEnum(Enum): paused = "paused" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ComponentVisibleOnScreenMediaTagStateEnum): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/component_visible_on_screen_pager_tag.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_pager_tag.py index 215aead2..873d34d7 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_pager_tag.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_pager_tag.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_scrollable_tag.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_scrollable_tag.py index 243dbc7e..ddb1573c 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_scrollable_tag.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_scrollable_tag.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_scrollable_tag_direction_enum import ComponentVisibleOnScreenScrollableTagDirectionEnum + from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_scrollable_tag_direction_enum import ComponentVisibleOnScreenScrollableTagDirectionEnum as ComponentVisibleOnScreenScrollableTagDirectionEnum_7f54ff15 class ComponentVisibleOnScreenScrollableTag(object): @@ -53,7 +53,7 @@ class ComponentVisibleOnScreenScrollableTag(object): supports_multiple_types = False def __init__(self, direction=None, allow_forward=None, allow_backward=None): - # type: (Optional[ComponentVisibleOnScreenScrollableTagDirectionEnum], Optional[bool], Optional[bool]) -> None + # type: (Optional[ComponentVisibleOnScreenScrollableTagDirectionEnum_7f54ff15], Optional[bool], Optional[bool]) -> None """A scrollable region. :param direction: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_scrollable_tag_direction_enum.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_scrollable_tag_direction_enum.py index e089a41a..2d59d70d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_scrollable_tag_direction_enum.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_scrollable_tag_direction_enum.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class ComponentVisibleOnScreenScrollableTagDirectionEnum(Enum): vertical = "vertical" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ComponentVisibleOnScreenScrollableTagDirectionEnum): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/component_visible_on_screen_tags.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_tags.py index 69108799..ef220ecc 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_tags.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_tags.py @@ -21,14 +21,14 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_pager_tag import ComponentVisibleOnScreenPagerTag - from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_list_item_tag import ComponentVisibleOnScreenListItemTag - from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_scrollable_tag import ComponentVisibleOnScreenScrollableTag - from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_viewport_tag import ComponentVisibleOnScreenViewportTag - from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_list_tag import ComponentVisibleOnScreenListTag - from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_media_tag import ComponentVisibleOnScreenMediaTag + from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_viewport_tag import ComponentVisibleOnScreenViewportTag as ComponentVisibleOnScreenViewportTag_fe01bdff + from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_media_tag import ComponentVisibleOnScreenMediaTag as ComponentVisibleOnScreenMediaTag_21044cbd + from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_pager_tag import ComponentVisibleOnScreenPagerTag as ComponentVisibleOnScreenPagerTag_c57e1bff + from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_list_item_tag import ComponentVisibleOnScreenListItemTag as ComponentVisibleOnScreenListItemTag_9ab82632 + from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_scrollable_tag import ComponentVisibleOnScreenScrollableTag as ComponentVisibleOnScreenScrollableTag_29ddcc5f + from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen_list_tag import ComponentVisibleOnScreenListTag as ComponentVisibleOnScreenListTag_7f7ef87f class ComponentVisibleOnScreenTags(object): @@ -94,7 +94,7 @@ class ComponentVisibleOnScreenTags(object): supports_multiple_types = False def __init__(self, checked=None, clickable=None, disabled=None, focused=None, list=None, list_item=None, media=None, ordinal=None, pager=None, scrollable=None, spoken=None, viewport=None): - # type: (Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[ComponentVisibleOnScreenListTag], Optional[ComponentVisibleOnScreenListItemTag], Optional[ComponentVisibleOnScreenMediaTag], Optional[int], Optional[ComponentVisibleOnScreenPagerTag], Optional[ComponentVisibleOnScreenScrollableTag], Optional[bool], Optional[ComponentVisibleOnScreenViewportTag]) -> None + # type: (Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[ComponentVisibleOnScreenListTag_7f7ef87f], Optional[ComponentVisibleOnScreenListItemTag_9ab82632], Optional[ComponentVisibleOnScreenMediaTag_21044cbd], Optional[int], Optional[ComponentVisibleOnScreenPagerTag_c57e1bff], Optional[ComponentVisibleOnScreenScrollableTag_29ddcc5f], Optional[bool], Optional[ComponentVisibleOnScreenViewportTag_fe01bdff]) -> None """The tags which were attached to an element. :param checked: The checked state of a component that has two states. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_viewport_tag.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_viewport_tag.py index 7309dc52..6f878cb2 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_viewport_tag.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/component_visible_on_screen_viewport_tag.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime 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 c071669d..f568d149 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 @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.media_command_type import MediaCommandType + from ask_sdk_model.interfaces.alexa.presentation.apl.media_command_type import MediaCommandType as MediaCommandType_47512d90 class ControlMediaCommand(Command): @@ -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], 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/execute_commands_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/execute_commands_directive.py index 6341a7b5..a14f1be0 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/execute_commands_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/execute_commands_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command + from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command as Command_bc5ff832 class ExecuteCommandsDirective(Directive): @@ -52,7 +52,7 @@ class ExecuteCommandsDirective(Directive): supports_multiple_types = False def __init__(self, commands=None, token=None): - # type: (Optional[List[Command]], Optional[str]) -> None + # type: (Optional[List[Command_bc5ff832]], Optional[str]) -> None """Alexa.Presentation.APL.ExecuteCommands directive used to send APL commands to a device. :param commands: List of Command instances 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 00000000..5d7a75b5 --- /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/go_back_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/go_back_command.py new file mode 100644 index 00000000..11555746 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/go_back_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.back_type import BackType as BackType_6caaf6d3 + + +class GoBackCommand(Command): + """ + GoBack command POJO for the backstack APL extension. + + + :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 back_type: + :type back_type: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.back_type.BackType + :param back_value: The value of go back command. + :type back_value: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'delay': 'int', + 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', + 'when': 'bool', + 'back_type': 'ask_sdk_model.interfaces.alexa.presentation.apl.back_type.BackType', + 'back_value': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'delay': 'delay', + 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', + 'when': 'when', + 'back_type': 'backType', + 'back_value': 'backValue' + } # type: Dict + supports_multiple_types = False + + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, back_type=None, back_value=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[BackType_6caaf6d3], Optional[str]) -> None + """GoBack command POJO for the backstack APL extension. + + :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 back_type: + :type back_type: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.back_type.BackType + :param back_value: The value of go back command. + :type back_value: (optional) str + """ + self.__discriminator_value = "GoBack" # type: str + + self.object_type = self.__discriminator_value + super(GoBackCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) + self.back_type = back_type + self.back_value = back_value + + 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, GoBackCommand): + 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/hide_overlay_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/hide_overlay_command.py new file mode 100644 index 00000000..b02351fb --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/hide_overlay_command.py @@ -0,0 +1,164 @@ +# 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 HideOverlayCommand(Command): + """ + HideOverlay Command used by television shopping skill. + + + :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 overlay_layout_id: The id of overlay Layout. + :type overlay_layout_id: (optional) str + :param underlying_layout_id: The id of underlying Layout. + :type underlying_layout_id: (optional) str + :param overlay_width: The overlay width. + :type overlay_width: (optional) str + :param duration: The duration of HideOverlay Command. + :type duration: (optional) int + + """ + deserialized_types = { + 'object_type': 'str', + 'delay': 'int', + 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', + 'when': 'bool', + 'overlay_layout_id': 'str', + 'underlying_layout_id': 'str', + 'overlay_width': 'str', + 'duration': 'int' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'delay': 'delay', + 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', + 'when': 'when', + 'overlay_layout_id': 'overlayLayoutId', + 'underlying_layout_id': 'underlyingLayoutId', + 'overlay_width': 'overlayWidth', + 'duration': 'duration' + } # type: Dict + supports_multiple_types = False + + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, overlay_layout_id=None, underlying_layout_id=None, overlay_width=None, duration=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[str], Optional[str], Optional[str], Optional[int]) -> None + """HideOverlay Command used by television shopping skill. + + :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 overlay_layout_id: The id of overlay Layout. + :type overlay_layout_id: (optional) str + :param underlying_layout_id: The id of underlying Layout. + :type underlying_layout_id: (optional) str + :param overlay_width: The overlay width. + :type overlay_width: (optional) str + :param duration: The duration of HideOverlay Command. + :type duration: (optional) int + """ + self.__discriminator_value = "HideOverlay" # type: str + + self.object_type = self.__discriminator_value + super(HideOverlayCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) + self.overlay_layout_id = overlay_layout_id + self.underlying_layout_id = underlying_layout_id + self.overlay_width = overlay_width + self.duration = duration + + 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, HideOverlayCommand): + 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/highlight_mode.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/highlight_mode.py index f00b1e4d..953e8f28 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/highlight_mode.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/highlight_mode.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class HighlightMode(Enum): line = "line" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, HighlightMode): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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 5d55cf5e..022c7a4b 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 @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -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/list_runtime_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/list_runtime_error.py index bca8dfc7..9905d85a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/list_runtime_error.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/list_runtime_error.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.list_runtime_error_reason import ListRuntimeErrorReason + from ask_sdk_model.interfaces.alexa.presentation.apl.list_runtime_error_reason import ListRuntimeErrorReason as ListRuntimeErrorReason_ae1e3d53 class ListRuntimeError(RuntimeError): @@ -34,6 +34,8 @@ class ListRuntimeError(RuntimeError): :param message: A human-readable description of the error. :type message: (optional) str + :param token: The token as specified in the presentation's RenderDocument directive. + :type token: (optional) str :param reason: :type reason: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.list_runtime_error_reason.ListRuntimeErrorReason :param list_id: The identifier of the list in which the error occurred. @@ -47,6 +49,7 @@ class ListRuntimeError(RuntimeError): deserialized_types = { 'object_type': 'str', 'message': 'str', + 'token': 'str', 'reason': 'ask_sdk_model.interfaces.alexa.presentation.apl.list_runtime_error_reason.ListRuntimeErrorReason', 'list_id': 'str', 'list_version': 'int', @@ -56,6 +59,7 @@ class ListRuntimeError(RuntimeError): attribute_map = { 'object_type': 'type', 'message': 'message', + 'token': 'token', 'reason': 'reason', 'list_id': 'listId', 'list_version': 'listVersion', @@ -63,12 +67,14 @@ class ListRuntimeError(RuntimeError): } # type: Dict supports_multiple_types = False - def __init__(self, message=None, reason=None, list_id=None, list_version=None, operation_index=None): - # type: (Optional[str], Optional[ListRuntimeErrorReason], Optional[str], Optional[int], Optional[int]) -> None + def __init__(self, message=None, token=None, reason=None, list_id=None, list_version=None, operation_index=None): + # type: (Optional[str], Optional[str], Optional[ListRuntimeErrorReason_ae1e3d53], Optional[str], Optional[int], Optional[int]) -> None """Reports an error with list functionality. :param message: A human-readable description of the error. :type message: (optional) str + :param token: The token as specified in the presentation's RenderDocument directive. + :type token: (optional) str :param reason: :type reason: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.list_runtime_error_reason.ListRuntimeErrorReason :param list_id: The identifier of the list in which the error occurred. @@ -81,7 +87,7 @@ def __init__(self, message=None, reason=None, list_id=None, list_version=None, o self.__discriminator_value = "LIST_ERROR" # type: str self.object_type = self.__discriminator_value - super(ListRuntimeError, self).__init__(object_type=self.__discriminator_value, message=message) + super(ListRuntimeError, self).__init__(object_type=self.__discriminator_value, message=message, token=token) self.reason = reason self.list_id = list_id self.list_version = list_version diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/list_runtime_error_reason.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/list_runtime_error_reason.py index f4245626..4d7ab29a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/list_runtime_error_reason.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/list_runtime_error_reason.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -53,7 +53,7 @@ class ListRuntimeErrorReason(Enum): INTERNAL_ERROR = "INTERNAL_ERROR" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -69,7 +69,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ListRuntimeErrorReason): return False @@ -77,6 +77,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/listoperations/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/__init__.py index 05fcaed5..261e22d4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/__init__.py @@ -14,9 +14,9 @@ # from __future__ import absolute_import +from .delete_multiple_items_operation import DeleteMultipleItemsOperation from .insert_multiple_items_operation import InsertMultipleItemsOperation +from .delete_item_operation import DeleteItemOperation from .set_item_operation import SetItemOperation from .insert_item_operation import InsertItemOperation -from .delete_item_operation import DeleteItemOperation -from .delete_multiple_items_operation import DeleteMultipleItemsOperation from .operation import Operation diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/delete_item_operation.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/delete_item_operation.py index 6b8ab035..295edeac 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/delete_item_operation.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/delete_item_operation.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/delete_multiple_items_operation.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/delete_multiple_items_operation.py index d21e8cce..0ab5a1eb 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/delete_multiple_items_operation.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/delete_multiple_items_operation.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/insert_item_operation.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/insert_item_operation.py index 091f60fa..00efab9d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/insert_item_operation.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/insert_item_operation.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/insert_multiple_items_operation.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/insert_multiple_items_operation.py index b330877c..537034c6 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/insert_multiple_items_operation.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/insert_multiple_items_operation.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/operation.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/operation.py index e7962244..09e3c02d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/operation.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/operation.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/set_item_operation.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/set_item_operation.py index 79ed2be0..4e6b091f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/set_item_operation.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/listoperations/set_item_operation.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/load_index_list_data_event.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/load_index_list_data_event.py index d4bf13f1..eef8f761 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/load_index_list_data_event.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/load_index_list_data_event.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/load_token_list_data_event.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/load_token_list_data_event.py new file mode 100644 index 00000000..826d0ed2 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/load_token_list_data_event.py @@ -0,0 +1,152 @@ +# 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.request import Request + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class LoadTokenListDataEvent(Request): + """ + The LoadTokenListData event is sent to the skill to retrieve additional list items. + + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param token: The token as specified in the presentation's RenderDocument directive. + :type token: (optional) str + :param correlation_token: An identifier generated by a device that is used to correlate requests with their corresponding response directives. + :type correlation_token: (optional) str + :param list_id: The identifier of the list whose items to fetch. + :type list_id: (optional) str + :param page_token: Opaque token of the array of items to fetch. The skill is expected to be able to identify whether the token represents a forward or backward scroll direction. + :type page_token: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'token': 'str', + 'correlation_token': 'str', + 'list_id': 'str', + 'page_token': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', + 'token': 'token', + 'correlation_token': 'correlationToken', + 'list_id': 'listId', + 'page_token': 'pageToken' + } # type: Dict + supports_multiple_types = False + + def __init__(self, request_id=None, timestamp=None, locale=None, token=None, correlation_token=None, list_id=None, page_token=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[str], Optional[str], Optional[str]) -> None + """The LoadTokenListData event is sent to the skill to retrieve additional list items. + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param token: The token as specified in the presentation's RenderDocument directive. + :type token: (optional) str + :param correlation_token: An identifier generated by a device that is used to correlate requests with their corresponding response directives. + :type correlation_token: (optional) str + :param list_id: The identifier of the list whose items to fetch. + :type list_id: (optional) str + :param page_token: Opaque token of the array of items to fetch. The skill is expected to be able to identify whether the token represents a forward or backward scroll direction. + :type page_token: (optional) str + """ + self.__discriminator_value = "Alexa.Presentation.APL.LoadTokenListData" # type: str + + self.object_type = self.__discriminator_value + super(LoadTokenListDataEvent, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) + self.token = token + self.correlation_token = correlation_token + self.list_id = list_id + self.page_token = page_token + + 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, LoadTokenListDataEvent): + 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/media_command_type.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/media_command_type.py index 2f7b498c..21b2f0c6 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/media_command_type.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/media_command_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -42,7 +42,7 @@ class MediaCommandType(Enum): setTrack = "setTrack" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -58,7 +58,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, MediaCommandType): return False @@ -66,6 +66,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/move_transform_property.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/move_transform_property.py index 4a9f3dbc..2c096d6f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/move_transform_property.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/move_transform_property.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime 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 36692c3a..28202aaf 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 @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command + from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command as Command_bc5ff832 class OpenUrlCommand(Command): @@ -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]]) -> 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 04917114..cf92d1ae 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 @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command + from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command as Command_bc5ff832 class ParallelCommand(Command): @@ -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]]) -> 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 182b1138..bfc48b59 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 @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.video_source import VideoSource - from ask_sdk_model.interfaces.alexa.presentation.apl.audio_track import AudioTrack + from ask_sdk_model.interfaces.alexa.presentation.apl.audio_track import AudioTrack as AudioTrack_485ca517 + from ask_sdk_model.interfaces.alexa.presentation.apl.video_source import VideoSource as VideoSource_96b69bdd class PlayMediaCommand(Command): @@ -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], Optional[str], Optional[List[VideoSource]]) -> 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/position.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/position.py index 829b7160..9b3ee4c8 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/position.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/position.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class Position(Enum): relative = "relative" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Position): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/reinflate_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/reinflate_command.py new file mode 100644 index 00000000..13dd6528 --- /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/render_document_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/render_document_directive.py index e929160f..1b40e908 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/render_document_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/render_document_directive.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,6 +35,8 @@ class RenderDocumentDirective(Directive): :type document: (optional) dict(str, object) :param datasources: Data sources to bind to the document when rendering. :type datasources: (optional) dict(str, object) + :param sources: An object containing named documents or links. These documents can be referenced by the “template” parameter in the transformer. + :type sources: (optional) dict(str, object) :param packages: A list of packages including layouts, styles, and images etc. :type packages: (optional) list[object] @@ -44,6 +46,7 @@ class RenderDocumentDirective(Directive): 'token': 'str', 'document': 'dict(str, object)', 'datasources': 'dict(str, object)', + 'sources': 'dict(str, object)', 'packages': 'list[object]' } # type: Dict @@ -52,12 +55,13 @@ class RenderDocumentDirective(Directive): 'token': 'token', 'document': 'document', 'datasources': 'datasources', + 'sources': 'sources', 'packages': 'packages' } # type: Dict supports_multiple_types = False - def __init__(self, token=None, document=None, datasources=None, packages=None): - # type: (Optional[str], Optional[Dict[str, object]], Optional[Dict[str, object]], Optional[List[object]]) -> None + def __init__(self, token=None, document=None, datasources=None, sources=None, packages=None): + # type: (Optional[str], Optional[Dict[str, object]], Optional[Dict[str, object]], Optional[Dict[str, object]], Optional[List[object]]) -> None """ :param token: A unique identifier for the presentation. @@ -66,6 +70,8 @@ def __init__(self, token=None, document=None, datasources=None, packages=None): :type document: (optional) dict(str, object) :param datasources: Data sources to bind to the document when rendering. :type datasources: (optional) dict(str, object) + :param sources: An object containing named documents or links. These documents can be referenced by the “template” parameter in the transformer. + :type sources: (optional) dict(str, object) :param packages: A list of packages including layouts, styles, and images etc. :type packages: (optional) list[object] """ @@ -76,6 +82,7 @@ def __init__(self, token=None, document=None, datasources=None, packages=None): self.token = token self.document = document self.datasources = datasources + self.sources = sources self.packages = packages def to_dict(self): diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/rendered_document_state.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/rendered_document_state.py index b138e1ea..6092d299 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/rendered_document_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/rendered_document_state.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen import ComponentVisibleOnScreen + from ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen import ComponentVisibleOnScreen as ComponentVisibleOnScreen_c94bf507 class RenderedDocumentState(object): @@ -37,23 +37,27 @@ class RenderedDocumentState(object): :type version: (optional) str :param components_visible_on_screen: List of the visible APL components currently shown on screen. :type components_visible_on_screen: (optional) list[ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen.ComponentVisibleOnScreen] + :param data_sources: List of registered data sources' associated metadata + :type data_sources: (optional) list[object] """ deserialized_types = { 'token': 'str', 'version': 'str', - 'components_visible_on_screen': 'list[ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen.ComponentVisibleOnScreen]' + 'components_visible_on_screen': 'list[ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen.ComponentVisibleOnScreen]', + 'data_sources': 'list[object]' } # type: Dict attribute_map = { 'token': 'token', 'version': 'version', - 'components_visible_on_screen': 'componentsVisibleOnScreen' + 'components_visible_on_screen': 'componentsVisibleOnScreen', + 'data_sources': 'dataSources' } # type: Dict supports_multiple_types = False - def __init__(self, token=None, version=None, components_visible_on_screen=None): - # type: (Optional[str], Optional[str], Optional[List[ComponentVisibleOnScreen]]) -> None + def __init__(self, token=None, version=None, components_visible_on_screen=None, data_sources=None): + # type: (Optional[str], Optional[str], Optional[List[ComponentVisibleOnScreen_c94bf507]], Optional[List[object]]) -> None """Provides context for any APL content shown on screen. :param token: The token specified in the RenderDocument directive which rendered the content shown on screen. @@ -62,12 +66,15 @@ def __init__(self, token=None, version=None, components_visible_on_screen=None): :type version: (optional) str :param components_visible_on_screen: List of the visible APL components currently shown on screen. :type components_visible_on_screen: (optional) list[ask_sdk_model.interfaces.alexa.presentation.apl.component_visible_on_screen.ComponentVisibleOnScreen] + :param data_sources: List of registered data sources' associated metadata + :type data_sources: (optional) list[object] """ self.__discriminator_value = None # type: str self.token = token self.version = version self.components_visible_on_screen = components_visible_on_screen + self.data_sources = data_sources def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/rotate_transform_property.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/rotate_transform_property.py index 7723824c..3df190a0 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/rotate_transform_property.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/rotate_transform_property.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime.py index 0f00f561..ab7e2034 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime_error.py index ede54c58..3bfa98df 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime_error.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime_error.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,6 +35,8 @@ class RuntimeError(object): :type object_type: (optional) str :param message: A human-readable description of the error. :type message: (optional) str + :param token: The token as specified in the presentation's RenderDocument directive. + :type token: (optional) str .. note:: @@ -46,12 +48,14 @@ class RuntimeError(object): """ deserialized_types = { 'object_type': 'str', - 'message': 'str' + 'message': 'str', + 'token': 'str' } # type: Dict attribute_map = { 'object_type': 'type', - 'message': 'message' + 'message': 'message', + 'token': 'token' } # type: Dict supports_multiple_types = False @@ -64,19 +68,22 @@ class RuntimeError(object): __metaclass__ = ABCMeta @abstractmethod - def __init__(self, object_type=None, message=None): - # type: (Optional[str], Optional[str]) -> None + def __init__(self, object_type=None, message=None, token=None): + # type: (Optional[str], Optional[str], Optional[str]) -> None """A description of an error in APL functionality. :param object_type: Defines the error type and dictates which properties must/can be included. :type object_type: (optional) str :param message: A human-readable description of the error. :type message: (optional) str + :param token: The token as specified in the presentation's RenderDocument directive. + :type token: (optional) str """ self.__discriminator_value = None # type: str self.object_type = object_type self.message = message + self.token = token @classmethod def get_real_child_model(cls, data): diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime_error_event.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime_error_event.py index ef6e9c29..8f1fec70 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime_error_event.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/runtime_error_event.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.runtime_error import RuntimeError + from ask_sdk_model.interfaces.alexa.presentation.apl.runtime_error import RuntimeError as RuntimeError_6272b033 class RuntimeErrorEvent(Request): @@ -64,7 +64,7 @@ class RuntimeErrorEvent(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, token=None, errors=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[List[RuntimeError]]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[List[RuntimeError_6272b033]]) -> None """Notifies the skill of any errors in APL functionality. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scale_transform_property.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scale_transform_property.py index 512b91d3..404810d7 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scale_transform_property.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/scale_transform_property.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime 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 15576e34..90bc9f3d 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 @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -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 00000000..53270cbd --- /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 9514f7e9..9f3e2c4f 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 @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.align import Align + from ask_sdk_model.interfaces.alexa.presentation.apl.align import Align as Align_70ae0466 class ScrollToIndexCommand(Command): @@ -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], 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 00000000..ca2acd40 --- /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 cc8c3e85..d5ed0a67 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 @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -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/send_index_list_data_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/send_index_list_data_directive.py index 36b9a62d..1f532056 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/send_index_list_data_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/send_index_list_data_directive.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/send_token_list_data_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/send_token_list_data_directive.py new file mode 100644 index 00000000..db0f5870 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/send_token_list_data_directive.py @@ -0,0 +1,141 @@ +# 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.directive import Directive + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SendTokenListDataDirective(Directive): + """ + Returned in response to a LoadTokenListData event, containing the requested items and metadata for further interaction. + + + :param correlation_token: The correlation token supplied in the LoadTokenListData event. This parameter is mandatory if the skill is responding to a LoadTokenListData request, the skill response will be rejected if the expected correlationToken is not specified. + :type correlation_token: (optional) str + :param list_id: The identifier of the list whose items are contained in this response. + :type list_id: (optional) str + :param page_token: Opaque token for the array of items which are contained in this response. Ignored by the system if correlationToken is specified, but considered less cognitive overhead to have the developer always include & assists platform debugging. + :type page_token: (optional) str + :param next_page_token: Opaque token to retrieve the next page of list items data. Absence of this property indicates that the last item in the list has been reached in the scroll direction. + :type next_page_token: (optional) str + :param items: Array of objects to be added to the device cache. + :type items: (optional) list[object] + + """ + deserialized_types = { + 'object_type': 'str', + 'correlation_token': 'str', + 'list_id': 'str', + 'page_token': 'str', + 'next_page_token': 'str', + 'items': 'list[object]' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'correlation_token': 'correlationToken', + 'list_id': 'listId', + 'page_token': 'pageToken', + 'next_page_token': 'nextPageToken', + 'items': 'items' + } # type: Dict + supports_multiple_types = False + + def __init__(self, correlation_token=None, list_id=None, page_token=None, next_page_token=None, items=None): + # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[List[object]]) -> None + """Returned in response to a LoadTokenListData event, containing the requested items and metadata for further interaction. + + :param correlation_token: The correlation token supplied in the LoadTokenListData event. This parameter is mandatory if the skill is responding to a LoadTokenListData request, the skill response will be rejected if the expected correlationToken is not specified. + :type correlation_token: (optional) str + :param list_id: The identifier of the list whose items are contained in this response. + :type list_id: (optional) str + :param page_token: Opaque token for the array of items which are contained in this response. Ignored by the system if correlationToken is specified, but considered less cognitive overhead to have the developer always include & assists platform debugging. + :type page_token: (optional) str + :param next_page_token: Opaque token to retrieve the next page of list items data. Absence of this property indicates that the last item in the list has been reached in the scroll direction. + :type next_page_token: (optional) str + :param items: Array of objects to be added to the device cache. + :type items: (optional) list[object] + """ + self.__discriminator_value = "Alexa.Presentation.APL.SendTokenListData" # type: str + + self.object_type = self.__discriminator_value + super(SendTokenListDataDirective, self).__init__(object_type=self.__discriminator_value) + self.correlation_token = correlation_token + self.list_id = list_id + self.page_token = page_token + self.next_page_token = next_page_token + self.items = items + + 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, SendTokenListDataDirective): + 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/sequential_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/sequential_command.py index a1a1b20e..80a09278 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 @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command + from ask_sdk_model.interfaces.alexa.presentation.apl.command import Command as Command_bc5ff832 class SequentialCommand(Command): @@ -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]], Optional[List[Command]], Optional[List[Command]], 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 572a898a..b5691d4f 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 @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -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 dd462860..05c546ce 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 @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.position import Position + from ask_sdk_model.interfaces.alexa.presentation.apl.position import Position as Position_8c9d1e98 class SetPageCommand(Command): @@ -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], 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 1a5df676..fd3072a2 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 @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.component_state import ComponentState + from ask_sdk_model.interfaces.alexa.presentation.apl.component_state import ComponentState as ComponentState_c92e50c9 class SetStateCommand(Command): @@ -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], 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 5317454b..29f2f515 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 @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -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/show_overlay_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/show_overlay_command.py new file mode 100644 index 00000000..9991c6c7 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/show_overlay_command.py @@ -0,0 +1,164 @@ +# 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 ShowOverlayCommand(Command): + """ + ShowOverlay Command used by television shopping skill. + + + :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 overlay_layout_id: The id of overlay Layout. + :type overlay_layout_id: (optional) str + :param underlying_layout_id: The id of underlying Layout. + :type underlying_layout_id: (optional) str + :param overlay_width: The overlay width. + :type overlay_width: (optional) str + :param duration: The duration of ShowOverlay Command. + :type duration: (optional) int + + """ + deserialized_types = { + 'object_type': 'str', + 'delay': 'int', + 'description': 'str', + 'screen_lock': 'bool', + 'sequencer': 'str', + 'when': 'bool', + 'overlay_layout_id': 'str', + 'underlying_layout_id': 'str', + 'overlay_width': 'str', + 'duration': 'int' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'delay': 'delay', + 'description': 'description', + 'screen_lock': 'screenLock', + 'sequencer': 'sequencer', + 'when': 'when', + 'overlay_layout_id': 'overlayLayoutId', + 'underlying_layout_id': 'underlyingLayoutId', + 'overlay_width': 'overlayWidth', + 'duration': 'duration' + } # type: Dict + supports_multiple_types = False + + def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, overlay_layout_id=None, underlying_layout_id=None, overlay_width=None, duration=None): + # type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[str], Optional[str], Optional[str], Optional[int]) -> None + """ShowOverlay Command used by television shopping skill. + + :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 overlay_layout_id: The id of overlay Layout. + :type overlay_layout_id: (optional) str + :param underlying_layout_id: The id of underlying Layout. + :type underlying_layout_id: (optional) str + :param overlay_width: The overlay width. + :type overlay_width: (optional) str + :param duration: The duration of ShowOverlay Command. + :type duration: (optional) int + """ + self.__discriminator_value = "ShowOverlay" # type: str + + self.object_type = self.__discriminator_value + super(ShowOverlayCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when) + self.overlay_layout_id = overlay_layout_id + self.underlying_layout_id = underlying_layout_id + self.overlay_width = overlay_width + self.duration = duration + + 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, ShowOverlayCommand): + 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/skew_transform_property.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/skew_transform_property.py index cf5bc4c1..237e9ecc 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/skew_transform_property.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/skew_transform_property.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime 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 56e7fd32..ccb56b3b 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 @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.highlight_mode import HighlightMode - from ask_sdk_model.interfaces.alexa.presentation.apl.align import Align + from ask_sdk_model.interfaces.alexa.presentation.apl.align import Align as Align_70ae0466 + from ask_sdk_model.interfaces.alexa.presentation.apl.highlight_mode import HighlightMode as HighlightMode_9965984d class SpeakItemCommand(Command): @@ -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], Optional[str], Optional[HighlightMode], 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 8ca7266f..4c664626 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 @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.align import Align + from ask_sdk_model.interfaces.alexa.presentation.apl.align import Align as Align_70ae0466 class SpeakListCommand(Command): @@ -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], 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 diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/transform_property.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/transform_property.py index 5d81ff02..3c0575ff 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/transform_property.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/transform_property.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/update_index_list_data_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/update_index_list_data_directive.py index 89ef528d..f6188bc9 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/update_index_list_data_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/update_index_list_data_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.apl.listoperations.operation import Operation + from ask_sdk_model.interfaces.alexa.presentation.apl.listoperations.operation import Operation as Operation_37040fb2 class UpdateIndexListDataDirective(Directive): @@ -60,7 +60,7 @@ class UpdateIndexListDataDirective(Directive): supports_multiple_types = False def __init__(self, token=None, list_id=None, list_version=None, operations=None): - # type: (Optional[str], Optional[str], Optional[int], Optional[List[Operation]]) -> None + # type: (Optional[str], Optional[str], Optional[int], Optional[List[Operation_37040fb2]]) -> None """Updates the content of an dynamicIndexList datasource which has been previously communicated to an Alexa device. :param token: The unique identifier for the presentation containing the dynamicIndexList. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/user_event.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/user_event.py index 1c39c722..37b97952 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/user_event.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/user_event.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/video_source.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/video_source.py index c3c27cc1..2b4ef647 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/video_source.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl/video_source.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl_presentation_state_context.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl_presentation_state_context.py new file mode 100644 index 00000000..c50f8f81 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apl_presentation_state_context.py @@ -0,0 +1,112 @@ +# 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.presentation_state_context import PresentationStateContext + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.presentation.apl.rendered_document_state import RenderedDocumentState as RenderedDocumentState_4fad8b14 + + +class AplPresentationStateContext(PresentationStateContext): + """ + + :param context: + :type context: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.rendered_document_state.RenderedDocumentState + + """ + deserialized_types = { + 'object_type': 'str', + 'context': 'ask_sdk_model.interfaces.alexa.presentation.apl.rendered_document_state.RenderedDocumentState' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'context': 'context' + } # type: Dict + supports_multiple_types = False + + def __init__(self, context=None): + # type: (Optional[RenderedDocumentState_4fad8b14]) -> None + """ + + :param context: + :type context: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.rendered_document_state.RenderedDocumentState + """ + self.__discriminator_value = "Alexa.Presentation.APL" # type: str + + self.object_type = self.__discriminator_value + super(AplPresentationStateContext, self).__init__(object_type=self.__discriminator_value) + self.context = context + + 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, AplPresentationStateContext): + 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/apla/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/__init__.py index 31fa0d61..e663c267 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/__init__.py @@ -14,4 +14,14 @@ # from __future__ import absolute_import +from .audio_source_runtime_error import AudioSourceRuntimeError +from .document_runtime_error import DocumentRuntimeError +from .render_error_reason import RenderErrorReason +from .render_runtime_error import RenderRuntimeError +from .link_runtime_error import LinkRuntimeError +from .audio_source_error_reason import AudioSourceErrorReason +from .link_error_reason import LinkErrorReason +from .document_error_reason import DocumentErrorReason +from .runtime_error_event import RuntimeErrorEvent from .render_document_directive import RenderDocumentDirective +from .runtime_error import RuntimeError diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/audio_source_error_reason.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/audio_source_error_reason.py new file mode 100644 index 00000000..1de37301 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/audio_source_error_reason.py @@ -0,0 +1,71 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class AudioSourceErrorReason(Enum): + """ + The reason for the failure. + + + + Allowed enum values: [UNKNOWN_ERROR, INTERNAL_SERVER_ERROR, NOT_FOUND_ERROR, SSL_HANDSHAKE_ERROR, TIMEOUT_ERROR, INVALID_URI_ERROR, HTTPS_ERROR] + """ + UNKNOWN_ERROR = "UNKNOWN_ERROR" + INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR" + NOT_FOUND_ERROR = "NOT_FOUND_ERROR" + SSL_HANDSHAKE_ERROR = "SSL_HANDSHAKE_ERROR" + TIMEOUT_ERROR = "TIMEOUT_ERROR" + INVALID_URI_ERROR = "INVALID_URI_ERROR" + HTTPS_ERROR = "HTTPS_ERROR" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, AudioSourceErrorReason): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> 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/apla/audio_source_runtime_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/audio_source_runtime_error.py new file mode 100644 index 00000000..f9bc8d11 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/audio_source_runtime_error.py @@ -0,0 +1,120 @@ +# 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.apla.runtime_error import RuntimeError + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.presentation.apla.audio_source_error_reason import AudioSourceErrorReason as AudioSourceErrorReason_41107d98 + + +class AudioSourceRuntimeError(RuntimeError): + """ + This error type occurs when the cloud fails to retrieve an audio file from a remote source, such as one specified from within an Audio component. + + + :param message: A human-readable description of the error. + :type message: (optional) str + :param reason: + :type reason: (optional) ask_sdk_model.interfaces.alexa.presentation.apla.audio_source_error_reason.AudioSourceErrorReason + + """ + deserialized_types = { + 'object_type': 'str', + 'message': 'str', + 'reason': 'ask_sdk_model.interfaces.alexa.presentation.apla.audio_source_error_reason.AudioSourceErrorReason' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'message': 'message', + 'reason': 'reason' + } # type: Dict + supports_multiple_types = False + + def __init__(self, message=None, reason=None): + # type: (Optional[str], Optional[AudioSourceErrorReason_41107d98]) -> None + """This error type occurs when the cloud fails to retrieve an audio file from a remote source, such as one specified from within an Audio component. + + :param message: A human-readable description of the error. + :type message: (optional) str + :param reason: + :type reason: (optional) ask_sdk_model.interfaces.alexa.presentation.apla.audio_source_error_reason.AudioSourceErrorReason + """ + self.__discriminator_value = "AUDIO_SOURCE_ERROR" # type: str + + self.object_type = self.__discriminator_value + super(AudioSourceRuntimeError, self).__init__(object_type=self.__discriminator_value, message=message) + self.reason = reason + + 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, AudioSourceRuntimeError): + 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/apla/document_error_reason.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/document_error_reason.py new file mode 100644 index 00000000..43e4925d --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/document_error_reason.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class DocumentErrorReason(Enum): + """ + The reason for the failure. + + + + Allowed enum values: [UNKNOWN_ERROR, INTERNAL_SERVER_ERROR] + """ + UNKNOWN_ERROR = "UNKNOWN_ERROR" + INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DocumentErrorReason): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> 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/apla/document_runtime_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/document_runtime_error.py new file mode 100644 index 00000000..1cd22c9e --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/document_runtime_error.py @@ -0,0 +1,120 @@ +# 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.apla.runtime_error import RuntimeError + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.presentation.apla.document_error_reason import DocumentErrorReason as DocumentErrorReason_9817fdd + + +class DocumentRuntimeError(RuntimeError): + """ + This error type occurs when the cloud fails to render due to an incorrect or malformed document or data sources. + + + :param message: A human-readable description of the error. + :type message: (optional) str + :param reason: + :type reason: (optional) ask_sdk_model.interfaces.alexa.presentation.apla.document_error_reason.DocumentErrorReason + + """ + deserialized_types = { + 'object_type': 'str', + 'message': 'str', + 'reason': 'ask_sdk_model.interfaces.alexa.presentation.apla.document_error_reason.DocumentErrorReason' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'message': 'message', + 'reason': 'reason' + } # type: Dict + supports_multiple_types = False + + def __init__(self, message=None, reason=None): + # type: (Optional[str], Optional[DocumentErrorReason_9817fdd]) -> None + """This error type occurs when the cloud fails to render due to an incorrect or malformed document or data sources. + + :param message: A human-readable description of the error. + :type message: (optional) str + :param reason: + :type reason: (optional) ask_sdk_model.interfaces.alexa.presentation.apla.document_error_reason.DocumentErrorReason + """ + self.__discriminator_value = "DOCUMENT_ERROR" # type: str + + self.object_type = self.__discriminator_value + super(DocumentRuntimeError, self).__init__(object_type=self.__discriminator_value, message=message) + self.reason = reason + + 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, DocumentRuntimeError): + 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/apla/link_error_reason.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/link_error_reason.py new file mode 100644 index 00000000..fab9d37a --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/link_error_reason.py @@ -0,0 +1,67 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class LinkErrorReason(Enum): + """ + The reason for the failure. + + + + Allowed enum values: [UNKNOWN_ERROR, INTERNAL_SERVER_ERROR, NOT_FOUND_ERROR] + """ + UNKNOWN_ERROR = "UNKNOWN_ERROR" + INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR" + NOT_FOUND_ERROR = "NOT_FOUND_ERROR" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, LinkErrorReason): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> 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/apla/link_runtime_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/link_runtime_error.py new file mode 100644 index 00000000..e292bb6c --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/link_runtime_error.py @@ -0,0 +1,120 @@ +# 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.apla.runtime_error import RuntimeError + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.presentation.apla.link_error_reason import LinkErrorReason as LinkErrorReason_574c7c9f + + +class LinkRuntimeError(RuntimeError): + """ + This error type occurs when the cloud fails to execute a Link typed document. + + + :param message: A human-readable description of the error. + :type message: (optional) str + :param reason: + :type reason: (optional) ask_sdk_model.interfaces.alexa.presentation.apla.link_error_reason.LinkErrorReason + + """ + deserialized_types = { + 'object_type': 'str', + 'message': 'str', + 'reason': 'ask_sdk_model.interfaces.alexa.presentation.apla.link_error_reason.LinkErrorReason' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'message': 'message', + 'reason': 'reason' + } # type: Dict + supports_multiple_types = False + + def __init__(self, message=None, reason=None): + # type: (Optional[str], Optional[LinkErrorReason_574c7c9f]) -> None + """This error type occurs when the cloud fails to execute a Link typed document. + + :param message: A human-readable description of the error. + :type message: (optional) str + :param reason: + :type reason: (optional) ask_sdk_model.interfaces.alexa.presentation.apla.link_error_reason.LinkErrorReason + """ + self.__discriminator_value = "LINK_ERROR" # type: str + + self.object_type = self.__discriminator_value + super(LinkRuntimeError, self).__init__(object_type=self.__discriminator_value, message=message) + self.reason = reason + + 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, LinkRuntimeError): + 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/apla/render_document_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/render_document_directive.py index f07cc5dd..71042e91 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/render_document_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/render_document_directive.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/render_error_reason.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/render_error_reason.py new file mode 100644 index 00000000..6d04e063 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/render_error_reason.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class RenderErrorReason(Enum): + """ + The reason for the failure. + + + + Allowed enum values: [UNKNOWN_ERROR, INTERNAL_SERVER_ERROR] + """ + UNKNOWN_ERROR = "UNKNOWN_ERROR" + INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, RenderErrorReason): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> 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/apla/render_runtime_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/render_runtime_error.py new file mode 100644 index 00000000..e736dcfe --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/render_runtime_error.py @@ -0,0 +1,120 @@ +# 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.apla.runtime_error import RuntimeError + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.presentation.apla.render_error_reason import RenderErrorReason as RenderErrorReason_5e83f267 + + +class RenderRuntimeError(RuntimeError): + """ + This error type occurs when the the cloud based audio mixing service fails to render the audio due to service or user failure. + + + :param message: A human-readable description of the error. + :type message: (optional) str + :param reason: + :type reason: (optional) ask_sdk_model.interfaces.alexa.presentation.apla.render_error_reason.RenderErrorReason + + """ + deserialized_types = { + 'object_type': 'str', + 'message': 'str', + 'reason': 'ask_sdk_model.interfaces.alexa.presentation.apla.render_error_reason.RenderErrorReason' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'message': 'message', + 'reason': 'reason' + } # type: Dict + supports_multiple_types = False + + def __init__(self, message=None, reason=None): + # type: (Optional[str], Optional[RenderErrorReason_5e83f267]) -> None + """This error type occurs when the the cloud based audio mixing service fails to render the audio due to service or user failure. + + :param message: A human-readable description of the error. + :type message: (optional) str + :param reason: + :type reason: (optional) ask_sdk_model.interfaces.alexa.presentation.apla.render_error_reason.RenderErrorReason + """ + self.__discriminator_value = "RENDER_ERROR" # type: str + + self.object_type = self.__discriminator_value + super(RenderRuntimeError, self).__init__(object_type=self.__discriminator_value, message=message) + self.reason = reason + + 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, RenderRuntimeError): + 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/apla/runtime_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/runtime_error.py new file mode 100644 index 00000000..b81dcf3d --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/runtime_error.py @@ -0,0 +1,148 @@ +# 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 abc import ABCMeta, abstractmethod + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class RuntimeError(object): + """ + A description of an error in APLA functionality. + + + :param object_type: Defines the error type and dictates which properties must/can be included. + :type object_type: (optional) str + :param message: A human-readable description of the error. + :type message: (optional) str + + .. note:: + + This is an abstract class. Use the following mapping, to figure out + the model class to be instantiated, that sets ``type`` variable. + + | AUDIO_SOURCE_ERROR: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apla.audio_source_runtime_error.AudioSourceRuntimeError`, + | + | RENDER_ERROR: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apla.render_runtime_error.RenderRuntimeError`, + | + | DOCUMENT_ERROR: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apla.document_runtime_error.DocumentRuntimeError`, + | + | LINK_ERROR: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apla.link_runtime_error.LinkRuntimeError` + + """ + deserialized_types = { + 'object_type': 'str', + 'message': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'message': 'message' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'AUDIO_SOURCE_ERROR': 'ask_sdk_model.interfaces.alexa.presentation.apla.audio_source_runtime_error.AudioSourceRuntimeError', + 'RENDER_ERROR': 'ask_sdk_model.interfaces.alexa.presentation.apla.render_runtime_error.RenderRuntimeError', + 'DOCUMENT_ERROR': 'ask_sdk_model.interfaces.alexa.presentation.apla.document_runtime_error.DocumentRuntimeError', + 'LINK_ERROR': 'ask_sdk_model.interfaces.alexa.presentation.apla.link_runtime_error.LinkRuntimeError' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None, message=None): + # type: (Optional[str], Optional[str]) -> None + """A description of an error in APLA functionality. + + :param object_type: Defines the error type and dictates which properties must/can be included. + :type object_type: (optional) str + :param message: A human-readable description of the error. + :type message: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.message = message + + @classmethod + def get_real_child_model(cls, data): + # type: (Dict[str, str]) -> Optional[str] + """Returns the real base class specified by the discriminator""" + discriminator_value = data[cls.json_discriminator_key] + return cls.discriminator_value_class_map.get(discriminator_value) + + 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, RuntimeError): + 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/apla/runtime_error_event.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/runtime_error_event.py new file mode 100644 index 00000000..12a3cd35 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/apla/runtime_error_event.py @@ -0,0 +1,139 @@ +# 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.request import Request + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.presentation.apla.runtime_error import RuntimeError as RuntimeError_68904362 + + +class RuntimeErrorEvent(Request): + """ + Notifies the skill of any errors in APLA functionality. + + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param token: The unique identifier of the presentation in which the error occurred. + :type token: (optional) str + :param errors: An array of errors encountered while running the APLA presentation. + :type errors: (optional) list[ask_sdk_model.interfaces.alexa.presentation.apla.runtime_error.RuntimeError] + + """ + deserialized_types = { + 'object_type': 'str', + 'request_id': 'str', + 'timestamp': 'datetime', + 'locale': 'str', + 'token': 'str', + 'errors': 'list[ask_sdk_model.interfaces.alexa.presentation.apla.runtime_error.RuntimeError]' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'request_id': 'requestId', + 'timestamp': 'timestamp', + 'locale': 'locale', + 'token': 'token', + 'errors': 'errors' + } # type: Dict + supports_multiple_types = False + + def __init__(self, request_id=None, timestamp=None, locale=None, token=None, errors=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[List[RuntimeError_68904362]]) -> None + """Notifies the skill of any errors in APLA functionality. + + :param request_id: Represents the unique identifier for the specific request. + :type request_id: (optional) str + :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. + :type timestamp: (optional) datetime + :param locale: A string indicating the user’s locale. For example: en-US. This value is only provided with certain request types. + :type locale: (optional) str + :param token: The unique identifier of the presentation in which the error occurred. + :type token: (optional) str + :param errors: An array of errors encountered while running the APLA presentation. + :type errors: (optional) list[ask_sdk_model.interfaces.alexa.presentation.apla.runtime_error.RuntimeError] + """ + self.__discriminator_value = "Alexa.Presentation.APLA.RuntimeError" # type: str + + self.object_type = self.__discriminator_value + super(RuntimeErrorEvent, self).__init__(object_type=self.__discriminator_value, request_id=request_id, timestamp=timestamp, locale=locale) + self.token = token + self.errors = errors + + 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, RuntimeErrorEvent): + 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/aplt/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/__init__.py index 6031446e..47b9f848 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/__init__.py @@ -14,19 +14,19 @@ # from __future__ import absolute_import +from .runtime import Runtime +from .set_page_command import SetPageCommand from .position import Position +from .command import Command +from .send_event_command import SendEventCommand +from .sequential_command import SequentialCommand from .idle_command import IdleCommand -from .user_event import UserEvent -from .render_document_directive import RenderDocumentDirective +from .alexa_presentation_aplt_interface import AlexaPresentationApltInterface from .parallel_command import ParallelCommand -from .set_value_command import SetValueCommand -from .scroll_command import ScrollCommand from .auto_page_command import AutoPageCommand -from .target_profile import TargetProfile -from .sequential_command import SequentialCommand -from .runtime import Runtime +from .scroll_command import ScrollCommand +from .render_document_directive import RenderDocumentDirective +from .set_value_command import SetValueCommand from .execute_commands_directive import ExecuteCommandsDirective -from .command import Command -from .set_page_command import SetPageCommand -from .alexa_presentation_aplt_interface import AlexaPresentationApltInterface -from .send_event_command import SendEventCommand +from .target_profile import TargetProfile +from .user_event import UserEvent diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/alexa_presentation_aplt_interface.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/alexa_presentation_aplt_interface.py index 88a6ecce..3ad6ec9a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/alexa_presentation_aplt_interface.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/alexa_presentation_aplt_interface.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.aplt.runtime import Runtime + from ask_sdk_model.interfaces.alexa.presentation.aplt.runtime import Runtime as Runtime_db130a90 class AlexaPresentationApltInterface(object): @@ -43,7 +43,7 @@ class AlexaPresentationApltInterface(object): supports_multiple_types = False def __init__(self, runtime=None): - # type: (Optional[Runtime]) -> None + # type: (Optional[Runtime_db130a90]) -> None """ :param runtime: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/auto_page_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/auto_page_command.py index b8e82a2c..43cfc679 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/auto_page_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/auto_page_command.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/command.py index 96d388e1..15ff265a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/command.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/execute_commands_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/execute_commands_directive.py index 391816d5..d874cf64 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/execute_commands_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/execute_commands_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.aplt.command import Command + from ask_sdk_model.interfaces.alexa.presentation.aplt.command import Command as Command_bcba0676 class ExecuteCommandsDirective(Directive): @@ -52,7 +52,7 @@ class ExecuteCommandsDirective(Directive): supports_multiple_types = False def __init__(self, commands=None, token=None): - # type: (Optional[List[Command]], Optional[str]) -> None + # type: (Optional[List[Command_bcba0676]], Optional[str]) -> None """Alexa.Presentation.APLT.ExecuteCommands directive used to send APL-T commands to a device. :param commands: List of Command instances diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/idle_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/idle_command.py index 9a213044..0df03033 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/idle_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/idle_command.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/parallel_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/parallel_command.py index 200eb8c3..e2846b23 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/parallel_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/parallel_command.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.aplt.command import Command + from ask_sdk_model.interfaces.alexa.presentation.aplt.command import Command as Command_bcba0676 class ParallelCommand(Command): @@ -64,7 +64,7 @@ class ParallelCommand(Command): supports_multiple_types = False def __init__(self, delay=None, description=None, screen_lock=None, when=None, commands=None): - # type: (Optional[int], Optional[str], Optional[bool], Union[bool, str, None], Optional[List[Command]]) -> None + # type: (Optional[int], Optional[str], Optional[bool], Union[bool, str, None], Optional[List[Command_bcba0676]]) -> 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. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/position.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/position.py index 829b7160..9b3ee4c8 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/position.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/position.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class Position(Enum): relative = "relative" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Position): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/aplt/render_document_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/render_document_directive.py index 6c8aecdd..1d691630 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/render_document_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/render_document_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.aplt.target_profile import TargetProfile + from ask_sdk_model.interfaces.alexa.presentation.aplt.target_profile import TargetProfile as TargetProfile_1664aad7 class RenderDocumentDirective(Directive): @@ -58,7 +58,7 @@ class RenderDocumentDirective(Directive): supports_multiple_types = False def __init__(self, token=None, target_profile=None, document=None, datasources=None): - # type: (Optional[str], Optional[TargetProfile], Optional[Dict[str, object]], Optional[Dict[str, object]]) -> None + # type: (Optional[str], Optional[TargetProfile_1664aad7], Optional[Dict[str, object]], Optional[Dict[str, object]]) -> None """ :param token: A unique identifier for the presentation. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/runtime.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/runtime.py index 7be90872..fc96b45a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/runtime.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/runtime.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/scroll_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/scroll_command.py index 526b6a61..fb8de29e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/scroll_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/scroll_command.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/send_event_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/send_event_command.py index 78a69c2f..5ad53b1d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/send_event_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/send_event_command.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/sequential_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/sequential_command.py index 6ce7700e..08ee1967 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/sequential_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/sequential_command.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.aplt.command import Command + from ask_sdk_model.interfaces.alexa.presentation.aplt.command import Command as Command_bcba0676 class SequentialCommand(Command): @@ -76,7 +76,7 @@ class SequentialCommand(Command): supports_multiple_types = False def __init__(self, delay=None, description=None, screen_lock=None, when=None, catch=None, commands=None, object_finally=None, repeat_count=None): - # type: (Optional[int], Optional[str], Optional[bool], Union[bool, str, None], Optional[List[Command]], Optional[List[Command]], Optional[List[Command]], Union[int, str, None]) -> None + # type: (Optional[int], Optional[str], Optional[bool], Union[bool, str, None], Optional[List[Command_bcba0676]], Optional[List[Command_bcba0676]], Optional[List[Command_bcba0676]], 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. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/set_page_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/set_page_command.py index 8b8c1854..cd571daa 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/set_page_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/set_page_command.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.aplt.position import Position + from ask_sdk_model.interfaces.alexa.presentation.aplt.position import Position as Position_deacabdc class SetPageCommand(Command): @@ -72,7 +72,7 @@ class SetPageCommand(Command): supports_multiple_types = False def __init__(self, delay=None, description=None, screen_lock=None, when=None, component_id=None, position=None, value=None): - # type: (Optional[int], Optional[str], Optional[bool], Union[bool, str, None], Optional[str], Optional[Position], Union[int, str, None]) -> None + # type: (Optional[int], Optional[str], Optional[bool], Union[bool, str, None], Optional[str], Optional[Position_deacabdc], 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. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/set_value_command.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/set_value_command.py index 63077145..79669b63 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/set_value_command.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/set_value_command.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/target_profile.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/target_profile.py index 7049244b..17d264c2 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/target_profile.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/target_profile.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class TargetProfile(Enum): NONE = "NONE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, TargetProfile): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/aplt/user_event.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/user_event.py index 3b8df31c..c070fa84 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/user_event.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/aplt/user_event.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/__init__.py index d2127378..91ec9559 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/__init__.py @@ -14,16 +14,16 @@ # from __future__ import absolute_import +from .runtime import Runtime from .transformer_type import TransformerType -from .runtime_error import RuntimeError +from .runtime_error_reason import RuntimeErrorReason +from .message_request import MessageRequest +from .alexa_presentation_html_interface import AlexaPresentationHtmlInterface from .handle_message_directive import HandleMessageDirective from .transformer import Transformer -from .runtime import Runtime +from .runtime_error import RuntimeError +from .configuration import Configuration from .start_request_method import StartRequestMethod from .start_request import StartRequest -from .message_request import MessageRequest -from .configuration import Configuration -from .start_directive import StartDirective -from .runtime_error_reason import RuntimeErrorReason from .runtime_error_request import RuntimeErrorRequest -from .alexa_presentation_html_interface import AlexaPresentationHtmlInterface +from .start_directive import StartDirective diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/alexa_presentation_html_interface.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/alexa_presentation_html_interface.py index 6beb991b..be9292f2 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/alexa_presentation_html_interface.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/alexa_presentation_html_interface.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.html.runtime import Runtime + from ask_sdk_model.interfaces.alexa.presentation.html.runtime import Runtime as Runtime_a66c6044 class AlexaPresentationHtmlInterface(object): @@ -43,7 +43,7 @@ class AlexaPresentationHtmlInterface(object): supports_multiple_types = False def __init__(self, runtime=None): - # type: (Optional[Runtime]) -> None + # type: (Optional[Runtime_a66c6044]) -> None """ :param runtime: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/configuration.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/configuration.py index 2c7f07cb..d8a870cc 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/configuration.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/configuration.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/handle_message_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/handle_message_directive.py index 263d2e7b..24dc9270 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/handle_message_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/handle_message_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.html.transformer import Transformer + from ask_sdk_model.interfaces.alexa.presentation.html.transformer import Transformer as Transformer_8371ca46 class HandleMessageDirective(Directive): @@ -52,7 +52,7 @@ class HandleMessageDirective(Directive): supports_multiple_types = False def __init__(self, message=None, transformers=None): - # type: (Optional[object], Optional[List[Transformer]]) -> None + # type: (Optional[object], Optional[List[Transformer_8371ca46]]) -> None """The HandleMessage directive sends a message to a skill's web application that runs on the device browser. :param message: A free-form object containing data to deliver to a skill's HTML application running the device. Maximum size 18 KB. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/message_request.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/message_request.py index b28fe8ed..06695603 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/message_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/message_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime.py index a2dc91cc..bf8956a9 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime_error.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime_error.py index 89dbe79c..66563f3c 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime_error.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime_error.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.html.runtime_error_reason import RuntimeErrorReason + from ask_sdk_model.interfaces.alexa.presentation.html.runtime_error_reason import RuntimeErrorReason as RuntimeErrorReason_431c1642 class RuntimeError(object): @@ -51,7 +51,7 @@ class RuntimeError(object): supports_multiple_types = False def __init__(self, reason=None, message=None, code=None): - # type: (Optional[RuntimeErrorReason], Optional[str], Optional[str]) -> None + # type: (Optional[RuntimeErrorReason_431c1642], Optional[str], Optional[str]) -> None """ :param reason: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime_error_reason.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime_error_reason.py index 73284c54..9a4753ef 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime_error_reason.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime_error_reason.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class RuntimeErrorReason(Enum): APPLICATION_ERROR = "APPLICATION_ERROR" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, RuntimeErrorReason): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/html/runtime_error_request.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime_error_request.py index a3d1bb40..d5ff1923 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime_error_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/runtime_error_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.html.runtime_error import RuntimeError + from ask_sdk_model.interfaces.alexa.presentation.html.runtime_error import RuntimeError as RuntimeError_7feba13b class RuntimeErrorRequest(Request): @@ -60,7 +60,7 @@ class RuntimeErrorRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, error=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[RuntimeError]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[RuntimeError_7feba13b]) -> None """The RuntimeError request occurs when the device software encounters an error with loading a skill's web application. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_directive.py index 2cc8afc3..55e122cf 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_directive.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.html.configuration import Configuration - from ask_sdk_model.interfaces.alexa.presentation.html.start_request import StartRequest - from ask_sdk_model.interfaces.alexa.presentation.html.transformer import Transformer + from ask_sdk_model.interfaces.alexa.presentation.html.configuration import Configuration as Configuration_de3afb80 + from ask_sdk_model.interfaces.alexa.presentation.html.start_request import StartRequest as StartRequest_f0a55ec7 + from ask_sdk_model.interfaces.alexa.presentation.html.transformer import Transformer as Transformer_8371ca46 class StartDirective(Directive): @@ -62,7 +62,7 @@ class StartDirective(Directive): supports_multiple_types = False def __init__(self, data=None, transformers=None, request=None, configuration=None): - # type: (Optional[object], Optional[List[Transformer]], Optional[StartRequest], Optional[Configuration]) -> None + # type: (Optional[object], Optional[List[Transformer_8371ca46]], Optional[StartRequest_f0a55ec7], Optional[Configuration_de3afb80]) -> None """The Start directive provides the data necessary to load an HTML page on the target device. :param data: Optional startup data which will be made available to the runtime for skill startup. Maximum size: 18 KB diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_request.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_request.py index 7db6ab9f..43407adb 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.html.start_request_method import StartRequestMethod + from ask_sdk_model.interfaces.alexa.presentation.html.start_request_method import StartRequestMethod as StartRequestMethod_63e40db0 class StartRequest(object): @@ -51,7 +51,7 @@ class StartRequest(object): supports_multiple_types = False def __init__(self, method=None, uri=None, headers=None): - # type: (Optional[StartRequestMethod], Optional[str], Optional[object]) -> None + # type: (Optional[StartRequestMethod_63e40db0], Optional[str], Optional[object]) -> None """ :param method: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_request_method.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_request_method.py index 5d2c2874..194eca0f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_request_method.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/start_request_method.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -34,7 +34,7 @@ class StartRequestMethod(Enum): GET = "GET" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -50,7 +50,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, StartRequestMethod): return False @@ -58,6 +58,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/html/transformer.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/transformer.py index 36cb865e..bd3b5438 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/transformer.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/transformer.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.alexa.presentation.html.transformer_type import TransformerType + from ask_sdk_model.interfaces.alexa.presentation.html.transformer_type import TransformerType as TransformerType_656f5c23 class Transformer(object): @@ -53,7 +53,7 @@ class Transformer(object): supports_multiple_types = False def __init__(self, transformer=None, input_path=None, output_name=None): - # type: (Optional[TransformerType], Optional[str], Optional[str]) -> None + # type: (Optional[TransformerType_656f5c23], Optional[str], Optional[str]) -> None """Properties for performing text to speech transformations. These are the same properties that [APL transformers](https://developer.amazon.com/docs/alexa-presentation-language/apl-data-source.html#transformer-properties-and-conversion-rules) use. :param transformer: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/transformer_type.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/transformer_type.py index bed589fa..40a911fd 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/transformer_type.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/html/transformer_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class TransformerType(Enum): ssmlToText = "ssmlToText" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, TransformerType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> 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/presentation_state.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/presentation_state.py new file mode 100644 index 00000000..eff42d31 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/presentation_state.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.alexa.presentation.presentation_state_context import PresentationStateContext as PresentationStateContext_45e78c5 + + +class PresentationState(object): + """ + Provides context about presentations at the time of the request. + + + :param contexts: Includes all presentation contexts owned by the skill which were perceptible at the time of the request. + :type contexts: (optional) list[ask_sdk_model.interfaces.alexa.presentation.presentation_state_context.PresentationStateContext] + + """ + deserialized_types = { + 'contexts': 'list[ask_sdk_model.interfaces.alexa.presentation.presentation_state_context.PresentationStateContext]' + } # type: Dict + + attribute_map = { + 'contexts': 'contexts' + } # type: Dict + supports_multiple_types = False + + def __init__(self, contexts=None): + # type: (Optional[List[PresentationStateContext_45e78c5]]) -> None + """Provides context about presentations at the time of the request. + + :param contexts: Includes all presentation contexts owned by the skill which were perceptible at the time of the request. + :type contexts: (optional) list[ask_sdk_model.interfaces.alexa.presentation.presentation_state_context.PresentationStateContext] + """ + self.__discriminator_value = None # type: str + + self.contexts = contexts + + 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, PresentationState): + 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/presentation_state_context.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/presentation_state_context.py new file mode 100644 index 00000000..a0fb5216 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/presentation/presentation_state_context.py @@ -0,0 +1,130 @@ +# 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 abc import ABCMeta, abstractmethod + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class PresentationStateContext(object): + """ + + :param object_type: Polymorphic type field which describes the presentation context object. + :type object_type: (optional) str + + .. note:: + + This is an abstract class. Use the following mapping, to figure out + the model class to be instantiated, that sets ``type`` variable. + + | Alexa.Presentation.APL: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl_presentation_state_context.AplPresentationStateContext` + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'Alexa.Presentation.APL': 'ask_sdk_model.interfaces.alexa.presentation.apl_presentation_state_context.AplPresentationStateContext' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None): + # type: (Optional[str]) -> None + """ + + :param object_type: Polymorphic type field which describes the presentation context object. + :type object_type: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + + @classmethod + def get_real_child_model(cls, data): + # type: (Dict[str, str]) -> Optional[str] + """Returns the real base class specified by the discriminator""" + discriminator_value = data[cls.json_discriminator_key] + return cls.discriminator_value_class_map.get(discriminator_value) + + 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, PresentationStateContext): + 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/smartvision/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/smartvision/__init__.py new file mode 100644 index 00000000..57220ec5 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/smartvision/__init__.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/smartvision/py.typed b/ask-sdk-model/ask_sdk_model/interfaces/alexa/smartvision/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/smartvision/snapshotprovider/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/smartvision/snapshotprovider/__init__.py new file mode 100644 index 00000000..0f1ba5a2 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/smartvision/snapshotprovider/__init__.py @@ -0,0 +1,17 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + +from .get_snapshot_directive import GetSnapshotDirective diff --git a/ask-sdk-model/ask_sdk_model/interfaces/alexa/smartvision/snapshotprovider/get_snapshot_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/alexa/smartvision/snapshotprovider/get_snapshot_directive.py new file mode 100644 index 00000000..b17e5f8c --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/alexa/smartvision/snapshotprovider/get_snapshot_directive.py @@ -0,0 +1,113 @@ +# 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.directive import Directive + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class GetSnapshotDirective(Directive): + """ + This directive is used to request latest snapshot from camera skill on a particular endpoint. + + + :param prefer_on_demand_snapshot: This property defines that an on-demand snapshot is preferred over a cached snapshot from camera skill. + :type prefer_on_demand_snapshot: (optional) bool + + """ + deserialized_types = { + 'object_type': 'str', + 'prefer_on_demand_snapshot': 'bool' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'prefer_on_demand_snapshot': 'preferOnDemandSnapshot' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prefer_on_demand_snapshot=None): + # type: (Optional[bool]) -> None + """This directive is used to request latest snapshot from camera skill on a particular endpoint. + + :param prefer_on_demand_snapshot: This property defines that an on-demand snapshot is preferred over a cached snapshot from camera skill. + :type prefer_on_demand_snapshot: (optional) bool + """ + self.__discriminator_value = "Alexa.SmartVision.SnapshotProvider.GetSnapshotDirective" # type: str + + self.object_type = self.__discriminator_value + super(GetSnapshotDirective, self).__init__(object_type=self.__discriminator_value) + self.prefer_on_demand_snapshot = prefer_on_demand_snapshot + + 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, GetSnapshotDirective): + 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/smartvision/snapshotprovider/py.typed b/ask-sdk-model/ask_sdk_model/interfaces/alexa/smartvision/snapshotprovider/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/__init__.py index b48336ad..4fa15d0f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/__init__.py @@ -14,13 +14,13 @@ # from __future__ import absolute_import -from .payment_action import PaymentAction +from .provider_attributes import ProviderAttributes from .price import Price from .seller_order_attributes import SellerOrderAttributes -from .base_amazon_pay_entity import BaseAmazonPayEntity from .authorize_attributes import AuthorizeAttributes -from .provider_attributes import ProviderAttributes -from .billing_agreement_attributes import BillingAgreementAttributes from .provider_credit import ProviderCredit +from .payment_action import PaymentAction +from .base_amazon_pay_entity import BaseAmazonPayEntity from .seller_billing_agreement_attributes import SellerBillingAgreementAttributes from .billing_agreement_type import BillingAgreementType +from .billing_agreement_attributes import BillingAgreementAttributes diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/authorize_attributes.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/authorize_attributes.py index 06a803ea..712edb72 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/authorize_attributes.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/authorize_attributes.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.request.price import Price + from ask_sdk_model.interfaces.amazonpay.model.request.price import Price as Price_28baad92 class AuthorizeAttributes(BaseAmazonPayEntity): @@ -68,7 +68,7 @@ class AuthorizeAttributes(BaseAmazonPayEntity): supports_multiple_types = False def __init__(self, authorization_reference_id=None, authorization_amount=None, transaction_timeout=None, seller_authorization_note=None, soft_descriptor=None, version=None): - # type: (Optional[str], Optional[Price], Optional[int], Optional[str], Optional[str], Optional[str]) -> None + # type: (Optional[str], Optional[Price_28baad92], Optional[int], Optional[str], Optional[str], Optional[str]) -> None """This is an object to set the attributes specified in the AuthorizeAttributes table. See the “AuthorizationDetails” section of the Amazon Pay API reference guide for details about this object. :param authorization_reference_id: This is 3P seller's identifier for this authorization transaction. This identifier must be unique for all of your authorization transactions. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/base_amazon_pay_entity.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/base_amazon_pay_entity.py index d23f9b23..0d8dd44e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/base_amazon_pay_entity.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/base_amazon_pay_entity.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/billing_agreement_attributes.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/billing_agreement_attributes.py index 546ebfe1..bff29ec9 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/billing_agreement_attributes.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/billing_agreement_attributes.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.request.seller_billing_agreement_attributes import SellerBillingAgreementAttributes - from ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_type import BillingAgreementType - from ask_sdk_model.interfaces.amazonpay.model.request.price import Price + from ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_type import BillingAgreementType as BillingAgreementType_33b14792 + from ask_sdk_model.interfaces.amazonpay.model.request.seller_billing_agreement_attributes import SellerBillingAgreementAttributes as SellerBillingAgreementAttributes_4f93d175 + from ask_sdk_model.interfaces.amazonpay.model.request.price import Price as Price_28baad92 class BillingAgreementAttributes(BaseAmazonPayEntity): @@ -70,7 +70,7 @@ class BillingAgreementAttributes(BaseAmazonPayEntity): supports_multiple_types = False def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_attributes=None, billing_agreement_type=None, subscription_amount=None, version=None): - # type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributes], Optional[BillingAgreementType], Optional[Price], Optional[str]) -> None + # type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributes_4f93d175], Optional[BillingAgreementType_33b14792], Optional[Price_28baad92], Optional[str]) -> None """The merchant can choose to set the attributes specified in the BillingAgreementAttributes. :param platform_id: Represents the SellerId of the Solution Provider that developed the eCommerce platform. This value is only used by Solution Providers, for whom it is required. It should not be provided by merchants creating their own custom integration. Do not specify the SellerId of the merchant for this request parameter. If you are a merchant, do not enter a PlatformId. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/billing_agreement_type.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/billing_agreement_type.py index 69c89d9a..53922f3e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/billing_agreement_type.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/billing_agreement_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class BillingAgreementType(Enum): MerchantInitiatedTransaction = "MerchantInitiatedTransaction" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, BillingAgreementType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/payment_action.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/payment_action.py index 97948e04..c7e1a07d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/payment_action.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/payment_action.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PaymentAction(Enum): AuthorizeAndCapture = "AuthorizeAndCapture" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PaymentAction): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/price.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/price.py index 007caa25..7ae8a556 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/price.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/price.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/provider_attributes.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/provider_attributes.py index a0470f9b..647e40e6 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/provider_attributes.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/provider_attributes.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.request.provider_credit import ProviderCredit + from ask_sdk_model.interfaces.amazonpay.model.request.provider_credit import ProviderCredit as ProviderCredit_5051c023 class ProviderAttributes(BaseAmazonPayEntity): @@ -56,7 +56,7 @@ class ProviderAttributes(BaseAmazonPayEntity): supports_multiple_types = False def __init__(self, provider_id=None, provider_credit_list=None, version=None): - # type: (Optional[str], Optional[List[ProviderCredit]], Optional[str]) -> None + # type: (Optional[str], Optional[List[ProviderCredit_5051c023]], Optional[str]) -> None """This is required only for Ecommerce provider (Solution provider) use cases. :param provider_id: Solution provider ID. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/provider_credit.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/provider_credit.py index a25f3afa..d02fcb09 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/provider_credit.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/provider_credit.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.request.price import Price + from ask_sdk_model.interfaces.amazonpay.model.request.price import Price as Price_28baad92 class ProviderCredit(BaseAmazonPayEntity): @@ -54,7 +54,7 @@ class ProviderCredit(BaseAmazonPayEntity): supports_multiple_types = False def __init__(self, provider_id=None, credit=None, version=None): - # type: (Optional[str], Optional[Price], Optional[str]) -> None + # type: (Optional[str], Optional[Price_28baad92], Optional[str]) -> None """ :param provider_id: This is required only for Ecommerce provider (Solution provider) use cases. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/seller_billing_agreement_attributes.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/seller_billing_agreement_attributes.py index b86427c8..501e063a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/seller_billing_agreement_attributes.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/seller_billing_agreement_attributes.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/seller_order_attributes.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/seller_order_attributes.py index 6cfa882a..70f75191 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/seller_order_attributes.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/request/seller_order_attributes.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/__init__.py index 847b2e7e..bff9b246 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/__init__.py @@ -14,10 +14,10 @@ # from __future__ import absolute_import -from .price import Price from .state import State -from .authorization_details import AuthorizationDetails from .billing_agreement_details import BillingAgreementDetails -from .authorization_status import AuthorizationStatus +from .authorization_details import AuthorizationDetails +from .price import Price from .release_environment import ReleaseEnvironment +from .authorization_status import AuthorizationStatus from .destination import Destination diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/authorization_details.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/authorization_details.py index 363d72d4..dadb094d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/authorization_details.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/authorization_details.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.response.authorization_status import AuthorizationStatus - from ask_sdk_model.interfaces.amazonpay.model.response.destination import Destination - from ask_sdk_model.interfaces.amazonpay.model.response.price import Price + from ask_sdk_model.interfaces.amazonpay.model.response.price import Price as Price_8b8ddd8a + from ask_sdk_model.interfaces.amazonpay.model.response.destination import Destination as Destination_c290e254 + from ask_sdk_model.interfaces.amazonpay.model.response.authorization_status import AuthorizationStatus as AuthorizationStatus_d0b055af class AuthorizationDetails(AuthorizationDetails): @@ -100,7 +100,7 @@ class AuthorizationDetails(AuthorizationDetails): supports_multiple_types = False def __init__(self, amazon_authorization_id=None, authorization_reference_id=None, seller_authorization_note=None, authorization_amount=None, captured_amount=None, authorization_fee=None, id_list=None, creation_timestamp=None, expiration_timestamp=None, authorization_status=None, soft_decline=None, capture_now=None, soft_descriptor=None, authorization_billing_address=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[Price], Optional[Price], Optional[Price], Optional[List[object]], Optional[datetime], Optional[datetime], Optional[AuthorizationStatus], Optional[bool], Optional[bool], Optional[str], Optional[Destination]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[Price_8b8ddd8a], Optional[Price_8b8ddd8a], Optional[Price_8b8ddd8a], Optional[List[object]], Optional[datetime], Optional[datetime], Optional[AuthorizationStatus_d0b055af], Optional[bool], Optional[bool], Optional[str], Optional[Destination_c290e254]) -> None """This object encapsulates details about an Authorization object including the status, amount captured and fee charged. :param amazon_authorization_id: This is AmazonPay generated identifier for this authorization transaction. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/authorization_status.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/authorization_status.py index df9f2f10..76acc9cc 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/authorization_status.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/authorization_status.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.response.state import State + from ask_sdk_model.interfaces.amazonpay.model.response.state import State as State_76ca6e1a class AuthorizationStatus(AuthorizationStatus): @@ -58,7 +58,7 @@ class AuthorizationStatus(AuthorizationStatus): supports_multiple_types = False def __init__(self, state=None, reason_code=None, reason_description=None, last_update_timestamp=None): - # type: (Optional[State], Optional[str], Optional[str], Optional[datetime]) -> None + # type: (Optional[State_76ca6e1a], Optional[str], Optional[str], Optional[datetime]) -> None """Indicates the current status of an Authorization object, a Capture object, or a Refund object. :param state: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/billing_agreement_details.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/billing_agreement_details.py index 4eb74a0b..bd424cd2 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/billing_agreement_details.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/billing_agreement_details.py @@ -22,12 +22,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_status import BillingAgreementStatusV1 - from ask_sdk_model.interfaces.amazonpay.model.v1.destination import DestinationV1 - from ask_sdk_model.interfaces.amazonpay.model.response.destination import Destination - from ask_sdk_model.interfaces.amazonpay.model.response.release_environment import ReleaseEnvironment + from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_status import BillingAgreementStatus as BillingAgreementStatus_92faa5c4 + from ask_sdk_model.interfaces.amazonpay.model.response.release_environment import ReleaseEnvironment as ReleaseEnvironment_a12fed99 + from ask_sdk_model.interfaces.amazonpay.model.response.destination import Destination as Destination_c290e254 + from ask_sdk_model.interfaces.amazonpay.model.v1.destination import Destination as Destination_1fa740ce class BillingAgreementDetails(BillingAgreementDetails): @@ -73,7 +73,7 @@ class BillingAgreementDetails(BillingAgreementDetails): supports_multiple_types = False def __init__(self, billing_agreement_id=None, creation_timestamp=None, destination=None, checkout_language=None, release_environment=None, billing_agreement_status=None, billing_address=None): - # type: (Optional[str], Optional[datetime], Optional[DestinationV1], Optional[str], Optional[ReleaseEnvironment], Optional[BillingAgreementStatusV1], Optional[Destination]) -> None + # type: (Optional[str], Optional[datetime], Optional[Destination_1fa740ce], Optional[str], Optional[ReleaseEnvironment_a12fed99], Optional[BillingAgreementStatus_92faa5c4], Optional[Destination_c290e254]) -> None """The result attributes from successful SetupAmazonPay call. :param billing_agreement_id: Billing agreement id which can be used for one time and recurring purchases diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/destination.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/destination.py index 2779b3a6..155d98b3 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/destination.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/destination.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/price.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/price.py index 0b105981..8779c94f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/price.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/price.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/release_environment.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/release_environment.py index 0846a14f..7093fcbb 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/release_environment.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/release_environment.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class ReleaseEnvironment(Enum): SANDBOX = "SANDBOX" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ReleaseEnvironment): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/state.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/state.py index 6fcd6acb..f065fae0 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/response/state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class State(Enum): Closed = "Closed" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, State): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/__init__.py index 3021353b..25d4c9fa 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/__init__.py @@ -14,19 +14,19 @@ # from __future__ import absolute_import -from .payment_action import PaymentAction -from .price import Price from .state import State -from .authorization_details import AuthorizationDetails from .billing_agreement_details import BillingAgreementDetails -from .authorization_status import AuthorizationStatus -from .release_environment import ReleaseEnvironment +from .authorization_details import AuthorizationDetails +from .provider_attributes import ProviderAttributes +from .price import Price from .seller_order_attributes import SellerOrderAttributes -from .destination import Destination -from .billing_agreement_status import BillingAgreementStatus +from .release_environment import ReleaseEnvironment from .authorize_attributes import AuthorizeAttributes -from .provider_attributes import ProviderAttributes -from .billing_agreement_attributes import BillingAgreementAttributes from .provider_credit import ProviderCredit +from .payment_action import PaymentAction from .seller_billing_agreement_attributes import SellerBillingAgreementAttributes from .billing_agreement_type import BillingAgreementType +from .billing_agreement_attributes import BillingAgreementAttributes +from .authorization_status import AuthorizationStatus +from .billing_agreement_status import BillingAgreementStatus +from .destination import Destination diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorization_details.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorization_details.py index 02cabf62..88097ac6 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorization_details.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorization_details.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.price import PriceV1 - from ask_sdk_model.interfaces.amazonpay.model.v1.authorization_status import AuthorizationStatusV1 + from ask_sdk_model.interfaces.amazonpay.model.v1.authorization_status import AuthorizationStatus as AuthorizationStatus_c0e77a75 + from ask_sdk_model.interfaces.amazonpay.model.v1.price import Price as Price_4032a304 class AuthorizationDetails(object): @@ -94,7 +94,7 @@ class AuthorizationDetails(object): supports_multiple_types = False def __init__(self, amazon_authorization_id=None, authorization_reference_id=None, seller_authorization_note=None, authorization_amount=None, captured_amount=None, authorization_fee=None, id_list=None, creation_timestamp=None, expiration_timestamp=None, authorization_status=None, soft_decline=None, capture_now=None, soft_descriptor=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[PriceV1], Optional[PriceV1], Optional[PriceV1], Optional[List[object]], Optional[datetime], Optional[datetime], Optional[AuthorizationStatusV1], Optional[bool], Optional[bool], Optional[str]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[Price_4032a304], Optional[Price_4032a304], Optional[Price_4032a304], Optional[List[object]], Optional[datetime], Optional[datetime], Optional[AuthorizationStatus_c0e77a75], Optional[bool], Optional[bool], Optional[str]) -> None """This object encapsulates details about an Authorization object including the status, amount captured and fee charged. :param amazon_authorization_id: This is AmazonPay generated identifier for this authorization transaction. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorization_status.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorization_status.py index 238d44bc..688879d1 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorization_status.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorization_status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.state import StateV1 + from ask_sdk_model.interfaces.amazonpay.model.v1.state import State as State_2b6f3394 class AuthorizationStatus(object): @@ -57,7 +57,7 @@ class AuthorizationStatus(object): supports_multiple_types = False def __init__(self, state=None, reason_code=None, reason_description=None, last_update_timestamp=None): - # type: (Optional[StateV1], Optional[str], Optional[str], Optional[datetime]) -> None + # type: (Optional[State_2b6f3394], Optional[str], Optional[str], Optional[datetime]) -> None """Indicates the current status of an Authorization object, a Capture object, or a Refund object. :param state: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorize_attributes.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorize_attributes.py index 4b4bfabd..452ba80f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorize_attributes.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/authorize_attributes.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.price import PriceV1 + from ask_sdk_model.interfaces.amazonpay.model.v1.price import Price as Price_4032a304 class AuthorizeAttributes(object): @@ -61,7 +61,7 @@ class AuthorizeAttributes(object): supports_multiple_types = False def __init__(self, authorization_reference_id=None, authorization_amount=None, transaction_timeout=None, seller_authorization_note=None, soft_descriptor=None): - # type: (Optional[str], Optional[PriceV1], Optional[int], Optional[str], Optional[str]) -> None + # type: (Optional[str], Optional[Price_4032a304], Optional[int], Optional[str], Optional[str]) -> None """This is an object to set the attributes specified in the AuthorizeAttributes table. See the “AuthorizationDetails” section of the Amazon Pay API reference guide for details about this object. :param authorization_reference_id: This is 3P seller's identifier for this authorization transaction. This identifier must be unique for all of your authorization transactions. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_attributes.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_attributes.py index 09ba1e9d..9a97ea8b 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_attributes.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_attributes.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.price import PriceV1 - from ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes import SellerBillingAgreementAttributesV1 - from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_type import BillingAgreementTypeV1 + from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_type import BillingAgreementType as BillingAgreementType_3026f504 + from ask_sdk_model.interfaces.amazonpay.model.v1.seller_billing_agreement_attributes import SellerBillingAgreementAttributes as SellerBillingAgreementAttributes_80b1c843 + from ask_sdk_model.interfaces.amazonpay.model.v1.price import Price as Price_4032a304 class BillingAgreementAttributes(object): @@ -63,7 +63,7 @@ class BillingAgreementAttributes(object): supports_multiple_types = False def __init__(self, platform_id=None, seller_note=None, seller_billing_agreement_attributes=None, billing_agreement_type=None, subscription_amount=None): - # type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributesV1], Optional[BillingAgreementTypeV1], Optional[PriceV1]) -> None + # type: (Optional[str], Optional[str], Optional[SellerBillingAgreementAttributes_80b1c843], Optional[BillingAgreementType_3026f504], Optional[Price_4032a304]) -> None """The merchant can choose to set the attributes specified in the BillingAgreementAttributes. :param platform_id: Represents the SellerId of the Solution Provider that developed the eCommerce platform. This value is only used by Solution Providers, for whom it is required. It should not be provided by merchants creating their own custom integration. Do not specify the SellerId of the merchant for this request parameter. If you are a merchant, do not enter a PlatformId. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_details.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_details.py index dbb08025..b99cd8e6 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_details.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_details.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_status import BillingAgreementStatusV1 - from ask_sdk_model.interfaces.amazonpay.model.v1.destination import DestinationV1 - from ask_sdk_model.interfaces.amazonpay.model.v1.release_environment import ReleaseEnvironmentV1 + from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_status import BillingAgreementStatus as BillingAgreementStatus_92faa5c4 + from ask_sdk_model.interfaces.amazonpay.model.v1.destination import Destination as Destination_1fa740ce + from ask_sdk_model.interfaces.amazonpay.model.v1.release_environment import ReleaseEnvironment as ReleaseEnvironment_c4558bdf class BillingAgreementDetails(object): @@ -67,7 +67,7 @@ class BillingAgreementDetails(object): supports_multiple_types = False def __init__(self, billing_agreement_id=None, creation_timestamp=None, destination=None, checkout_language=None, release_environment=None, billing_agreement_status=None): - # type: (Optional[str], Optional[datetime], Optional[DestinationV1], Optional[str], Optional[ReleaseEnvironmentV1], Optional[BillingAgreementStatusV1]) -> None + # type: (Optional[str], Optional[datetime], Optional[Destination_1fa740ce], Optional[str], Optional[ReleaseEnvironment_c4558bdf], Optional[BillingAgreementStatus_92faa5c4]) -> None """The result attributes from successful SetupAmazonPay call. :param billing_agreement_id: Billing agreement id which can be used for one time and recurring purchases diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_status.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_status.py index de705c2f..821cbe12 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_status.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -40,7 +40,7 @@ class BillingAgreementStatus(Enum): SUSPENDED = "SUSPENDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -56,7 +56,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, BillingAgreementStatus): return False @@ -64,6 +64,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_type.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_type.py index 69c89d9a..53922f3e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_type.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/billing_agreement_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class BillingAgreementType(Enum): MerchantInitiatedTransaction = "MerchantInitiatedTransaction" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, BillingAgreementType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/destination.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/destination.py index 412b4475..79393485 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/destination.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/destination.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/payment_action.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/payment_action.py index 97948e04..c7e1a07d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/payment_action.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/payment_action.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PaymentAction(Enum): AuthorizeAndCapture = "AuthorizeAndCapture" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PaymentAction): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/price.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/price.py index 90e9ca8c..8038f4ea 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/price.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/price.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/provider_attributes.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/provider_attributes.py index c7e32386..5cbd4a02 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/provider_attributes.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/provider_attributes.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.provider_credit import ProviderCreditV1 + from ask_sdk_model.interfaces.amazonpay.model.v1.provider_credit import ProviderCredit as ProviderCredit_87b52171 class ProviderAttributes(object): @@ -49,7 +49,7 @@ class ProviderAttributes(object): supports_multiple_types = False def __init__(self, provider_id=None, provider_credit_list=None): - # type: (Optional[str], Optional[List[ProviderCreditV1]]) -> None + # type: (Optional[str], Optional[List[ProviderCredit_87b52171]]) -> None """This is required only for Ecommerce provider (Solution provider) use cases. :param provider_id: Solution provider ID. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/provider_credit.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/provider_credit.py index 8130aad3..251d9235 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/provider_credit.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/provider_credit.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.price import PriceV1 + from ask_sdk_model.interfaces.amazonpay.model.v1.price import Price as Price_4032a304 class ProviderCredit(object): @@ -47,7 +47,7 @@ class ProviderCredit(object): supports_multiple_types = False def __init__(self, provider_id=None, credit=None): - # type: (Optional[str], Optional[PriceV1]) -> None + # type: (Optional[str], Optional[Price_4032a304]) -> None """ :param provider_id: This is required only for Ecommerce provider (Solution provider) use cases. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/release_environment.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/release_environment.py index dae34156..f8d4a7cf 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/release_environment.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/release_environment.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class ReleaseEnvironment(Enum): SANDBOX = "SANDBOX" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ReleaseEnvironment): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/seller_billing_agreement_attributes.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/seller_billing_agreement_attributes.py index b043ed54..3a0b5fb7 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/seller_billing_agreement_attributes.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/seller_billing_agreement_attributes.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/seller_order_attributes.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/seller_order_attributes.py index f7f159d1..ec1dc50b 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/seller_order_attributes.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/seller_order_attributes.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/state.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/state.py index cad62557..27f69b58 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/model/v1/state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -40,7 +40,7 @@ class State(Enum): Completed = "Completed" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -56,7 +56,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, State): return False @@ -64,6 +64,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/request/charge_amazon_pay_request.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/request/charge_amazon_pay_request.py index 8adaa529..4cd7ac62 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/request/charge_amazon_pay_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/request/charge_amazon_pay_request.py @@ -22,12 +22,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.request.payment_action import PaymentAction - from ask_sdk_model.interfaces.amazonpay.model.request.seller_order_attributes import SellerOrderAttributes - from ask_sdk_model.interfaces.amazonpay.model.request.authorize_attributes import AuthorizeAttributes - from ask_sdk_model.interfaces.amazonpay.model.request.provider_attributes import ProviderAttributes + from ask_sdk_model.interfaces.amazonpay.model.request.provider_attributes import ProviderAttributes as ProviderAttributes_32296063 + from ask_sdk_model.interfaces.amazonpay.model.request.authorize_attributes import AuthorizeAttributes as AuthorizeAttributes_2defaf71 + from ask_sdk_model.interfaces.amazonpay.model.request.payment_action import PaymentAction as PaymentAction_974ab70f + from ask_sdk_model.interfaces.amazonpay.model.request.seller_order_attributes import SellerOrderAttributes as SellerOrderAttributes_48ed79ae class ChargeAmazonPayRequest(BaseAmazonPayEntity): @@ -75,7 +75,7 @@ class ChargeAmazonPayRequest(BaseAmazonPayEntity): supports_multiple_types = False def __init__(self, version=None, seller_id=None, billing_agreement_id=None, payment_action=None, authorize_attributes=None, seller_order_attributes=None, provider_attributes=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[PaymentAction], Optional[AuthorizeAttributes], Optional[SellerOrderAttributes], Optional[ProviderAttributes]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[PaymentAction_974ab70f], Optional[AuthorizeAttributes_2defaf71], Optional[SellerOrderAttributes_48ed79ae], Optional[ProviderAttributes_32296063]) -> None """Charge Amazon Pay Request Object. :param version: Version of the Amazon Pay Entity. Can be 1 or greater. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/request/setup_amazon_pay_request.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/request/setup_amazon_pay_request.py index 5816c592..d2a1b0b1 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/request/setup_amazon_pay_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/request/setup_amazon_pay_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_attributes import BillingAgreementAttributes + from ask_sdk_model.interfaces.amazonpay.model.request.billing_agreement_attributes import BillingAgreementAttributes as BillingAgreementAttributes_ec1c47b2 class SetupAmazonPayRequest(BaseAmazonPayEntity): @@ -80,7 +80,7 @@ class SetupAmazonPayRequest(BaseAmazonPayEntity): supports_multiple_types = False def __init__(self, version=None, seller_id=None, country_of_establishment=None, ledger_currency=None, checkout_language=None, billing_agreement_attributes=None, need_amazon_shipping_address=False, sandbox_mode=False, sandbox_customer_email_id=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[BillingAgreementAttributes], Optional[bool], Optional[bool], Optional[str]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[BillingAgreementAttributes_ec1c47b2], Optional[bool], Optional[bool], Optional[str]) -> None """Setup Amazon Pay Request Object. :param version: Version of the Amazon Pay Entity. Can be 1 or greater. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/__init__.py index f7ef1d0d..84a66179 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/__init__.py @@ -15,5 +15,5 @@ from __future__ import absolute_import from .charge_amazon_pay_result import ChargeAmazonPayResult -from .setup_amazon_pay_result import SetupAmazonPayResult from .amazon_pay_error_response import AmazonPayErrorResponse +from .setup_amazon_pay_result import SetupAmazonPayResult diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/amazon_pay_error_response.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/amazon_pay_error_response.py index cbca501b..5f272f7f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/amazon_pay_error_response.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/amazon_pay_error_response.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/charge_amazon_pay_result.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/charge_amazon_pay_result.py index daaefd54..0d9762ee 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/charge_amazon_pay_result.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/charge_amazon_pay_result.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.response.authorization_details import AuthorizationDetails + from ask_sdk_model.interfaces.amazonpay.model.response.authorization_details import AuthorizationDetails as AuthorizationDetails_d5ea3d5 class ChargeAmazonPayResult(ChargeAmazonPayResult): @@ -50,7 +50,7 @@ class ChargeAmazonPayResult(ChargeAmazonPayResult): supports_multiple_types = False def __init__(self, amazon_order_reference_id=None, authorization_details=None): - # type: (Optional[str], Optional[AuthorizationDetails]) -> None + # type: (Optional[str], Optional[AuthorizationDetails_d5ea3d5]) -> None """Charge Amazon Pay Result Object. It is sent as part of the response to ChargeAmazonPayRequest. :param amazon_order_reference_id: The order reference identifier. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/setup_amazon_pay_result.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/setup_amazon_pay_result.py index 0e4122ac..a10d9d6e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/setup_amazon_pay_result.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/response/setup_amazon_pay_result.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.response.billing_agreement_details import BillingAgreementDetails + from ask_sdk_model.interfaces.amazonpay.model.response.billing_agreement_details import BillingAgreementDetails as BillingAgreementDetails_623d3b74 class SetupAmazonPayResult(object): @@ -45,7 +45,7 @@ class SetupAmazonPayResult(object): supports_multiple_types = False def __init__(self, billing_agreement_details=None): - # type: (Optional[BillingAgreementDetails]) -> None + # type: (Optional[BillingAgreementDetails_623d3b74]) -> None """Setup Amazon Pay Result Object. It is sent as part of the response to SetupAmazonPayRequest. :param billing_agreement_details: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/__init__.py index 3b791701..d178cf6d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/__init__.py @@ -15,7 +15,7 @@ from __future__ import absolute_import from .charge_amazon_pay_result import ChargeAmazonPayResult -from .setup_amazon_pay_result import SetupAmazonPayResult -from .charge_amazon_pay import ChargeAmazonPay from .amazon_pay_error_response import AmazonPayErrorResponse from .setup_amazon_pay import SetupAmazonPay +from .charge_amazon_pay import ChargeAmazonPay +from .setup_amazon_pay_result import SetupAmazonPayResult diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/amazon_pay_error_response.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/amazon_pay_error_response.py index 625efe9f..3d5b455f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/amazon_pay_error_response.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/amazon_pay_error_response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/charge_amazon_pay.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/charge_amazon_pay.py index 4bc91b58..2f31f819 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/charge_amazon_pay.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/charge_amazon_pay.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.authorize_attributes import AuthorizeAttributesV1 - from ask_sdk_model.interfaces.amazonpay.model.v1.payment_action import PaymentActionV1 - from ask_sdk_model.interfaces.amazonpay.model.v1.seller_order_attributes import SellerOrderAttributesV1 - from ask_sdk_model.interfaces.amazonpay.model.v1.provider_attributes import ProviderAttributesV1 + from ask_sdk_model.interfaces.amazonpay.model.v1.authorize_attributes import AuthorizeAttributes as AuthorizeAttributes_cafc473f + from ask_sdk_model.interfaces.amazonpay.model.v1.payment_action import PaymentAction as PaymentAction_a31213dd + from ask_sdk_model.interfaces.amazonpay.model.v1.seller_order_attributes import SellerOrderAttributes as SellerOrderAttributes_fead92a0 + from ask_sdk_model.interfaces.amazonpay.model.v1.provider_attributes import ProviderAttributes as ProviderAttributes_717593b1 class ChargeAmazonPay(object): @@ -72,7 +72,7 @@ class ChargeAmazonPay(object): supports_multiple_types = False def __init__(self, consent_token=None, seller_id=None, billing_agreement_id=None, payment_action=None, authorize_attributes=None, seller_order_attributes=None, provider_attributes=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[PaymentActionV1], Optional[AuthorizeAttributesV1], Optional[SellerOrderAttributesV1], Optional[ProviderAttributesV1]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[PaymentAction_a31213dd], Optional[AuthorizeAttributes_cafc473f], Optional[SellerOrderAttributes_fead92a0], Optional[ProviderAttributes_717593b1]) -> None """Charge Amazon Pay Request Object :param consent_token: Authorization token that contains the permissions consented to by the user. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/charge_amazon_pay_result.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/charge_amazon_pay_result.py index b686b5fb..0d0ca1f3 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/charge_amazon_pay_result.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/charge_amazon_pay_result.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.authorization_details import AuthorizationDetailsV1 + from ask_sdk_model.interfaces.amazonpay.model.v1.authorization_details import AuthorizationDetails as AuthorizationDetails_cc5faf1b class ChargeAmazonPayResult(object): @@ -49,7 +49,7 @@ class ChargeAmazonPayResult(object): supports_multiple_types = False def __init__(self, amazon_order_reference_id=None, authorization_details=None): - # type: (Optional[str], Optional[AuthorizationDetailsV1]) -> None + # type: (Optional[str], Optional[AuthorizationDetails_cc5faf1b]) -> None """Charge Amazon Pay Result Object. It is sent as part of the reponse to ChargeAmazonPay request. :param amazon_order_reference_id: The order reference identifier. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/setup_amazon_pay.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/setup_amazon_pay.py index c9c1cfa7..ce7f994f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/setup_amazon_pay.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/setup_amazon_pay.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_attributes import BillingAgreementAttributesV1 + from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_attributes import BillingAgreementAttributes as BillingAgreementAttributes_a2cf5a24 class SetupAmazonPay(object): @@ -77,7 +77,7 @@ class SetupAmazonPay(object): supports_multiple_types = False def __init__(self, consent_token=None, seller_id=None, country_of_establishment=None, ledger_currency=None, checkout_language=None, billing_agreement_attributes=None, need_amazon_shipping_address=False, sandbox_mode=False, sandbox_customer_email_id=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[BillingAgreementAttributesV1], Optional[bool], Optional[bool], Optional[str]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[BillingAgreementAttributes_a2cf5a24], Optional[bool], Optional[bool], Optional[str]) -> None """Setup Amazon Pay Request Object :param consent_token: Authorization token that contains the permissions consented to by the user. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/setup_amazon_pay_result.py b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/setup_amazon_pay_result.py index 3fee2899..da6881ff 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/setup_amazon_pay_result.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/amazonpay/v1/setup_amazon_pay_result.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_details import BillingAgreementDetailsV1 + from ask_sdk_model.interfaces.amazonpay.model.v1.billing_agreement_details import BillingAgreementDetails as BillingAgreementDetails_49c156e class SetupAmazonPayResult(object): @@ -45,7 +45,7 @@ class SetupAmazonPayResult(object): supports_multiple_types = False def __init__(self, billing_agreement_details=None): - # type: (Optional[BillingAgreementDetailsV1]) -> None + # type: (Optional[BillingAgreementDetails_49c156e]) -> None """Setup Amazon Pay Result Object. It is sent as part of the reponse to SetupAmazonPay request. :param billing_agreement_details: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/applink/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/applink/__init__.py new file mode 100644 index 00000000..c34ef21f --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/applink/__init__.py @@ -0,0 +1,21 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + +from .app_link_state import AppLinkState +from .catalog_types import CatalogTypes +from .app_link_interface import AppLinkInterface +from .direct_launch import DirectLaunch +from .send_to_device import SendToDevice diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_alias.py b/ask-sdk-model/ask_sdk_model/interfaces/applink/app_link_interface.py similarity index 86% rename from ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_alias.py rename to ask-sdk-model/ask_sdk_model/interfaces/applink/app_link_interface.py index fbf6db64..7551e50f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_alias.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/applink/app_link_interface.py @@ -21,36 +21,36 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class HealthAlias(object): +class AppLinkInterface(object): """ - :param name: Name of alias to use when invoking a health skill. - :type name: (optional) str + :param version: + :type version: (optional) str """ deserialized_types = { - 'name': 'str' + 'version': 'str' } # type: Dict attribute_map = { - 'name': 'name' + 'version': 'version' } # type: Dict supports_multiple_types = False - def __init__(self, name=None): + def __init__(self, version=None): # type: (Optional[str]) -> None """ - :param name: Name of alias to use when invoking a health skill. - :type name: (optional) str + :param version: + :type version: (optional) str """ self.__discriminator_value = None # type: str - self.name = name + self.version = version def to_dict(self): # type: () -> Dict[str, object] @@ -95,7 +95,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, HealthAlias): + if not isinstance(other, AppLinkInterface): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/interfaces/applink/app_link_state.py b/ask-sdk-model/ask_sdk_model/interfaces/applink/app_link_state.py new file mode 100644 index 00000000..f8057dd2 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/applink/app_link_state.py @@ -0,0 +1,123 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.applink.send_to_device import SendToDevice as SendToDevice_cd5aa3cd + from ask_sdk_model.interfaces.applink.catalog_types import CatalogTypes as CatalogTypes_132af432 + from ask_sdk_model.interfaces.applink.direct_launch import DirectLaunch as DirectLaunch_66db2518 + + +class AppLinkState(object): + """ + + :param supported_catalog_types: + :type supported_catalog_types: (optional) list[ask_sdk_model.interfaces.applink.catalog_types.CatalogTypes] + :param direct_launch: + :type direct_launch: (optional) ask_sdk_model.interfaces.applink.direct_launch.DirectLaunch + :param send_to_device: + :type send_to_device: (optional) ask_sdk_model.interfaces.applink.send_to_device.SendToDevice + + """ + deserialized_types = { + 'supported_catalog_types': 'list[ask_sdk_model.interfaces.applink.catalog_types.CatalogTypes]', + 'direct_launch': 'ask_sdk_model.interfaces.applink.direct_launch.DirectLaunch', + 'send_to_device': 'ask_sdk_model.interfaces.applink.send_to_device.SendToDevice' + } # type: Dict + + attribute_map = { + 'supported_catalog_types': 'supportedCatalogTypes', + 'direct_launch': 'directLaunch', + 'send_to_device': 'sendToDevice' + } # type: Dict + supports_multiple_types = False + + def __init__(self, supported_catalog_types=None, direct_launch=None, send_to_device=None): + # type: (Optional[List[CatalogTypes_132af432]], Optional[DirectLaunch_66db2518], Optional[SendToDevice_cd5aa3cd]) -> None + """ + + :param supported_catalog_types: + :type supported_catalog_types: (optional) list[ask_sdk_model.interfaces.applink.catalog_types.CatalogTypes] + :param direct_launch: + :type direct_launch: (optional) ask_sdk_model.interfaces.applink.direct_launch.DirectLaunch + :param send_to_device: + :type send_to_device: (optional) ask_sdk_model.interfaces.applink.send_to_device.SendToDevice + """ + self.__discriminator_value = None # type: str + + self.supported_catalog_types = supported_catalog_types + self.direct_launch = direct_launch + self.send_to_device = send_to_device + + 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, AppLinkState): + 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/applink/catalog_types.py b/ask-sdk-model/ask_sdk_model/interfaces/applink/catalog_types.py new file mode 100644 index 00000000..6e8e1b80 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/applink/catalog_types.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class CatalogTypes(Enum): + """ + Accepted catalog types. + + + + Allowed enum values: [IOS_APP_STORE, GOOGLE_PLAY_STORE] + """ + IOS_APP_STORE = "IOS_APP_STORE" + GOOGLE_PLAY_STORE = "GOOGLE_PLAY_STORE" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, CatalogTypes): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/applink/direct_launch.py b/ask-sdk-model/ask_sdk_model/interfaces/applink/direct_launch.py new file mode 100644 index 00000000..6ca6eead --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/applink/direct_launch.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class DirectLaunch(object): + """ + direct launch availability + + + :param ios_app_store: + :type ios_app_store: (optional) object + :param google_play_store: + :type google_play_store: (optional) object + + """ + deserialized_types = { + 'ios_app_store': 'object', + 'google_play_store': 'object' + } # type: Dict + + attribute_map = { + 'ios_app_store': 'IOS_APP_STORE', + 'google_play_store': 'GOOGLE_PLAY_STORE' + } # type: Dict + supports_multiple_types = False + + def __init__(self, ios_app_store=None, google_play_store=None): + # type: (Optional[object], Optional[object]) -> None + """direct launch availability + + :param ios_app_store: + :type ios_app_store: (optional) object + :param google_play_store: + :type google_play_store: (optional) object + """ + self.__discriminator_value = None # type: str + + self.ios_app_store = ios_app_store + self.google_play_store = google_play_store + + 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, DirectLaunch): + 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/applink/py.typed b/ask-sdk-model/ask_sdk_model/interfaces/applink/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/audio_asset_download_url.py b/ask-sdk-model/ask_sdk_model/interfaces/applink/send_to_device.py similarity index 90% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/audio_asset_download_url.py rename to ask-sdk-model/ask_sdk_model/interfaces/applink/send_to_device.py index 22d1ee15..4500c280 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/audio_asset_download_url.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/applink/send_to_device.py @@ -21,13 +21,13 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class AudioAssetDownloadUrl(object): +class SendToDevice(object): """ - S3 presigned download url for downloading the audio file + send to device availability @@ -41,7 +41,7 @@ class AudioAssetDownloadUrl(object): def __init__(self): # type: () -> None - """S3 presigned download url for downloading the audio file + """send to device availability """ self.__discriminator_value = None # type: str @@ -89,7 +89,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, AudioAssetDownloadUrl): + if not isinstance(other, SendToDevice): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/__init__.py index 565e699e..c5ab8609 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/__init__.py @@ -14,24 +14,24 @@ # from __future__ import absolute_import -from .audio_player_interface import AudioPlayerInterface -from .playback_finished_request import PlaybackFinishedRequest +from .current_playback_state import CurrentPlaybackState +from .clear_behavior import ClearBehavior from .stop_directive import StopDirective -from .player_activity import PlayerActivity -from .error import Error -from .clear_queue_directive import ClearQueueDirective from .stream import Stream +from .error_type import ErrorType +from .error import Error +from .audio_item_metadata import AudioItemMetadata +from .playback_finished_request import PlaybackFinishedRequest +from .player_activity import PlayerActivity from .audio_player_state import AudioPlayerState -from .clear_behavior import ClearBehavior -from .playback_failed_request import PlaybackFailedRequest +from .audio_player_interface import AudioPlayerInterface from .playback_stopped_request import PlaybackStoppedRequest -from .current_playback_state import CurrentPlaybackState -from .caption_data import CaptionData -from .play_directive import PlayDirective -from .error_type import ErrorType -from .audio_item import AudioItem from .caption_type import CaptionType -from .audio_item_metadata import AudioItemMetadata +from .audio_item import AudioItem +from .play_directive import PlayDirective +from .caption_data import CaptionData +from .playback_nearly_finished_request import PlaybackNearlyFinishedRequest from .play_behavior import PlayBehavior +from .clear_queue_directive import ClearQueueDirective +from .playback_failed_request import PlaybackFailedRequest from .playback_started_request import PlaybackStartedRequest -from .playback_nearly_finished_request import PlaybackNearlyFinishedRequest diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_item.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_item.py index d3c541db..7524dda4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_item.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_item.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.audioplayer.audio_item_metadata import AudioItemMetadata - from ask_sdk_model.interfaces.audioplayer.stream import Stream + from ask_sdk_model.interfaces.audioplayer.stream import Stream as Stream_ede56f13 + from ask_sdk_model.interfaces.audioplayer.audio_item_metadata import AudioItemMetadata as AudioItemMetadata_6f8cf3c1 class AudioItem(object): @@ -48,7 +48,7 @@ class AudioItem(object): supports_multiple_types = False def __init__(self, stream=None, metadata=None): - # type: (Optional[Stream], Optional[AudioItemMetadata]) -> None + # type: (Optional[Stream_ede56f13], Optional[AudioItemMetadata_6f8cf3c1]) -> None """ :param stream: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_item_metadata.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_item_metadata.py index 98cbdec8..7f05c075 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_item_metadata.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_item_metadata.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.image import Image + from ask_sdk_model.interfaces.display.image import Image as Image_1942d978 class AudioItemMetadata(object): @@ -57,7 +57,7 @@ class AudioItemMetadata(object): supports_multiple_types = False def __init__(self, title=None, subtitle=None, art=None, background_image=None): - # type: (Optional[str], Optional[str], Optional[Image], Optional[Image]) -> None + # type: (Optional[str], Optional[str], Optional[Image_1942d978], Optional[Image_1942d978]) -> None """Encapsulates the metadata about an AudioItem. :param title: An optional title of the audio item. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_player_interface.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_player_interface.py index 282bf77f..478183e4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_player_interface.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_player_interface.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_player_state.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_player_state.py index 677df5f8..41eb29cf 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_player_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/audio_player_state.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.audioplayer.player_activity import PlayerActivity + from ask_sdk_model.interfaces.audioplayer.player_activity import PlayerActivity as PlayerActivity_555ba3ec class AudioPlayerState(object): @@ -51,7 +51,7 @@ class AudioPlayerState(object): supports_multiple_types = False def __init__(self, offset_in_milliseconds=None, token=None, player_activity=None): - # type: (Optional[int], Optional[str], Optional[PlayerActivity]) -> None + # type: (Optional[int], Optional[str], Optional[PlayerActivity_555ba3ec]) -> None """ :param offset_in_milliseconds: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/caption_data.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/caption_data.py index 683d78e6..f6eef769 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/caption_data.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/caption_data.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.audioplayer.caption_type import CaptionType + from ask_sdk_model.interfaces.audioplayer.caption_type import CaptionType as CaptionType_99665840 class CaptionData(object): @@ -47,7 +47,7 @@ class CaptionData(object): supports_multiple_types = False def __init__(self, content=None, object_type=None): - # type: (Optional[str], Optional[CaptionType]) -> None + # type: (Optional[str], Optional[CaptionType_99665840]) -> None """ :param content: This contains the caption text. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/caption_type.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/caption_type.py index 3d674fe7..a5f4851e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/caption_type.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/caption_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -34,7 +34,7 @@ class CaptionType(Enum): WEBVTT = "WEBVTT" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -50,7 +50,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CaptionType): return False @@ -58,6 +58,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/clear_behavior.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/clear_behavior.py index f7e2c8f1..4fc3f3d1 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/clear_behavior.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/clear_behavior.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,7 +35,7 @@ class ClearBehavior(Enum): CLEAR_ENQUEUED = "CLEAR_ENQUEUED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -51,7 +51,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ClearBehavior): return False @@ -59,6 +59,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/clear_queue_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/clear_queue_directive.py index 8262ef39..a600cb41 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/clear_queue_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/clear_queue_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.audioplayer.clear_behavior import ClearBehavior + from ask_sdk_model.interfaces.audioplayer.clear_behavior import ClearBehavior as ClearBehavior_94e71750 class ClearQueueDirective(Directive): @@ -46,7 +46,7 @@ class ClearQueueDirective(Directive): supports_multiple_types = False def __init__(self, clear_behavior=None): - # type: (Optional[ClearBehavior]) -> None + # type: (Optional[ClearBehavior_94e71750]) -> None """ :param clear_behavior: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/current_playback_state.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/current_playback_state.py index e951585e..ab047966 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/current_playback_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/current_playback_state.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.audioplayer.player_activity import PlayerActivity + from ask_sdk_model.interfaces.audioplayer.player_activity import PlayerActivity as PlayerActivity_555ba3ec class CurrentPlaybackState(object): @@ -51,7 +51,7 @@ class CurrentPlaybackState(object): supports_multiple_types = False def __init__(self, offset_in_milliseconds=None, player_activity=None, token=None): - # type: (Optional[int], Optional[PlayerActivity], Optional[str]) -> None + # type: (Optional[int], Optional[PlayerActivity_555ba3ec], Optional[str]) -> None """ :param offset_in_milliseconds: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/error.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/error.py index 905ca0e7..5eb7b322 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/error.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/error.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.audioplayer.error_type import ErrorType + from ask_sdk_model.interfaces.audioplayer.error_type import ErrorType as ErrorType_1ffc9c0 class Error(object): @@ -47,7 +47,7 @@ class Error(object): supports_multiple_types = False def __init__(self, message=None, object_type=None): - # type: (Optional[str], Optional[ErrorType]) -> None + # type: (Optional[str], Optional[ErrorType_1ffc9c0]) -> None """ :param message: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/error_type.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/error_type.py index 0ddb4c1f..720aee9b 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/error_type.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/error_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ErrorType(Enum): MEDIA_ERROR_UNKNOWN = "MEDIA_ERROR_UNKNOWN" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ErrorType): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/play_behavior.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/play_behavior.py index d2a13c1d..0a2fb32a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/play_behavior.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/play_behavior.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class PlayBehavior(Enum): REPLACE_ENQUEUED = "REPLACE_ENQUEUED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PlayBehavior): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/play_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/play_directive.py index 142028da..05397dc0 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/play_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/play_directive.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.audioplayer.audio_item import AudioItem - from ask_sdk_model.interfaces.audioplayer.play_behavior import PlayBehavior + from ask_sdk_model.interfaces.audioplayer.audio_item import AudioItem as AudioItem_70c73972 + from ask_sdk_model.interfaces.audioplayer.play_behavior import PlayBehavior as PlayBehavior_b04a7f2 class PlayDirective(Directive): @@ -51,7 +51,7 @@ class PlayDirective(Directive): supports_multiple_types = False def __init__(self, play_behavior=None, audio_item=None): - # type: (Optional[PlayBehavior], Optional[AudioItem]) -> None + # type: (Optional[PlayBehavior_b04a7f2], Optional[AudioItem_70c73972]) -> None """ :param play_behavior: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_failed_request.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_failed_request.py index 8bd36da7..497407eb 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_failed_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_failed_request.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.audioplayer.error import Error - from ask_sdk_model.interfaces.audioplayer.current_playback_state import CurrentPlaybackState + from ask_sdk_model.interfaces.audioplayer.current_playback_state import CurrentPlaybackState as CurrentPlaybackState_723846fd + from ask_sdk_model.interfaces.audioplayer.error import Error as Error_4b0d507 class PlaybackFailedRequest(Request): @@ -67,7 +67,7 @@ class PlaybackFailedRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, current_playback_state=None, error=None, token=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[CurrentPlaybackState], Optional[Error], Optional[str]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[CurrentPlaybackState_723846fd], Optional[Error_4b0d507], Optional[str]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_finished_request.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_finished_request.py index c42710c7..e2eecc49 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_finished_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_finished_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_nearly_finished_request.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_nearly_finished_request.py index 9873a22b..d4151b74 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_nearly_finished_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_nearly_finished_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_started_request.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_started_request.py index 839491a2..33651c02 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_started_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_started_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_stopped_request.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_stopped_request.py index 27f0cb9d..f1351d7d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_stopped_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/playback_stopped_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/player_activity.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/player_activity.py index 90b8d98b..e315ce30 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/player_activity.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/player_activity.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class PlayerActivity(Enum): STOPPED = "STOPPED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PlayerActivity): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/stop_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/stop_directive.py index 2b13fd57..caa5695c 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/stop_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/stop_directive.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/stream.py b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/stream.py index a19827de..f713feed 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/stream.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/audioplayer/stream.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.audioplayer.caption_data import CaptionData + from ask_sdk_model.interfaces.audioplayer.caption_data import CaptionData as CaptionData_e119f120 class Stream(object): @@ -59,7 +59,7 @@ class Stream(object): supports_multiple_types = False def __init__(self, expected_previous_token=None, token=None, url=None, offset_in_milliseconds=None, caption_data=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[int], Optional[CaptionData]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[int], Optional[CaptionData_e119f120]) -> None """ :param expected_previous_token: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/automotive/automotive_state.py b/ask-sdk-model/ask_sdk_model/interfaces/automotive/automotive_state.py index 228478e1..8d2e50f7 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/automotive/automotive_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/automotive/automotive_state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/__init__.py index e782583f..c565a814 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/__init__.py @@ -14,8 +14,9 @@ # from __future__ import absolute_import +from .on_completion import OnCompletion +from .connections_response import ConnectionsResponse +from .send_request_directive import SendRequestDirective +from .send_response_directive import SendResponseDirective from .connections_request import ConnectionsRequest from .connections_status import ConnectionsStatus -from .send_response_directive import SendResponseDirective -from .send_request_directive import SendRequestDirective -from .connections_response import ConnectionsResponse diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_request.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_request.py index 2baca350..d163fc46 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_response.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_response.py index a9776df7..45ddc0a8 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_response.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_response.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.connections.connections_status import ConnectionsStatus + from ask_sdk_model.interfaces.connections.connections_status import ConnectionsStatus as ConnectionsStatus_145c3ef2 class ConnectionsResponse(Request): @@ -72,7 +72,7 @@ class ConnectionsResponse(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, status=None, name=None, payload=None, token=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[ConnectionsStatus], Optional[str], Optional[Dict[str, object]], Optional[str]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[ConnectionsStatus_145c3ef2], Optional[str], Optional[Dict[str, object]], Optional[str]) -> None """This is the request object that a skill will receive as a result of Connections.SendResponse directive from referrer skill. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_status.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_status.py index e4922f46..15b776dd 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_status.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/connections_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/__init__.py index b44176dc..697069da 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/__init__.py @@ -14,6 +14,6 @@ # from __future__ import absolute_import -from .base_entity import BaseEntity -from .postal_address import PostalAddress from .restaurant import Restaurant +from .postal_address import PostalAddress +from .base_entity import BaseEntity diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/base_entity.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/base_entity.py index 7b077fa1..d8dc63e9 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/base_entity.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/base_entity.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/postal_address.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/postal_address.py index 60ef5e67..ad81f3b7 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/postal_address.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/postal_address.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/restaurant.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/restaurant.py index fb9e1ae4..3a17124b 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/restaurant.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/entities/restaurant.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.connections.entities.postal_address import PostalAddress + from ask_sdk_model.interfaces.connections.entities.postal_address import PostalAddress as PostalAddress_4b374d8b class Restaurant(BaseEntity): @@ -56,7 +56,7 @@ class Restaurant(BaseEntity): supports_multiple_types = False def __init__(self, version=None, name=None, location=None): - # type: (Optional[str], Optional[str], Optional[PostalAddress]) -> None + # type: (Optional[str], Optional[str], Optional[PostalAddress_4b374d8b]) -> None """Restaurant entity :param version: version of the request diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/on_completion.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/on_completion.py new file mode 100644 index 00000000..6e4ec130 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/on_completion.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class OnCompletion(Enum): + """ + This defines the callback mechanism when the task is completed, i.e., whether the requester wants to be resumed after the task is fulfilled or just be notified about errors without being resumed. + + + + Allowed enum values: [RESUME_SESSION, SEND_ERRORS_ONLY] + """ + RESUME_SESSION = "RESUME_SESSION" + SEND_ERRORS_ONLY = "SEND_ERRORS_ONLY" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, OnCompletion): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/__init__.py index 415bd57d..fb85d388 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/__init__.py @@ -14,9 +14,9 @@ # from __future__ import absolute_import -from .print_pdf_request import PrintPDFRequest from .schedule_food_establishment_reservation_request import ScheduleFoodEstablishmentReservationRequest -from .print_image_request import PrintImageRequest -from .schedule_taxi_reservation_request import ScheduleTaxiReservationRequest +from .print_pdf_request import PrintPDFRequest from .base_request import BaseRequest from .print_web_page_request import PrintWebPageRequest +from .print_image_request import PrintImageRequest +from .schedule_taxi_reservation_request import ScheduleTaxiReservationRequest diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/base_request.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/base_request.py index 71fedaf2..5b34bacc 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/base_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/base_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_image_request.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_image_request.py index a5c5f2cb..1e6f90d6 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_image_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_image_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_pdf_request.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_pdf_request.py index 54a6dbdf..272199ec 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_pdf_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_pdf_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_web_page_request.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_web_page_request.py index a06cf9bd..31d6e83e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_web_page_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/print_web_page_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/schedule_food_establishment_reservation_request.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/schedule_food_establishment_reservation_request.py index c09a54af..7dd06eea 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/schedule_food_establishment_reservation_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/schedule_food_establishment_reservation_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.connections.entities.restaurant import Restaurant + from ask_sdk_model.interfaces.connections.entities.restaurant import Restaurant as Restaurant_dd179ebe class ScheduleFoodEstablishmentReservationRequest(BaseRequest): @@ -60,7 +60,7 @@ class ScheduleFoodEstablishmentReservationRequest(BaseRequest): supports_multiple_types = False def __init__(self, version=None, start_time=None, party_size=None, restaurant=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[Restaurant]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[Restaurant_dd179ebe]) -> None """ScheduleFoodEstablishmentReservationRequest for booking restaurant reservation :param version: version of the request diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/schedule_taxi_reservation_request.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/schedule_taxi_reservation_request.py index 70de7d79..c5348108 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/schedule_taxi_reservation_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/requests/schedule_taxi_reservation_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.connections.entities.postal_address import PostalAddress + from ask_sdk_model.interfaces.connections.entities.postal_address import PostalAddress as PostalAddress_4b374d8b class ScheduleTaxiReservationRequest(BaseRequest): @@ -64,7 +64,7 @@ class ScheduleTaxiReservationRequest(BaseRequest): supports_multiple_types = False def __init__(self, version=None, pickup_time=None, party_size=None, pickup_location=None, drop_off_location=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[PostalAddress], Optional[PostalAddress]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[PostalAddress_4b374d8b], Optional[PostalAddress_4b374d8b]) -> None """ScheduleTaxiReservationRequest for booking taxi reservation :param version: version of the request diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/send_request_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/send_request_directive.py index 3667e963..fc3c24f8 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/send_request_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/send_request_directive.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/send_response_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/send_response_directive.py index 89e0e2f5..c73e8a3b 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/send_response_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/send_response_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.connections.connections_status import ConnectionsStatus + from ask_sdk_model.interfaces.connections.connections_status import ConnectionsStatus as ConnectionsStatus_145c3ef2 class SendResponseDirective(Directive): @@ -52,7 +52,7 @@ class SendResponseDirective(Directive): supports_multiple_types = False def __init__(self, status=None, payload=None): - # type: (Optional[ConnectionsStatus], Optional[Dict[str, object]]) -> None + # type: (Optional[ConnectionsStatus_145c3ef2], Optional[Dict[str, object]]) -> None """This is the directive that a skill can send as part of their response to a session based request to return a response to ConnectionsRequest. :param status: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/connections/v1/start_connection_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/connections/v1/start_connection_directive.py index 73e82231..fa26119f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/connections/v1/start_connection_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/connections/v1/start_connection_directive.py @@ -22,8 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime + from ask_sdk_model.interfaces.connections.on_completion import OnCompletion as OnCompletion_8fc1f2aa class StartConnectionDirective(Directive): @@ -33,6 +34,8 @@ class StartConnectionDirective(Directive): :param uri: This defines the name and version of connection that the requester is trying to send. The format of the uri should follow this pattern: connection://connectionName/connectionVersion. Invalid uri will cause an error which will be sent back to the requester. :type uri: (optional) str + :param on_completion: + :type on_completion: (optional) ask_sdk_model.interfaces.connections.on_completion.OnCompletion :param input: This is the input to the connection that the requester is trying to send. It is predefined by the handler of the connection. If the input format is incorrect, an error will be sent to to the requester. :type input: (optional) dict(str, object) :param token: This is an echo back string that requester will receive it when it gets resumed. It is never sent to the handler of the connection. @@ -42,6 +45,7 @@ class StartConnectionDirective(Directive): deserialized_types = { 'object_type': 'str', 'uri': 'str', + 'on_completion': 'ask_sdk_model.interfaces.connections.on_completion.OnCompletion', 'input': 'dict(str, object)', 'token': 'str' } # type: Dict @@ -49,17 +53,20 @@ class StartConnectionDirective(Directive): attribute_map = { 'object_type': 'type', 'uri': 'uri', + 'on_completion': 'onCompletion', 'input': 'input', 'token': 'token' } # type: Dict supports_multiple_types = False - def __init__(self, uri=None, input=None, token=None): - # type: (Optional[str], Optional[Dict[str, object]], Optional[str]) -> None + def __init__(self, uri=None, on_completion=None, input=None, token=None): + # type: (Optional[str], Optional[OnCompletion_8fc1f2aa], Optional[Dict[str, object]], Optional[str]) -> None """This is the directive that a skill can send as part of their response to a session based request to start a connection. A response will be returned to the skill when the connection is handled. :param uri: This defines the name and version of connection that the requester is trying to send. The format of the uri should follow this pattern: connection://connectionName/connectionVersion. Invalid uri will cause an error which will be sent back to the requester. :type uri: (optional) str + :param on_completion: + :type on_completion: (optional) ask_sdk_model.interfaces.connections.on_completion.OnCompletion :param input: This is the input to the connection that the requester is trying to send. It is predefined by the handler of the connection. If the input format is incorrect, an error will be sent to to the requester. :type input: (optional) dict(str, object) :param token: This is an echo back string that requester will receive it when it gets resumed. It is never sent to the handler of the connection. @@ -70,6 +77,7 @@ def __init__(self, uri=None, input=None, token=None): self.object_type = self.__discriminator_value super(StartConnectionDirective, self).__init__(object_type=self.__discriminator_value) self.uri = uri + self.on_completion = on_completion self.input = input self.token = token diff --git a/ask-sdk-model/ask_sdk_model/interfaces/conversations/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/conversations/__init__.py index 06914729..28b811c4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/conversations/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/conversations/__init__.py @@ -14,5 +14,6 @@ # from __future__ import absolute_import +from .reset_context_directive import ResetContextDirective from .api_invocation_request import APIInvocationRequest from .api_request import APIRequest diff --git a/ask-sdk-model/ask_sdk_model/interfaces/conversations/api_invocation_request.py b/ask-sdk-model/ask_sdk_model/interfaces/conversations/api_invocation_request.py index 205996cd..f6b0a0e4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/conversations/api_invocation_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/conversations/api_invocation_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.conversations.api_request import APIRequest + from ask_sdk_model.interfaces.conversations.api_request import APIRequest as APIRequest_cc358b5b class APIInvocationRequest(Request): @@ -58,7 +58,7 @@ class APIInvocationRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, api_request=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[APIRequest]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[APIRequest_cc358b5b]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/conversations/api_request.py b/ask-sdk-model/ask_sdk_model/interfaces/conversations/api_request.py index 794f63f2..d9d82380 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/conversations/api_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/conversations/api_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.slot_value import SlotValue + from ask_sdk_model.slot_value import SlotValue as SlotValue_4725c8c5 class APIRequest(object): @@ -53,7 +53,7 @@ class APIRequest(object): supports_multiple_types = False def __init__(self, name=None, arguments=None, slots=None): - # type: (Optional[str], Optional[Dict[str, object]], Optional[Dict[str, SlotValue]]) -> None + # type: (Optional[str], Optional[Dict[str, object]], Optional[Dict[str, SlotValue_4725c8c5]]) -> None """API request object :param name: API name diff --git a/ask-sdk-model/ask_sdk_model/interfaces/conversations/reset_context_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/conversations/reset_context_directive.py new file mode 100644 index 00000000..4bfafbe6 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/conversations/reset_context_directive.py @@ -0,0 +1,104 @@ +# 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.directive import Directive + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ResetContextDirective(Directive): + """ + + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """ + + """ + self.__discriminator_value = "Conversations.ResetContext" # type: str + + self.object_type = self.__discriminator_value + super(ResetContextDirective, self).__init__(object_type=self.__discriminator_value) + + 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, ResetContextDirective): + 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/custom_interface_controller/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/__init__.py index 7df9e34b..0e4b95bc 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/__init__.py @@ -14,14 +14,14 @@ # from __future__ import absolute_import -from .endpoint import Endpoint from .header import Header +from .send_directive_directive import SendDirectiveDirective +from .event_filter import EventFilter +from .expiration import Expiration from .filter_match_action import FilterMatchAction from .events_received_request import EventsReceivedRequest -from .expired_request import ExpiredRequest -from .start_event_handler_directive import StartEventHandlerDirective from .stop_event_handler_directive import StopEventHandlerDirective -from .send_directive_directive import SendDirectiveDirective -from .expiration import Expiration from .event import Event -from .event_filter import EventFilter +from .start_event_handler_directive import StartEventHandlerDirective +from .endpoint import Endpoint +from .expired_request import ExpiredRequest diff --git a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/endpoint.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/endpoint.py index 91adefb2..391cb099 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/endpoint.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/endpoint.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/event.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/event.py index 7b9f5afb..5aca9f0e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/event.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/event.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.custom_interface_controller.endpoint import Endpoint - from ask_sdk_model.interfaces.custom_interface_controller.header import Header + from ask_sdk_model.interfaces.custom_interface_controller.endpoint import Endpoint as Endpoint_3be30cac + from ask_sdk_model.interfaces.custom_interface_controller.header import Header as Header_57ad56ec class Event(object): @@ -54,7 +54,7 @@ class Event(object): supports_multiple_types = False def __init__(self, header=None, payload=None, endpoint=None): - # type: (Optional[Header], Optional[object], Optional[Endpoint]) -> None + # type: (Optional[Header_57ad56ec], Optional[object], Optional[Endpoint_3be30cac]) -> None """An Event object defining a single event sent by an endpoint :param header: The object that contains the header of the event. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/event_filter.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/event_filter.py index 84e816ee..53c6b438 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/event_filter.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/event_filter.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.custom_interface_controller.filter_match_action import FilterMatchAction + from ask_sdk_model.interfaces.custom_interface_controller.filter_match_action import FilterMatchAction as FilterMatchAction_1d20768a class EventFilter(object): @@ -49,7 +49,7 @@ class EventFilter(object): supports_multiple_types = False def __init__(self, filter_expression=None, filter_match_action=None): - # type: (Optional[object], Optional[FilterMatchAction]) -> None + # type: (Optional[object], Optional[FilterMatchAction_1d20768a]) -> None """Defines the Jsonlogic event filter expression and its corresponding match action. This filter is applied to all events during the event handler's duration. Events that are rejected by the filter expression are not sent to the skill. :param filter_expression: The JSON object that represents the Jsonlogic expression against which the events are evaluated. If this expression is satisfied, the corresponding match action is performed. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/events_received_request.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/events_received_request.py index 9b8d8fc1..c0e362ad 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/events_received_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/events_received_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.custom_interface_controller.event import Event + from ask_sdk_model.interfaces.custom_interface_controller.event import Event as Event_df85ab64 class EventsReceivedRequest(Request): @@ -64,7 +64,7 @@ class EventsReceivedRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, token=None, events=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[List[Event]]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[List[Event_df85ab64]]) -> None """Skill receives this type of event when an event meets the filter conditions provided in the StartEventHandlerDirective. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/expiration.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/expiration.py index b5e92c7b..9b684cb3 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/expiration.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/expiration.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/expired_request.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/expired_request.py index 15ae2cfa..0df4e743 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/expired_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/expired_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/filter_match_action.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/filter_match_action.py index 2589cbef..64dfe40a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/filter_match_action.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/filter_match_action.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class FilterMatchAction(Enum): SEND = "SEND" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, FilterMatchAction): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/header.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/header.py index e388eb1c..33031740 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/header.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/header.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/send_directive_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/send_directive_directive.py index 00c0e479..86be5862 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/send_directive_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/send_directive_directive.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.custom_interface_controller.endpoint import Endpoint - from ask_sdk_model.interfaces.custom_interface_controller.header import Header + from ask_sdk_model.interfaces.custom_interface_controller.endpoint import Endpoint as Endpoint_3be30cac + from ask_sdk_model.interfaces.custom_interface_controller.header import Header as Header_57ad56ec class SendDirectiveDirective(Directive): @@ -57,7 +57,7 @@ class SendDirectiveDirective(Directive): supports_multiple_types = False def __init__(self, header=None, payload=None, endpoint=None): - # type: (Optional[Header], Optional[object], Optional[Endpoint]) -> None + # type: (Optional[Header_57ad56ec], Optional[object], Optional[Endpoint_3be30cac]) -> None """The directive to be delivered to the gadgets. Each directive is targeted to one gadget (that is, one endpointId). To target the same directive to multiple gadgets, include one directive for each gadget in the response. :param header: The object that contains the header of the directive. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/start_event_handler_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/start_event_handler_directive.py index befd450b..d9afe9b7 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/start_event_handler_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/start_event_handler_directive.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.custom_interface_controller.expiration import Expiration - from ask_sdk_model.interfaces.custom_interface_controller.event_filter import EventFilter + from ask_sdk_model.interfaces.custom_interface_controller.event_filter import EventFilter as EventFilter_321cde63 + from ask_sdk_model.interfaces.custom_interface_controller.expiration import Expiration as Expiration_edfb772c class StartEventHandlerDirective(Directive): @@ -57,7 +57,7 @@ class StartEventHandlerDirective(Directive): supports_multiple_types = False def __init__(self, token=None, event_filter=None, expiration=None): - # type: (Optional[str], Optional[EventFilter], Optional[Expiration]) -> None + # type: (Optional[str], Optional[EventFilter_321cde63], Optional[Expiration_edfb772c]) -> None """This directive configures and starts an event handler. This will enable the skill to receive Custom Events. A skill can only have one active Event Handler at a time. :param token: A unique string to identify the Event Handler. This identifier is associated with all events dispatched by the Event Handler while it is active. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/stop_event_handler_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/stop_event_handler_directive.py index c80e80fe..682ad8a7 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/stop_event_handler_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/custom_interface_controller/stop_event_handler_directive.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/display/__init__.py index 0a4f1b3a..babe1813 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/__init__.py @@ -14,27 +14,27 @@ # from __future__ import absolute_import -from .text_content import TextContent -from .back_button_behavior import BackButtonBehavior +from .element_selected_request import ElementSelectedRequest +from .body_template6 import BodyTemplate6 from .list_template2 import ListTemplate2 -from .text_field import TextField -from .hint import Hint from .body_template7 import BodyTemplate7 -from .hint_directive import HintDirective from .render_template_directive import RenderTemplateDirective -from .template import Template -from .list_item import ListItem +from .hint_directive import HintDirective +from .text_content import TextContent +from .body_template3 import BodyTemplate3 +from .image import Image from .image_size import ImageSize -from .plain_text import PlainText -from .element_selected_request import ElementSelectedRequest -from .list_template1 import ListTemplate1 -from .body_template1 import BodyTemplate1 -from .display_state import DisplayState +from .template import Template from .body_template2 import BodyTemplate2 +from .list_template1 import ListTemplate1 +from .hint import Hint from .rich_text import RichText -from .image import Image -from .display_interface import DisplayInterface from .plain_text_hint import PlainTextHint -from .body_template3 import BodyTemplate3 +from .plain_text import PlainText +from .body_template1 import BodyTemplate1 +from .list_item import ListItem from .image_instance import ImageInstance -from .body_template6 import BodyTemplate6 +from .back_button_behavior import BackButtonBehavior +from .text_field import TextField +from .display_state import DisplayState +from .display_interface import DisplayInterface diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/back_button_behavior.py b/ask-sdk-model/ask_sdk_model/interfaces/display/back_button_behavior.py index 5170a1dc..80f4214c 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/back_button_behavior.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/back_button_behavior.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,7 +35,7 @@ class BackButtonBehavior(Enum): VISIBLE = "VISIBLE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -51,7 +51,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, BackButtonBehavior): return False @@ -59,6 +59,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/body_template1.py b/ask-sdk-model/ask_sdk_model/interfaces/display/body_template1.py index 5397aca7..4e2722a8 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/body_template1.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/body_template1.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior - from ask_sdk_model.interfaces.display.image import Image - from ask_sdk_model.interfaces.display.text_content import TextContent + from ask_sdk_model.interfaces.display.image import Image as Image_1942d978 + from ask_sdk_model.interfaces.display.text_content import TextContent as TextContent_1d3959d5 + from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior as BackButtonBehavior_46c3eb02 class BodyTemplate1(Template): @@ -64,7 +64,7 @@ class BodyTemplate1(Template): supports_multiple_types = False def __init__(self, token=None, back_button=None, background_image=None, title=None, text_content=None): - # type: (Optional[str], Optional[BackButtonBehavior], Optional[Image], Optional[str], Optional[TextContent]) -> None + # type: (Optional[str], Optional[BackButtonBehavior_46c3eb02], Optional[Image_1942d978], Optional[str], Optional[TextContent_1d3959d5]) -> None """ :param token: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/body_template2.py b/ask-sdk-model/ask_sdk_model/interfaces/display/body_template2.py index b45581f0..fbc1739d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/body_template2.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/body_template2.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior - from ask_sdk_model.interfaces.display.image import Image - from ask_sdk_model.interfaces.display.text_content import TextContent + from ask_sdk_model.interfaces.display.image import Image as Image_1942d978 + from ask_sdk_model.interfaces.display.text_content import TextContent as TextContent_1d3959d5 + from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior as BackButtonBehavior_46c3eb02 class BodyTemplate2(Template): @@ -68,7 +68,7 @@ class BodyTemplate2(Template): supports_multiple_types = False def __init__(self, token=None, back_button=None, background_image=None, image=None, title=None, text_content=None): - # type: (Optional[str], Optional[BackButtonBehavior], Optional[Image], Optional[Image], Optional[str], Optional[TextContent]) -> None + # type: (Optional[str], Optional[BackButtonBehavior_46c3eb02], Optional[Image_1942d978], Optional[Image_1942d978], Optional[str], Optional[TextContent_1d3959d5]) -> None """ :param token: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/body_template3.py b/ask-sdk-model/ask_sdk_model/interfaces/display/body_template3.py index 06d62e89..bbc092c5 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/body_template3.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/body_template3.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior - from ask_sdk_model.interfaces.display.image import Image - from ask_sdk_model.interfaces.display.text_content import TextContent + from ask_sdk_model.interfaces.display.image import Image as Image_1942d978 + from ask_sdk_model.interfaces.display.text_content import TextContent as TextContent_1d3959d5 + from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior as BackButtonBehavior_46c3eb02 class BodyTemplate3(Template): @@ -68,7 +68,7 @@ class BodyTemplate3(Template): supports_multiple_types = False def __init__(self, token=None, back_button=None, background_image=None, image=None, title=None, text_content=None): - # type: (Optional[str], Optional[BackButtonBehavior], Optional[Image], Optional[Image], Optional[str], Optional[TextContent]) -> None + # type: (Optional[str], Optional[BackButtonBehavior_46c3eb02], Optional[Image_1942d978], Optional[Image_1942d978], Optional[str], Optional[TextContent_1d3959d5]) -> None """ :param token: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/body_template6.py b/ask-sdk-model/ask_sdk_model/interfaces/display/body_template6.py index 3d2269dd..59f417a7 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/body_template6.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/body_template6.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior - from ask_sdk_model.interfaces.display.image import Image - from ask_sdk_model.interfaces.display.text_content import TextContent + from ask_sdk_model.interfaces.display.image import Image as Image_1942d978 + from ask_sdk_model.interfaces.display.text_content import TextContent as TextContent_1d3959d5 + from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior as BackButtonBehavior_46c3eb02 class BodyTemplate6(Template): @@ -64,7 +64,7 @@ class BodyTemplate6(Template): supports_multiple_types = False def __init__(self, token=None, back_button=None, background_image=None, text_content=None, image=None): - # type: (Optional[str], Optional[BackButtonBehavior], Optional[Image], Optional[TextContent], Optional[Image]) -> None + # type: (Optional[str], Optional[BackButtonBehavior_46c3eb02], Optional[Image_1942d978], Optional[TextContent_1d3959d5], Optional[Image_1942d978]) -> None """ :param token: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/body_template7.py b/ask-sdk-model/ask_sdk_model/interfaces/display/body_template7.py index 6f6e85d1..26208234 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/body_template7.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/body_template7.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior - from ask_sdk_model.interfaces.display.image import Image + from ask_sdk_model.interfaces.display.image import Image as Image_1942d978 + from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior as BackButtonBehavior_46c3eb02 class BodyTemplate7(Template): @@ -63,7 +63,7 @@ class BodyTemplate7(Template): supports_multiple_types = False def __init__(self, token=None, back_button=None, title=None, image=None, background_image=None): - # type: (Optional[str], Optional[BackButtonBehavior], Optional[str], Optional[Image], Optional[Image]) -> None + # type: (Optional[str], Optional[BackButtonBehavior_46c3eb02], Optional[str], Optional[Image_1942d978], Optional[Image_1942d978]) -> None """ :param token: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/display_interface.py b/ask-sdk-model/ask_sdk_model/interfaces/display/display_interface.py index 2d71dedf..d340bc7a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/display_interface.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/display_interface.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/display_state.py b/ask-sdk-model/ask_sdk_model/interfaces/display/display_state.py index 38e1a48f..27dec7ca 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/display_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/display_state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/element_selected_request.py b/ask-sdk-model/ask_sdk_model/interfaces/display/element_selected_request.py index a83c26a9..01472dff 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/element_selected_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/element_selected_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/hint.py b/ask-sdk-model/ask_sdk_model/interfaces/display/hint.py index f784c8e0..9e9987a9 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/hint.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/hint.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/hint_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/display/hint_directive.py index 9b7e5a37..53e4f0a8 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/hint_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/hint_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.hint import Hint + from ask_sdk_model.interfaces.display.hint import Hint as Hint_5bfd483e class HintDirective(Directive): @@ -46,7 +46,7 @@ class HintDirective(Directive): supports_multiple_types = False def __init__(self, hint=None): - # type: (Optional[Hint]) -> None + # type: (Optional[Hint_5bfd483e]) -> None """ :param hint: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/image.py b/ask-sdk-model/ask_sdk_model/interfaces/display/image.py index fc64e449..a33b48bc 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/image.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/image.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.image_instance import ImageInstance + from ask_sdk_model.interfaces.display.image_instance import ImageInstance as ImageInstance_6992042b class Image(object): @@ -47,7 +47,7 @@ class Image(object): supports_multiple_types = False def __init__(self, content_description=None, sources=None): - # type: (Optional[str], Optional[List[ImageInstance]]) -> None + # type: (Optional[str], Optional[List[ImageInstance_6992042b]]) -> None """ :param content_description: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/image_instance.py b/ask-sdk-model/ask_sdk_model/interfaces/display/image_instance.py index 1ba772ee..4e47aee5 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/image_instance.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/image_instance.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.image_size import ImageSize + from ask_sdk_model.interfaces.display.image_size import ImageSize as ImageSize_d9870903 class ImageInstance(object): @@ -55,7 +55,7 @@ class ImageInstance(object): supports_multiple_types = False def __init__(self, url=None, size=None, width_pixels=None, height_pixels=None): - # type: (Optional[str], Optional[ImageSize], Optional[int], Optional[int]) -> None + # type: (Optional[str], Optional[ImageSize_d9870903], Optional[int], Optional[int]) -> None """ :param url: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/image_size.py b/ask-sdk-model/ask_sdk_model/interfaces/display/image_size.py index b47b7acd..d72fc992 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/image_size.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/image_size.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ImageSize(Enum): X_LARGE = "X_LARGE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ImageSize): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/list_item.py b/ask-sdk-model/ask_sdk_model/interfaces/display/list_item.py index a177e290..ad574a62 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/list_item.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/list_item.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.image import Image - from ask_sdk_model.interfaces.display.text_content import TextContent + from ask_sdk_model.interfaces.display.image import Image as Image_1942d978 + from ask_sdk_model.interfaces.display.text_content import TextContent as TextContent_1d3959d5 class ListItem(object): @@ -52,7 +52,7 @@ class ListItem(object): supports_multiple_types = False def __init__(self, token=None, image=None, text_content=None): - # type: (Optional[str], Optional[Image], Optional[TextContent]) -> None + # type: (Optional[str], Optional[Image_1942d978], Optional[TextContent_1d3959d5]) -> None """ :param token: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/list_template1.py b/ask-sdk-model/ask_sdk_model/interfaces/display/list_template1.py index 35e9c967..36aab2ae 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/list_template1.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/list_template1.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior - from ask_sdk_model.interfaces.display.image import Image - from ask_sdk_model.interfaces.display.list_item import ListItem + from ask_sdk_model.interfaces.display.list_item import ListItem as ListItem_79a19afb + from ask_sdk_model.interfaces.display.image import Image as Image_1942d978 + from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior as BackButtonBehavior_46c3eb02 class ListTemplate1(Template): @@ -64,7 +64,7 @@ class ListTemplate1(Template): supports_multiple_types = False def __init__(self, token=None, back_button=None, background_image=None, title=None, list_items=None): - # type: (Optional[str], Optional[BackButtonBehavior], Optional[Image], Optional[str], Optional[List[ListItem]]) -> None + # type: (Optional[str], Optional[BackButtonBehavior_46c3eb02], Optional[Image_1942d978], Optional[str], Optional[List[ListItem_79a19afb]]) -> None """ :param token: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/list_template2.py b/ask-sdk-model/ask_sdk_model/interfaces/display/list_template2.py index af2182c4..7d230686 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/list_template2.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/list_template2.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior - from ask_sdk_model.interfaces.display.image import Image - from ask_sdk_model.interfaces.display.list_item import ListItem + from ask_sdk_model.interfaces.display.list_item import ListItem as ListItem_79a19afb + from ask_sdk_model.interfaces.display.image import Image as Image_1942d978 + from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior as BackButtonBehavior_46c3eb02 class ListTemplate2(Template): @@ -64,7 +64,7 @@ class ListTemplate2(Template): supports_multiple_types = False def __init__(self, token=None, back_button=None, background_image=None, title=None, list_items=None): - # type: (Optional[str], Optional[BackButtonBehavior], Optional[Image], Optional[str], Optional[List[ListItem]]) -> None + # type: (Optional[str], Optional[BackButtonBehavior_46c3eb02], Optional[Image_1942d978], Optional[str], Optional[List[ListItem_79a19afb]]) -> None """ :param token: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/plain_text.py b/ask-sdk-model/ask_sdk_model/interfaces/display/plain_text.py index 65d629c5..bc9c07dd 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/plain_text.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/plain_text.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/plain_text_hint.py b/ask-sdk-model/ask_sdk_model/interfaces/display/plain_text_hint.py index 11baebac..b264897e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/plain_text_hint.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/plain_text_hint.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/render_template_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/display/render_template_directive.py index a600ad22..c17ce6cc 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/render_template_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/render_template_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.template import Template + from ask_sdk_model.interfaces.display.template import Template as Template_14d6ce1e class RenderTemplateDirective(Directive): @@ -46,7 +46,7 @@ class RenderTemplateDirective(Directive): supports_multiple_types = False def __init__(self, template=None): - # type: (Optional[Template]) -> None + # type: (Optional[Template_14d6ce1e]) -> None """ :param template: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/rich_text.py b/ask-sdk-model/ask_sdk_model/interfaces/display/rich_text.py index 7ba83494..fcc47b84 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/rich_text.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/rich_text.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/template.py b/ask-sdk-model/ask_sdk_model/interfaces/display/template.py index 494ee614..f7f37f96 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/template.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/template.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior + from ask_sdk_model.interfaces.display.back_button_behavior import BackButtonBehavior as BackButtonBehavior_46c3eb02 class Template(object): @@ -86,7 +86,7 @@ class Template(object): @abstractmethod def __init__(self, object_type=None, token=None, back_button=None): - # type: (Optional[str], Optional[str], Optional[BackButtonBehavior]) -> None + # type: (Optional[str], Optional[str], Optional[BackButtonBehavior_46c3eb02]) -> None """ :param object_type: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/text_content.py b/ask-sdk-model/ask_sdk_model/interfaces/display/text_content.py index e9f31d0e..5e8cb594 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/text_content.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/text_content.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.display.text_field import TextField + from ask_sdk_model.interfaces.display.text_field import TextField as TextField_b5418c17 class TextContent(object): @@ -51,7 +51,7 @@ class TextContent(object): supports_multiple_types = False def __init__(self, primary_text=None, secondary_text=None, tertiary_text=None): - # type: (Optional[TextField], Optional[TextField], Optional[TextField]) -> None + # type: (Optional[TextField_b5418c17], Optional[TextField_b5418c17], Optional[TextField_b5418c17]) -> None """ :param primary_text: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/display/text_field.py b/ask-sdk-model/ask_sdk_model/interfaces/display/text_field.py index 40b1acad..2b561416 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/display/text_field.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/display/text_field.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/gadget_controller/set_light_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/gadget_controller/set_light_directive.py index 46377235..d0a056e4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/gadget_controller/set_light_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/gadget_controller/set_light_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.gadget_controller.set_light_parameters import SetLightParameters + from ask_sdk_model.services.gadget_controller.set_light_parameters import SetLightParameters as SetLightParameters_4fffcafd class SetLightDirective(Directive): @@ -56,7 +56,7 @@ class SetLightDirective(Directive): supports_multiple_types = False def __init__(self, version=None, target_gadgets=None, parameters=None): - # type: (Optional[int], Optional[List[object]], Optional[SetLightParameters]) -> None + # type: (Optional[int], Optional[List[object]], Optional[SetLightParameters_4fffcafd]) -> None """Sends Alexa a command to modify the behavior of connected Echo Buttons. :param version: The version of the directive. Must be set to 1. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/game_engine/input_handler_event_request.py b/ask-sdk-model/ask_sdk_model/interfaces/game_engine/input_handler_event_request.py index 9c7c964a..31fb7296 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/game_engine/input_handler_event_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/game_engine/input_handler_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.game_engine.input_handler_event import InputHandlerEvent + from ask_sdk_model.services.game_engine.input_handler_event import InputHandlerEvent as InputHandlerEvent_206447bd class InputHandlerEventRequest(Request): @@ -64,7 +64,7 @@ class InputHandlerEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, originating_request_id=None, events=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[List[InputHandlerEvent]]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[List[InputHandlerEvent_206447bd]]) -> None """Sent when the conditions of an Echo Button event that your skill defined were met. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/game_engine/start_input_handler_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/game_engine/start_input_handler_directive.py index 1b79422a..b01a732d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/game_engine/start_input_handler_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/game_engine/start_input_handler_directive.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.game_engine.recognizer import Recognizer - from ask_sdk_model.services.game_engine.event import Event + from ask_sdk_model.services.game_engine.event import Event as Event_28203a7 + from ask_sdk_model.services.game_engine.recognizer import Recognizer as Recognizer_f1651c8f class StartInputHandlerDirective(Directive): @@ -59,7 +59,7 @@ class StartInputHandlerDirective(Directive): supports_multiple_types = False def __init__(self, timeout=None, proxies=None, recognizers=None, events=None): - # type: (Optional[int], Optional[List[object]], Optional[Dict[str, Recognizer]], Optional[Dict[str, Event]]) -> None + # type: (Optional[int], Optional[List[object]], Optional[Dict[str, Recognizer_f1651c8f]], Optional[Dict[str, Event_28203a7]]) -> None """ :param timeout: The maximum run time for this Input Handler, in milliseconds. Although this parameter is required, you can specify events with conditions on which to end the Input Handler earlier. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/game_engine/stop_input_handler_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/game_engine/stop_input_handler_directive.py index ec7ac70d..826f4743 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/game_engine/stop_input_handler_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/game_engine/stop_input_handler_directive.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/__init__.py index 7f7b6ccf..0976bdc5 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/__init__.py @@ -14,12 +14,13 @@ # from __future__ import absolute_import -from .geolocation_state import GeolocationState -from .geolocation_interface import GeolocationInterface -from .status import Status -from .coordinate import Coordinate -from .speed import Speed from .heading import Heading from .altitude import Altitude -from .location_services import LocationServices from .access import Access +from .location_services import LocationServices +from .speed import Speed +from .geolocation_state import GeolocationState +from .coordinate import Coordinate +from .geolocation_interface import GeolocationInterface +from .status import Status +from .geolocation_common_state import GeolocationCommonState diff --git a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/access.py b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/access.py index 9a474df9..f8502972 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/access.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/access.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class Access(Enum): UNKNOWN = "UNKNOWN" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Access): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/altitude.py b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/altitude.py index 16f888f4..336fa18d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/altitude.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/altitude.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/coordinate.py b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/coordinate.py index 58e61db0..ac1af077 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/coordinate.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/coordinate.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/geolocation_common_state.py b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/geolocation_common_state.py new file mode 100644 index 00000000..3682483d --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/geolocation_common_state.py @@ -0,0 +1,140 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.interfaces.geolocation.altitude import Altitude as Altitude_328a6962 + from ask_sdk_model.interfaces.geolocation.heading import Heading as Heading_bf10e3ca + from ask_sdk_model.interfaces.geolocation.speed import Speed as Speed_22d2d794 + from ask_sdk_model.interfaces.geolocation.coordinate import Coordinate as Coordinate_c6912a2 + + +class GeolocationCommonState(object): + """ + The common object to define the basic geolocation states + + + :param timestamp: Specifies the time when the geolocation data was last collected on the device. + :type timestamp: (optional) str + :param coordinate: + :type coordinate: (optional) ask_sdk_model.interfaces.geolocation.coordinate.Coordinate + :param altitude: + :type altitude: (optional) ask_sdk_model.interfaces.geolocation.altitude.Altitude + :param heading: + :type heading: (optional) ask_sdk_model.interfaces.geolocation.heading.Heading + :param speed: + :type speed: (optional) ask_sdk_model.interfaces.geolocation.speed.Speed + + """ + deserialized_types = { + 'timestamp': 'str', + 'coordinate': 'ask_sdk_model.interfaces.geolocation.coordinate.Coordinate', + 'altitude': 'ask_sdk_model.interfaces.geolocation.altitude.Altitude', + 'heading': 'ask_sdk_model.interfaces.geolocation.heading.Heading', + 'speed': 'ask_sdk_model.interfaces.geolocation.speed.Speed' + } # type: Dict + + attribute_map = { + 'timestamp': 'timestamp', + 'coordinate': 'coordinate', + 'altitude': 'altitude', + 'heading': 'heading', + 'speed': 'speed' + } # type: Dict + supports_multiple_types = False + + def __init__(self, timestamp=None, coordinate=None, altitude=None, heading=None, speed=None): + # type: (Optional[str], Optional[Coordinate_c6912a2], Optional[Altitude_328a6962], Optional[Heading_bf10e3ca], Optional[Speed_22d2d794]) -> None + """The common object to define the basic geolocation states + + :param timestamp: Specifies the time when the geolocation data was last collected on the device. + :type timestamp: (optional) str + :param coordinate: + :type coordinate: (optional) ask_sdk_model.interfaces.geolocation.coordinate.Coordinate + :param altitude: + :type altitude: (optional) ask_sdk_model.interfaces.geolocation.altitude.Altitude + :param heading: + :type heading: (optional) ask_sdk_model.interfaces.geolocation.heading.Heading + :param speed: + :type speed: (optional) ask_sdk_model.interfaces.geolocation.speed.Speed + """ + self.__discriminator_value = None # type: str + + self.timestamp = timestamp + self.coordinate = coordinate + self.altitude = altitude + self.heading = heading + self.speed = speed + + 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, GeolocationCommonState): + 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/geolocation/geolocation_interface.py b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/geolocation_interface.py index 8a0effbe..5f7f3c97 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/geolocation_interface.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/geolocation_interface.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/geolocation_state.py b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/geolocation_state.py index 653944f6..9182486e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/geolocation_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/geolocation_state.py @@ -18,20 +18,23 @@ import six import typing from enum import Enum +from ask_sdk_model.interfaces.geolocation.geolocation_common_state import GeolocationCommonState if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.geolocation.coordinate import Coordinate - from ask_sdk_model.interfaces.geolocation.altitude import Altitude - from ask_sdk_model.interfaces.geolocation.heading import Heading - from ask_sdk_model.interfaces.geolocation.speed import Speed - from ask_sdk_model.interfaces.geolocation.location_services import LocationServices + from ask_sdk_model.interfaces.geolocation.altitude import Altitude as Altitude_328a6962 + from ask_sdk_model.interfaces.geolocation.heading import Heading as Heading_bf10e3ca + from ask_sdk_model.interfaces.geolocation.speed import Speed as Speed_22d2d794 + from ask_sdk_model.interfaces.geolocation.coordinate import Coordinate as Coordinate_c6912a2 + from ask_sdk_model.interfaces.geolocation.location_services import LocationServices as LocationServices_c8dfc485 -class GeolocationState(object): +class GeolocationState(GeolocationCommonState): """ + The geolocation object used in the Context of API + :param timestamp: Specifies the time when the geolocation data was last collected on the device. :type timestamp: (optional) str @@ -67,8 +70,8 @@ class GeolocationState(object): supports_multiple_types = False def __init__(self, timestamp=None, coordinate=None, altitude=None, heading=None, speed=None, location_services=None): - # type: (Optional[str], Optional[Coordinate], Optional[Altitude], Optional[Heading], Optional[Speed], Optional[LocationServices]) -> None - """ + # type: (Optional[str], Optional[Coordinate_c6912a2], Optional[Altitude_328a6962], Optional[Heading_bf10e3ca], Optional[Speed_22d2d794], Optional[LocationServices_c8dfc485]) -> None + """The geolocation object used in the Context of API :param timestamp: Specifies the time when the geolocation data was last collected on the device. :type timestamp: (optional) str @@ -85,11 +88,7 @@ def __init__(self, timestamp=None, coordinate=None, altitude=None, heading=None, """ self.__discriminator_value = None # type: str - self.timestamp = timestamp - self.coordinate = coordinate - self.altitude = altitude - self.heading = heading - self.speed = speed + super(GeolocationState, self).__init__(timestamp=timestamp, coordinate=coordinate, altitude=altitude, heading=heading, speed=speed) self.location_services = location_services def to_dict(self): diff --git a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/heading.py b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/heading.py index d6cb992c..2e8a8333 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/heading.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/heading.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/location_services.py b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/location_services.py index 7cf41a52..d854497b 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/location_services.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/location_services.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.geolocation.status import Status - from ask_sdk_model.interfaces.geolocation.access import Access + from ask_sdk_model.interfaces.geolocation.status import Status as Status_d747e462 + from ask_sdk_model.interfaces.geolocation.access import Access as Access_20924022 class LocationServices(object): @@ -50,7 +50,7 @@ class LocationServices(object): supports_multiple_types = False def __init__(self, status=None, access=None): - # type: (Optional[Status], Optional[Access]) -> None + # type: (Optional[Status_d747e462], Optional[Access_20924022]) -> None """An object containing status and access. :param status: A string representing the status of whether location services is currently running or not on the host OS of device. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/speed.py b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/speed.py index 9c873c67..02cad3f6 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/speed.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/speed.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/status.py b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/status.py index 41e3566c..18d30b18 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/geolocation/status.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/geolocation/status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class Status(Enum): STOPPED = "STOPPED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Status): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/messaging/message_received_request.py b/ask-sdk-model/ask_sdk_model/interfaces/messaging/message_received_request.py index 1652fd78..52e2a23d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/messaging/message_received_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/messaging/message_received_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/monetization/v1/in_skill_product.py b/ask-sdk-model/ask_sdk_model/interfaces/monetization/v1/in_skill_product.py index 0d0d1944..12518dc5 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/monetization/v1/in_skill_product.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/monetization/v1/in_skill_product.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/monetization/v1/purchase_result.py b/ask-sdk-model/ask_sdk_model/interfaces/monetization/v1/purchase_result.py index b193bebe..92b340bb 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/monetization/v1/purchase_result.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/monetization/v1/purchase_result.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -40,7 +40,7 @@ class PurchaseResult(Enum): ALREADY_PURCHASED = "ALREADY_PURCHASED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -56,7 +56,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PurchaseResult): return False @@ -64,6 +64,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/navigation/assistance/announce_road_regulation.py b/ask-sdk-model/ask_sdk_model/interfaces/navigation/assistance/announce_road_regulation.py index 2fadd53e..3d92db01 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/navigation/assistance/announce_road_regulation.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/navigation/assistance/announce_road_regulation.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/navigation/navigation_interface.py b/ask-sdk-model/ask_sdk_model/interfaces/navigation/navigation_interface.py index e6a76dfd..1be03390 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/navigation/navigation_interface.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/navigation/navigation_interface.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/__init__.py index 5d4e111d..94b2efa3 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/__init__.py @@ -14,7 +14,7 @@ # from __future__ import absolute_import -from .play_command_issued_request import PlayCommandIssuedRequest +from .pause_command_issued_request import PauseCommandIssuedRequest from .previous_command_issued_request import PreviousCommandIssuedRequest from .next_command_issued_request import NextCommandIssuedRequest -from .pause_command_issued_request import PauseCommandIssuedRequest +from .play_command_issued_request import PlayCommandIssuedRequest diff --git a/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/next_command_issued_request.py b/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/next_command_issued_request.py index f3650832..7167b4c0 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/next_command_issued_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/next_command_issued_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/pause_command_issued_request.py b/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/pause_command_issued_request.py index 2bbea9f7..16722361 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/pause_command_issued_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/pause_command_issued_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/play_command_issued_request.py b/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/play_command_issued_request.py index c64e3688..e1adfcd7 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/play_command_issued_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/play_command_issued_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/previous_command_issued_request.py b/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/previous_command_issued_request.py index bb613189..34c94055 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/previous_command_issued_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/playbackcontroller/previous_command_issued_request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/system/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/system/__init__.py index 7bf51830..5e465d2b 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/system/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/system/__init__.py @@ -14,8 +14,8 @@ # from __future__ import absolute_import +from .error_type import ErrorType +from .error import Error from .error_cause import ErrorCause from .exception_encountered_request import ExceptionEncounteredRequest -from .error import Error from .system_state import SystemState -from .error_type import ErrorType diff --git a/ask-sdk-model/ask_sdk_model/interfaces/system/error.py b/ask-sdk-model/ask_sdk_model/interfaces/system/error.py index 1c26ed63..8e712d47 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/system/error.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/system/error.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.system.error_type import ErrorType + from ask_sdk_model.interfaces.system.error_type import ErrorType as ErrorType_9b83cec0 class Error(object): @@ -47,7 +47,7 @@ class Error(object): supports_multiple_types = False def __init__(self, object_type=None, message=None): - # type: (Optional[ErrorType], Optional[str]) -> None + # type: (Optional[ErrorType_9b83cec0], Optional[str]) -> None """ :param object_type: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/system/error_cause.py b/ask-sdk-model/ask_sdk_model/interfaces/system/error_cause.py index 7da87a7a..29e41716 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/system/error_cause.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/system/error_cause.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/system/error_type.py b/ask-sdk-model/ask_sdk_model/interfaces/system/error_type.py index 5417f60d..41571398 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/system/error_type.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/system/error_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class ErrorType(Enum): INTERNAL_SERVICE_ERROR = "INTERNAL_SERVICE_ERROR" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ErrorType): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/system/exception_encountered_request.py b/ask-sdk-model/ask_sdk_model/interfaces/system/exception_encountered_request.py index 35e18996..080ed691 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/system/exception_encountered_request.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/system/exception_encountered_request.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.system.error import Error - from ask_sdk_model.interfaces.system.error_cause import ErrorCause + from ask_sdk_model.interfaces.system.error_cause import ErrorCause as ErrorCause_f5e108b8 + from ask_sdk_model.interfaces.system.error import Error as Error_96a33007 class ExceptionEncounteredRequest(Request): @@ -63,7 +63,7 @@ class ExceptionEncounteredRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, error=None, cause=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[Error], Optional[ErrorCause]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[Error_96a33007], Optional[ErrorCause_f5e108b8]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/interfaces/system/system_state.py b/ask-sdk-model/ask_sdk_model/interfaces/system/system_state.py index 53440842..81e9d935 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/system/system_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/system/system_state.py @@ -21,12 +21,13 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.device import Device - from ask_sdk_model.person import Person - from ask_sdk_model.application import Application - from ask_sdk_model.user import User + from ask_sdk_model.device import Device as Device_8c07abbe + from ask_sdk_model.interfaces.system_unit.unit import Unit as Unit_14958eb0 + from ask_sdk_model.application import Application as Application_fbe81c42 + from ask_sdk_model.user import User as User_8987f2de + from ask_sdk_model.person import Person as Person_a00fdede class SystemState(object): @@ -40,6 +41,8 @@ class SystemState(object): :type device: (optional) ask_sdk_model.device.Device :param person: :type person: (optional) ask_sdk_model.person.Person + :param unit: + :type unit: (optional) ask_sdk_model.interfaces.system_unit.unit.Unit :param api_endpoint: A string that references the correct base URI to refer to by region, for use with APIs such as the Device Location API and Progressive Response API. :type api_endpoint: (optional) str :param api_access_token: A bearer token string that can be used by the skill (during the skill session) to access Alexa APIs resources of the registered Alexa customer and/or person who is making the request. This token encapsulates the permissions authorized under the registered Alexa account and device, and (optionally) the recognized person. Some resources, such as name or email, require explicit customer consent.\" @@ -51,6 +54,7 @@ class SystemState(object): 'user': 'ask_sdk_model.user.User', 'device': 'ask_sdk_model.device.Device', 'person': 'ask_sdk_model.person.Person', + 'unit': 'ask_sdk_model.interfaces.system_unit.unit.Unit', 'api_endpoint': 'str', 'api_access_token': 'str' } # type: Dict @@ -60,13 +64,14 @@ class SystemState(object): 'user': 'user', 'device': 'device', 'person': 'person', + 'unit': 'unit', 'api_endpoint': 'apiEndpoint', 'api_access_token': 'apiAccessToken' } # type: Dict supports_multiple_types = False - def __init__(self, application=None, user=None, device=None, person=None, api_endpoint=None, api_access_token=None): - # type: (Optional[Application], Optional[User], Optional[Device], Optional[Person], Optional[str], Optional[str]) -> None + def __init__(self, application=None, user=None, device=None, person=None, unit=None, api_endpoint=None, api_access_token=None): + # type: (Optional[Application_fbe81c42], Optional[User_8987f2de], Optional[Device_8c07abbe], Optional[Person_a00fdede], Optional[Unit_14958eb0], Optional[str], Optional[str]) -> None """ :param application: @@ -77,6 +82,8 @@ def __init__(self, application=None, user=None, device=None, person=None, api_en :type device: (optional) ask_sdk_model.device.Device :param person: :type person: (optional) ask_sdk_model.person.Person + :param unit: + :type unit: (optional) ask_sdk_model.interfaces.system_unit.unit.Unit :param api_endpoint: A string that references the correct base URI to refer to by region, for use with APIs such as the Device Location API and Progressive Response API. :type api_endpoint: (optional) str :param api_access_token: A bearer token string that can be used by the skill (during the skill session) to access Alexa APIs resources of the registered Alexa customer and/or person who is making the request. This token encapsulates the permissions authorized under the registered Alexa account and device, and (optionally) the recognized person. Some resources, such as name or email, require explicit customer consent.\" @@ -88,6 +95,7 @@ def __init__(self, application=None, user=None, device=None, person=None, api_en self.user = user self.device = device self.person = person + self.unit = unit self.api_endpoint = api_endpoint self.api_access_token = api_access_token diff --git a/ask-sdk-model/ask_sdk_model/interfaces/system_unit/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/system_unit/__init__.py new file mode 100644 index 00000000..6fef2f8d --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/system_unit/__init__.py @@ -0,0 +1,17 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + +from .unit import Unit diff --git a/ask-sdk-model/ask_sdk_model/interfaces/system_unit/py.typed b/ask-sdk-model/ask_sdk_model/interfaces/system_unit/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-sdk-model/ask_sdk_model/interfaces/system_unit/unit.py b/ask-sdk-model/ask_sdk_model/interfaces/system_unit/unit.py new file mode 100644 index 00000000..5ee47214 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/interfaces/system_unit/unit.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Unit(object): + """ + An object that represents a logical entity for organizing actors and resources that interact with Alexa systems. + + + :param unit_id: A string that represents a unique identifier for the unit in the context of a request. The length of this identifier can vary, but is never more than 255 characters. Alexa generates this string only when a request made to your skill has a valid unit context. This identifier is scoped to a skill. Normally, disabling and re-enabling a skill generates a new identifier. + :type unit_id: (optional) str + :param persistent_unit_id: A string that represents a unique identifier for the unit in the context of a request. The length of this identifier can vary, but is never more than 255 characters. Alexa generates this string only when the request made to your skill has a valid unit context. This is another unit identifier associated with an organization's developer account. Only registered Alexa for Residential and Alexa for Hospitality vendors can see the Read PersistentUnitId toggle in the Alexa skills developers console. This identifier is scoped to a vendor, therefore all skills that belong to particular vendor share this identifier, therefore it will stay the same regardless of skill enablement. + :type persistent_unit_id: (optional) str + + """ + deserialized_types = { + 'unit_id': 'str', + 'persistent_unit_id': 'str' + } # type: Dict + + attribute_map = { + 'unit_id': 'unitId', + 'persistent_unit_id': 'persistentUnitId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, unit_id=None, persistent_unit_id=None): + # type: (Optional[str], Optional[str]) -> None + """An object that represents a logical entity for organizing actors and resources that interact with Alexa systems. + + :param unit_id: A string that represents a unique identifier for the unit in the context of a request. The length of this identifier can vary, but is never more than 255 characters. Alexa generates this string only when a request made to your skill has a valid unit context. This identifier is scoped to a skill. Normally, disabling and re-enabling a skill generates a new identifier. + :type unit_id: (optional) str + :param persistent_unit_id: A string that represents a unique identifier for the unit in the context of a request. The length of this identifier can vary, but is never more than 255 characters. Alexa generates this string only when the request made to your skill has a valid unit context. This is another unit identifier associated with an organization's developer account. Only registered Alexa for Residential and Alexa for Hospitality vendors can see the Read PersistentUnitId toggle in the Alexa skills developers console. This identifier is scoped to a vendor, therefore all skills that belong to particular vendor share this identifier, therefore it will stay the same regardless of skill enablement. + :type persistent_unit_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.unit_id = unit_id + self.persistent_unit_id = persistent_unit_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, Unit): + 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/tasks/complete_task_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/tasks/complete_task_directive.py index 3ad6dc0c..0b533a13 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/tasks/complete_task_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/tasks/complete_task_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.status import Status + from ask_sdk_model.status import Status as Status_7705e43e class CompleteTaskDirective(Directive): @@ -52,7 +52,7 @@ class CompleteTaskDirective(Directive): supports_multiple_types = False def __init__(self, status=None, result=None): - # type: (Optional[Status], Optional[Dict[str, object]]) -> None + # type: (Optional[Status_7705e43e], Optional[Dict[str, object]]) -> None """This is the directive that a skill can send as part of their response to a session based request. The response will contain the result of the task that the skill is launched for. :param status: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/videoapp/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/videoapp/__init__.py index 024f05c4..e55ea275 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/videoapp/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/videoapp/__init__.py @@ -14,7 +14,7 @@ # from __future__ import absolute_import -from .video_app_interface import VideoAppInterface +from .launch_directive import LaunchDirective from .metadata import Metadata from .video_item import VideoItem -from .launch_directive import LaunchDirective +from .video_app_interface import VideoAppInterface diff --git a/ask-sdk-model/ask_sdk_model/interfaces/videoapp/launch_directive.py b/ask-sdk-model/ask_sdk_model/interfaces/videoapp/launch_directive.py index e99b1368..5909b327 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/videoapp/launch_directive.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/videoapp/launch_directive.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.videoapp.video_item import VideoItem + from ask_sdk_model.interfaces.videoapp.video_item import VideoItem as VideoItem_7858bd1b class LaunchDirective(Directive): @@ -46,7 +46,7 @@ class LaunchDirective(Directive): supports_multiple_types = False def __init__(self, video_item=None): - # type: (Optional[VideoItem]) -> None + # type: (Optional[VideoItem_7858bd1b]) -> None """ :param video_item: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/videoapp/metadata.py b/ask-sdk-model/ask_sdk_model/interfaces/videoapp/metadata.py index c232680c..f1576604 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/videoapp/metadata.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/videoapp/metadata.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/videoapp/video_app_interface.py b/ask-sdk-model/ask_sdk_model/interfaces/videoapp/video_app_interface.py index c36030a8..b852d8f4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/videoapp/video_app_interface.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/videoapp/video_app_interface.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/videoapp/video_item.py b/ask-sdk-model/ask_sdk_model/interfaces/videoapp/video_item.py index 1ca47d2f..b875bd69 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/videoapp/video_item.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/videoapp/video_item.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.videoapp.metadata import Metadata + from ask_sdk_model.interfaces.videoapp.metadata import Metadata as Metadata_d0c69dca class VideoItem(object): @@ -47,7 +47,7 @@ class VideoItem(object): supports_multiple_types = False def __init__(self, source=None, metadata=None): - # type: (Optional[str], Optional[Metadata]) -> None + # type: (Optional[str], Optional[Metadata_d0c69dca]) -> None """ :param source: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/__init__.py index b6e8ad1d..9f636a06 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/__init__.py @@ -14,16 +14,16 @@ # from __future__ import absolute_import -from .presentation_type import PresentationType -from .apl_viewport_state import APLViewportState -from .typed_viewport_state import TypedViewportState -from .touch import Touch from .shape import Shape +from .viewport_state_video import ViewportStateVideo +from .aplt_viewport_state import APLTViewportState +from .dialog import Dialog +from .apl_viewport_state import APLViewportState +from .viewport_video import ViewportVideo from .mode import Mode +from .presentation_type import PresentationType from .keyboard import Keyboard -from .aplt_viewport_state import APLTViewportState -from .viewport_state_video import Video from .viewport_state import ViewportState +from .typed_viewport_state import TypedViewportState from .experience import Experience -from .dialog import Dialog -from .viewport_video import ViewportVideo +from .touch import Touch diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/__init__.py index b92f065f..832b6a13 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/__init__.py @@ -14,5 +14,5 @@ # from __future__ import absolute_import -from .current_configuration import CurrentConfiguration from .viewport_configuration import ViewportConfiguration +from .current_configuration import CurrentConfiguration diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/current_configuration.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/current_configuration.py index 9bb652bd..ae1852e6 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/current_configuration.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/current_configuration.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.viewport.dialog import Dialog - from ask_sdk_model.interfaces.viewport.viewport_video import ViewportVideo - from ask_sdk_model.interfaces.viewport.mode import Mode - from ask_sdk_model.interfaces.viewport.size.viewport_size import ViewportSize + from ask_sdk_model.interfaces.viewport.dialog import Dialog as Dialog_9057824a + from ask_sdk_model.interfaces.viewport.viewport_video import ViewportVideo as ViewportVideo_d4424d0d + from ask_sdk_model.interfaces.viewport.mode import Mode as Mode_968d4aaa + from ask_sdk_model.interfaces.viewport.size.viewport_size import ViewportSize as ViewportSize_cc246be4 class CurrentConfiguration(object): @@ -60,7 +60,7 @@ class CurrentConfiguration(object): supports_multiple_types = False def __init__(self, mode=None, video=None, size=None, dialog=None): - # type: (Optional[Mode], Optional[ViewportVideo], Optional[ViewportSize], Optional[Dialog]) -> None + # type: (Optional[Mode_968d4aaa], Optional[ViewportVideo_d4424d0d], Optional[ViewportSize_cc246be4], Optional[Dialog_9057824a]) -> None """The viewport configuration at the time of the request. :param mode: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/viewport_configuration.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/viewport_configuration.py index 62422464..886f0dd7 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/viewport_configuration.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl/viewport_configuration.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.viewport.apl.current_configuration import CurrentConfiguration + from ask_sdk_model.interfaces.viewport.apl.current_configuration import CurrentConfiguration as CurrentConfiguration_e0d94110 class ViewportConfiguration(object): @@ -43,7 +43,7 @@ class ViewportConfiguration(object): supports_multiple_types = False def __init__(self, current=None): - # type: (Optional[CurrentConfiguration]) -> None + # type: (Optional[CurrentConfiguration_e0d94110]) -> None """ :param current: diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl_viewport_state.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl_viewport_state.py index 28abcaee..e6db2a9c 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl_viewport_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/apl_viewport_state.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.viewport.shape import Shape - from ask_sdk_model.interfaces.viewport.presentation_type import PresentationType - from ask_sdk_model.interfaces.viewport.apl.viewport_configuration import ViewportConfiguration + from ask_sdk_model.interfaces.viewport.presentation_type import PresentationType as PresentationType_26a73e67 + from ask_sdk_model.interfaces.viewport.shape import Shape as Shape_d8a6bf70 + from ask_sdk_model.interfaces.viewport.apl.viewport_configuration import ViewportConfiguration as ViewportConfiguration_19084f4 class APLViewportState(TypedViewportState): @@ -70,7 +70,7 @@ class APLViewportState(TypedViewportState): supports_multiple_types = False def __init__(self, id=None, shape=None, dpi=None, presentation_type=None, can_rotate=None, configuration=None): - # type: (Optional[str], Optional[Shape], Optional[float], Optional[PresentationType], Optional[bool], Optional[ViewportConfiguration]) -> None + # type: (Optional[str], Optional[Shape_d8a6bf70], Optional[float], Optional[PresentationType_26a73e67], Optional[bool], Optional[ViewportConfiguration_19084f4]) -> None """This object contains the characteristics related to the APL device's viewport. :param id: unique identifier of a viewport object diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/__init__.py index 05753b9d..04057d10 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/__init__.py @@ -14,6 +14,6 @@ # from __future__ import absolute_import -from .character_format import CharacterFormat -from .viewport_profile import ViewportProfile from .inter_segment import InterSegment +from .viewport_profile import ViewportProfile +from .character_format import CharacterFormat diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/character_format.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/character_format.py index b2626418..8fd77dd4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/character_format.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/character_format.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class CharacterFormat(Enum): SEVEN_SEGMENT = "SEVEN_SEGMENT" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CharacterFormat): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/inter_segment.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/inter_segment.py index ce690a78..922eb821 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/inter_segment.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/inter_segment.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/viewport_profile.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/viewport_profile.py index 30226838..1b3dde86 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/viewport_profile.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt/viewport_profile.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class ViewportProfile(Enum): FOUR_CHARACTER_CLOCK = "FOUR_CHARACTER_CLOCK" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ViewportProfile): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt_viewport_state.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt_viewport_state.py index c0ba5b9e..2a396ac5 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt_viewport_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/aplt_viewport_state.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.viewport.aplt.viewport_profile import ViewportProfile - from ask_sdk_model.interfaces.viewport.aplt.inter_segment import InterSegment - from ask_sdk_model.interfaces.viewport.aplt.character_format import CharacterFormat + from ask_sdk_model.interfaces.viewport.aplt.viewport_profile import ViewportProfile as ViewportProfile_b56b71b8 + from ask_sdk_model.interfaces.viewport.aplt.character_format import CharacterFormat as CharacterFormat_3252d8d2 + from ask_sdk_model.interfaces.viewport.aplt.inter_segment import InterSegment as InterSegment_71b0a608 class APLTViewportState(TypedViewportState): @@ -70,7 +70,7 @@ class APLTViewportState(TypedViewportState): supports_multiple_types = False def __init__(self, id=None, supported_profiles=None, line_length=None, line_count=None, character_format=None, inter_segments=None): - # type: (Optional[str], Optional[List[ViewportProfile]], Optional[int], Optional[int], Optional[CharacterFormat], Optional[List[InterSegment]]) -> None + # type: (Optional[str], Optional[List[ViewportProfile_b56b71b8]], Optional[int], Optional[int], Optional[CharacterFormat_3252d8d2], Optional[List[InterSegment_71b0a608]]) -> None """This object contains the characteristics related to the text device's viewport. :param id: unique identifier of a viewport object diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/dialog.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/dialog.py index 70fcfcc0..a72f2fa5 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/dialog.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/dialog.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class Dialog(Enum): UNSUPPORTED = "UNSUPPORTED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Dialog): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/experience.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/experience.py index fa3e47b9..fed10d10 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/experience.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/experience.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/keyboard.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/keyboard.py index 4cc8eb6a..857c76ab 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/keyboard.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/keyboard.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class Keyboard(Enum): DIRECTION = "DIRECTION" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Keyboard): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/mode.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/mode.py index 9880d3ab..d07e0bac 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/mode.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/mode.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -40,7 +40,7 @@ class Mode(Enum): TV = "TV" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -56,7 +56,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Mode): return False @@ -64,6 +64,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/presentation_type.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/presentation_type.py index 152b0d04..522410b4 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/presentation_type.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/presentation_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PresentationType(Enum): OVERLAY = "OVERLAY" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PresentationType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/shape.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/shape.py index 016a2a69..8cfa0eb0 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/shape.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/shape.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class Shape(Enum): ROUND = "ROUND" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Shape): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/__init__.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/__init__.py index f616566f..ab93696e 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/__init__.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/__init__.py @@ -14,6 +14,6 @@ # from __future__ import absolute_import +from .discrete_viewport_size import DiscreteViewportSize from .continuous_viewport_size import ContinuousViewportSize from .viewport_size import ViewportSize -from .discrete_viewport_size import DiscreteViewportSize diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/continuous_viewport_size.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/continuous_viewport_size.py index 905a1ba6..884fa6de 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/continuous_viewport_size.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/continuous_viewport_size.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/discrete_viewport_size.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/discrete_viewport_size.py index 16ea2fe0..1e51e524 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/discrete_viewport_size.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/discrete_viewport_size.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/viewport_size.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/viewport_size.py index febaf267..99bd8a7f 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/viewport_size.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/size/viewport_size.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/touch.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/touch.py index ff1e7f94..73ad1c3a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/touch.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/touch.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class Touch(Enum): SINGLE = "SINGLE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Touch): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/typed_viewport_state.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/typed_viewport_state.py index c02931e9..dece1c38 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/typed_viewport_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/typed_viewport_state.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/video/codecs.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/video/codecs.py index ff46be0f..cdae357a 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/video/codecs.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/video/codecs.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class Codecs(Enum): H_264_42 = "H_264_42" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Codecs): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_state.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_state.py index 707dd749..16ef9f1d 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_state.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_state.py @@ -21,14 +21,14 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.viewport.experience import Experience - from ask_sdk_model.interfaces.viewport.touch import Touch - from ask_sdk_model.interfaces.viewport.keyboard import Keyboard - from ask_sdk_model.interfaces.viewport.shape import Shape - from ask_sdk_model.interfaces.viewport.viewport_state_video import Video - from ask_sdk_model.interfaces.viewport.mode import Mode + from ask_sdk_model.interfaces.viewport.keyboard import Keyboard as Keyboard_6e759daa + from ask_sdk_model.interfaces.viewport.experience import Experience as Experience_99e18a0a + from ask_sdk_model.interfaces.viewport.shape import Shape as Shape_d8a6bf70 + from ask_sdk_model.interfaces.viewport.viewport_state_video import ViewportStateVideo as ViewportStateVideo_a9fffd46 + from ask_sdk_model.interfaces.viewport.mode import Mode as Mode_968d4aaa + from ask_sdk_model.interfaces.viewport.touch import Touch as Touch_93b302c class ViewportState(object): @@ -57,7 +57,7 @@ class ViewportState(object): :param keyboard: The physical button input mechanisms supported by the device. An empty array indicates physical button input is unsupported. :type keyboard: (optional) list[ask_sdk_model.interfaces.viewport.keyboard.Keyboard] :param video: - :type video: (optional) ask_sdk_model.interfaces.viewport.viewport_state_video.Video + :type video: (optional) ask_sdk_model.interfaces.viewport.viewport_state_video.ViewportStateVideo """ deserialized_types = { @@ -71,7 +71,7 @@ class ViewportState(object): 'current_pixel_height': 'float', 'touch': 'list[ask_sdk_model.interfaces.viewport.touch.Touch]', 'keyboard': 'list[ask_sdk_model.interfaces.viewport.keyboard.Keyboard]', - 'video': 'ask_sdk_model.interfaces.viewport.viewport_state_video.Video' + 'video': 'ask_sdk_model.interfaces.viewport.viewport_state_video.ViewportStateVideo' } # type: Dict attribute_map = { @@ -90,7 +90,7 @@ class ViewportState(object): supports_multiple_types = False def __init__(self, experiences=None, mode=None, shape=None, pixel_width=None, pixel_height=None, dpi=None, current_pixel_width=None, current_pixel_height=None, touch=None, keyboard=None, video=None): - # type: (Optional[List[Experience]], Optional[Mode], Optional[Shape], Optional[float], Optional[float], Optional[float], Optional[float], Optional[float], Optional[List[Touch]], Optional[List[Keyboard]], Optional[Video]) -> None + # type: (Optional[List[Experience_99e18a0a]], Optional[Mode_968d4aaa], Optional[Shape_d8a6bf70], Optional[float], Optional[float], Optional[float], Optional[float], Optional[float], Optional[List[Touch_93b302c]], Optional[List[Keyboard_6e759daa]], Optional[ViewportStateVideo_a9fffd46]) -> None """This object contains the characteristics related to the device's viewport. :param experiences: The experiences supported by the device, in descending order of arcMinuteWidth and arcMinuteHeight. @@ -114,7 +114,7 @@ def __init__(self, experiences=None, mode=None, shape=None, pixel_width=None, pi :param keyboard: The physical button input mechanisms supported by the device. An empty array indicates physical button input is unsupported. :type keyboard: (optional) list[ask_sdk_model.interfaces.viewport.keyboard.Keyboard] :param video: - :type video: (optional) ask_sdk_model.interfaces.viewport.viewport_state_video.Video + :type video: (optional) ask_sdk_model.interfaces.viewport.viewport_state_video.ViewportStateVideo """ self.__discriminator_value = None # type: str diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_state_video.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_state_video.py index 0554cfa8..e7d100a3 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_state_video.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_state_video.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.viewport.video.codecs import Codecs + from ask_sdk_model.interfaces.viewport.video.codecs import Codecs as Codecs_89738777 -class Video(object): +class ViewportStateVideo(object): """ Details of the technologies which are available for playing video on the device. @@ -45,7 +45,7 @@ class Video(object): supports_multiple_types = False def __init__(self, codecs=None): - # type: (Optional[List[Codecs]]) -> None + # type: (Optional[List[Codecs_89738777]]) -> None """Details of the technologies which are available for playing video on the device. :param codecs: Codecs which are available for playing video on the device. @@ -98,7 +98,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, Video): + if not isinstance(other, ViewportStateVideo): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_video.py b/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_video.py index 9ddc3448..e8bc7125 100644 --- a/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_video.py +++ b/ask-sdk-model/ask_sdk_model/interfaces/viewport/viewport_video.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.viewport.video.codecs import Codecs + from ask_sdk_model.interfaces.viewport.video.codecs import Codecs as Codecs_89738777 class ViewportVideo(object): @@ -45,7 +45,7 @@ class ViewportVideo(object): supports_multiple_types = False def __init__(self, codecs=None): - # type: (Optional[List[Codecs]]) -> None + # type: (Optional[List[Codecs_89738777]]) -> None """Details of the technologies which are available for playing video on the device. :param codecs: Codecs which are available for playing video on the device. diff --git a/ask-sdk-model/ask_sdk_model/launch_request.py b/ask-sdk-model/ask_sdk_model/launch_request.py index f464725b..b8ff96a6 100644 --- a/ask-sdk-model/ask_sdk_model/launch_request.py +++ b/ask-sdk-model/ask_sdk_model/launch_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.task import Task + from ask_sdk_model.task import Task as Task_8012f71e class LaunchRequest(Request): @@ -60,7 +60,7 @@ class LaunchRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, task=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[Task]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[Task_8012f71e]) -> None """Represents that a user made a request to an Alexa skill, but did not provide a specific intent. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/list_slot_value.py b/ask-sdk-model/ask_sdk_model/list_slot_value.py index 1d05c431..0e843779 100644 --- a/ask-sdk-model/ask_sdk_model/list_slot_value.py +++ b/ask-sdk-model/ask_sdk_model/list_slot_value.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.slot_value import SlotValue + from ask_sdk_model.slot_value import SlotValue as SlotValue_4725c8c5 class ListSlotValue(SlotValue): @@ -48,7 +48,7 @@ class ListSlotValue(SlotValue): supports_multiple_types = False def __init__(self, values=None): - # type: (Optional[List[SlotValue]]) -> None + # type: (Optional[List[SlotValue_4725c8c5]]) -> None """Slot value containing a list of other slot value objects. :param values: An array containing the values captured for this slot. diff --git a/ask-sdk-model/ask_sdk_model/permission_status.py b/ask-sdk-model/ask_sdk_model/permission_status.py index 731d73fc..4a2570e1 100644 --- a/ask-sdk-model/ask_sdk_model/permission_status.py +++ b/ask-sdk-model/ask_sdk_model/permission_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PermissionStatus(Enum): DENIED = "DENIED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PermissionStatus): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/permissions.py b/ask-sdk-model/ask_sdk_model/permissions.py index 8d5349f5..bd82722c 100644 --- a/ask-sdk-model/ask_sdk_model/permissions.py +++ b/ask-sdk-model/ask_sdk_model/permissions.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.scope import Scope + from ask_sdk_model.scope import Scope as Scope_ed061cca class Permissions(object): @@ -49,7 +49,7 @@ class Permissions(object): supports_multiple_types = False def __init__(self, consent_token=None, scopes=None): - # type: (Optional[str], Optional[Dict[str, Scope]]) -> None + # type: (Optional[str], Optional[Dict[str, Scope_ed061cca]]) -> None """Contains a consentToken allowing the skill access to information that the customer has consented to provide, such as address information. Note that the consentToken is deprecated. Use the apiAccessToken available in the context object to determine the user’s permissions. :param consent_token: A token listing all the permissions granted for this user. diff --git a/ask-sdk-model/ask_sdk_model/person.py b/ask-sdk-model/ask_sdk_model/person.py index 0e257a3e..fb2d8e4a 100644 --- a/ask-sdk-model/ask_sdk_model/person.py +++ b/ask-sdk-model/ask_sdk_model/person.py @@ -21,16 +21,16 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class Person(object): """ - An object that describes the user (person) who is making the request. + An object that describes the user (person) who is interacting with Alexa. - :param person_id: A string that represents a unique identifier for the person who is making the request. The length of this identifier can vary, but is never more than 255 characters. It is generated when a recognized user makes a request to your skill. + :param person_id: A string that represents a unique identifier for the person who is interacting with Alexa. The length of this identifier can vary, but is never more than 255 characters. It is generated when a recognized user makes a request to your skill. :type person_id: (optional) str :param access_token: A token identifying the user in another system. This is only provided if the recognized user has successfully linked their skill account with their Alexa profile. The accessToken field will not appear if null. :type access_token: (optional) str @@ -49,9 +49,9 @@ class Person(object): def __init__(self, person_id=None, access_token=None): # type: (Optional[str], Optional[str]) -> None - """An object that describes the user (person) who is making the request. + """An object that describes the user (person) who is interacting with Alexa. - :param person_id: A string that represents a unique identifier for the person who is making the request. The length of this identifier can vary, but is never more than 255 characters. It is generated when a recognized user makes a request to your skill. + :param person_id: A string that represents a unique identifier for the person who is interacting with Alexa. The length of this identifier can vary, but is never more than 255 characters. It is generated when a recognized user makes a request to your skill. :type person_id: (optional) str :param access_token: A token identifying the user in another system. This is only provided if the recognized user has successfully linked their skill account with their Alexa profile. The accessToken field will not appear if null. :type access_token: (optional) str diff --git a/ask-sdk-model/ask_sdk_model/request.py b/ask-sdk-model/ask_sdk_model/request.py index 8f7a711b..e02e345c 100644 --- a/ask-sdk-model/ask_sdk_model/request.py +++ b/ask-sdk-model/ask_sdk_model/request.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -45,6 +45,10 @@ class Request(object): This is an abstract class. Use the following mapping, to figure out the model class to be instantiated, that sets ``type`` variable. + | Alexa.Advertisement.AdNotRendered: :py:class:`ask_sdk_model.interfaces.alexa.advertisement.ad_not_rendered.AdNotRendered`, + | + | Alexa.DataStore.PackageManager.InstallationError: :py:class:`ask_sdk_model.interfaces.alexa.datastore.packagemanager.installation_error.InstallationError`, + | | AlexaSkillEvent.SkillEnabled: :py:class:`ask_sdk_model.events.skillevents.skill_enabled_request.SkillEnabledRequest`, | | AlexaHouseholdListEvent.ListUpdated: :py:class:`ask_sdk_model.services.list_management.list_updated_event_request.ListUpdatedEventRequest`, @@ -61,6 +65,8 @@ class Request(object): | | Alexa.Presentation.APL.LoadIndexListData: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.load_index_list_data_event.LoadIndexListDataEvent`, | + | Alexa.Presentation.APL.LoadTokenListData: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.load_token_list_data_event.LoadTokenListDataEvent`, + | | AudioPlayer.PlaybackFailed: :py:class:`ask_sdk_model.interfaces.audioplayer.playback_failed_request.PlaybackFailedRequest`, | | CanFulfillIntentRequest: :py:class:`ask_sdk_model.canfulfill.can_fulfill_intent_request.CanFulfillIntentRequest`, @@ -69,12 +75,18 @@ class Request(object): | | Alexa.Presentation.HTML.Message: :py:class:`ask_sdk_model.interfaces.alexa.presentation.html.message_request.MessageRequest`, | + | Alexa.DataStore.Error: :py:class:`ask_sdk_model.interfaces.alexa.datastore.data_store_error.DataStoreError`, + | | LaunchRequest: :py:class:`ask_sdk_model.launch_request.LaunchRequest`, | + | Alexa.Authorization.Grant: :py:class:`ask_sdk_model.authorization.authorization_grant_request.AuthorizationGrantRequest`, + | | Reminders.ReminderCreated: :py:class:`ask_sdk_model.services.reminder_management.reminder_created_event_request.ReminderCreatedEventRequest`, | | Alexa.Presentation.APLT.UserEvent: :py:class:`ask_sdk_model.interfaces.alexa.presentation.aplt.user_event.UserEvent`, | + | Alexa.Advertisement.ReadyToEnqueueAudio: :py:class:`ask_sdk_model.interfaces.alexa.advertisement.ready_to_enqueue_audio.ReadyToEnqueueAudio`, + | | AlexaHouseholdListEvent.ItemsUpdated: :py:class:`ask_sdk_model.services.list_management.list_items_updated_event_request.ListItemsUpdatedEventRequest`, | | AlexaHouseholdListEvent.ListCreated: :py:class:`ask_sdk_model.services.list_management.list_created_event_request.ListCreatedEventRequest`, @@ -111,6 +123,10 @@ class Request(object): | | Reminders.ReminderUpdated: :py:class:`ask_sdk_model.services.reminder_management.reminder_updated_event_request.ReminderUpdatedEventRequest`, | + | Alexa.Advertisement.AdCompleted: :py:class:`ask_sdk_model.interfaces.alexa.advertisement.ad_completed.AdCompleted`, + | + | Alexa.DataStore.PackageManager.UpdateRequest: :py:class:`ask_sdk_model.interfaces.alexa.datastore.packagemanager.update_request.UpdateRequest`, + | | Alexa.Presentation.APL.RuntimeError: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.runtime_error_event.RuntimeErrorEvent`, | | Alexa.Presentation.HTML.RuntimeError: :py:class:`ask_sdk_model.interfaces.alexa.presentation.html.runtime_error_request.RuntimeErrorRequest`, @@ -119,6 +135,10 @@ class Request(object): | | IntentRequest: :py:class:`ask_sdk_model.intent_request.IntentRequest`, | + | Alexa.DataStore.PackageManager.UsagesRemoved: :py:class:`ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_removed.UsagesRemoved`, + | + | AlexaSkillEvent.NotificationSubscriptionChanged: :py:class:`ask_sdk_model.events.skillevents.notification_subscription_changed_request.NotificationSubscriptionChangedRequest`, + | | Dialog.API.Invoked: :py:class:`ask_sdk_model.interfaces.conversations.api_invocation_request.APIInvocationRequest`, | | Reminders.ReminderStarted: :py:class:`ask_sdk_model.services.reminder_management.reminder_started_event_request.ReminderStartedEventRequest`, @@ -127,6 +147,8 @@ class Request(object): | | PlaybackController.PreviousCommandIssued: :py:class:`ask_sdk_model.interfaces.playbackcontroller.previous_command_issued_request.PreviousCommandIssuedRequest`, | + | Alexa.DataStore.PackageManager.UsagesInstalled: :py:class:`ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_installed.UsagesInstalled`, + | | AlexaSkillEvent.SkillAccountLinked: :py:class:`ask_sdk_model.events.skillevents.account_linked_request.AccountLinkedRequest`, | | Messaging.MessageReceived: :py:class:`ask_sdk_model.interfaces.messaging.message_received_request.MessageReceivedRequest`, @@ -137,7 +159,9 @@ class Request(object): | | AlexaSkillEvent.SkillPermissionAccepted: :py:class:`ask_sdk_model.events.skillevents.permission_accepted_request.PermissionAcceptedRequest`, | - | PlaybackController.NextCommandIssued: :py:class:`ask_sdk_model.interfaces.playbackcontroller.next_command_issued_request.NextCommandIssuedRequest` + | PlaybackController.NextCommandIssued: :py:class:`ask_sdk_model.interfaces.playbackcontroller.next_command_issued_request.NextCommandIssuedRequest`, + | + | Alexa.Presentation.APLA.RuntimeError: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apla.runtime_error_event.RuntimeErrorEvent` """ deserialized_types = { @@ -156,6 +180,8 @@ class Request(object): supports_multiple_types = False discriminator_value_class_map = { + 'Alexa.Advertisement.AdNotRendered': 'ask_sdk_model.interfaces.alexa.advertisement.ad_not_rendered.AdNotRendered', + 'Alexa.DataStore.PackageManager.InstallationError': 'ask_sdk_model.interfaces.alexa.datastore.packagemanager.installation_error.InstallationError', 'AlexaSkillEvent.SkillEnabled': 'ask_sdk_model.events.skillevents.skill_enabled_request.SkillEnabledRequest', 'AlexaHouseholdListEvent.ListUpdated': 'ask_sdk_model.services.list_management.list_updated_event_request.ListUpdatedEventRequest', 'Alexa.Presentation.APL.UserEvent': 'ask_sdk_model.interfaces.alexa.presentation.apl.user_event.UserEvent', @@ -164,13 +190,17 @@ class Request(object): 'SessionResumedRequest': 'ask_sdk_model.session_resumed_request.SessionResumedRequest', 'SessionEndedRequest': 'ask_sdk_model.session_ended_request.SessionEndedRequest', 'Alexa.Presentation.APL.LoadIndexListData': 'ask_sdk_model.interfaces.alexa.presentation.apl.load_index_list_data_event.LoadIndexListDataEvent', + 'Alexa.Presentation.APL.LoadTokenListData': 'ask_sdk_model.interfaces.alexa.presentation.apl.load_token_list_data_event.LoadTokenListDataEvent', 'AudioPlayer.PlaybackFailed': 'ask_sdk_model.interfaces.audioplayer.playback_failed_request.PlaybackFailedRequest', 'CanFulfillIntentRequest': 'ask_sdk_model.canfulfill.can_fulfill_intent_request.CanFulfillIntentRequest', 'CustomInterfaceController.Expired': 'ask_sdk_model.interfaces.custom_interface_controller.expired_request.ExpiredRequest', 'Alexa.Presentation.HTML.Message': 'ask_sdk_model.interfaces.alexa.presentation.html.message_request.MessageRequest', + 'Alexa.DataStore.Error': 'ask_sdk_model.interfaces.alexa.datastore.data_store_error.DataStoreError', 'LaunchRequest': 'ask_sdk_model.launch_request.LaunchRequest', + 'Alexa.Authorization.Grant': 'ask_sdk_model.authorization.authorization_grant_request.AuthorizationGrantRequest', 'Reminders.ReminderCreated': 'ask_sdk_model.services.reminder_management.reminder_created_event_request.ReminderCreatedEventRequest', 'Alexa.Presentation.APLT.UserEvent': 'ask_sdk_model.interfaces.alexa.presentation.aplt.user_event.UserEvent', + 'Alexa.Advertisement.ReadyToEnqueueAudio': 'ask_sdk_model.interfaces.alexa.advertisement.ready_to_enqueue_audio.ReadyToEnqueueAudio', 'AlexaHouseholdListEvent.ItemsUpdated': 'ask_sdk_model.services.list_management.list_items_updated_event_request.ListItemsUpdatedEventRequest', 'AlexaHouseholdListEvent.ListCreated': 'ask_sdk_model.services.list_management.list_created_event_request.ListCreatedEventRequest', 'AudioPlayer.PlaybackStarted': 'ask_sdk_model.interfaces.audioplayer.playback_started_request.PlaybackStartedRequest', @@ -189,20 +219,26 @@ class Request(object): 'Display.ElementSelected': 'ask_sdk_model.interfaces.display.element_selected_request.ElementSelectedRequest', 'AlexaSkillEvent.SkillPermissionChanged': 'ask_sdk_model.events.skillevents.permission_changed_request.PermissionChangedRequest', 'Reminders.ReminderUpdated': 'ask_sdk_model.services.reminder_management.reminder_updated_event_request.ReminderUpdatedEventRequest', + 'Alexa.Advertisement.AdCompleted': 'ask_sdk_model.interfaces.alexa.advertisement.ad_completed.AdCompleted', + 'Alexa.DataStore.PackageManager.UpdateRequest': 'ask_sdk_model.interfaces.alexa.datastore.packagemanager.update_request.UpdateRequest', 'Alexa.Presentation.APL.RuntimeError': 'ask_sdk_model.interfaces.alexa.presentation.apl.runtime_error_event.RuntimeErrorEvent', 'Alexa.Presentation.HTML.RuntimeError': 'ask_sdk_model.interfaces.alexa.presentation.html.runtime_error_request.RuntimeErrorRequest', 'Dialog.InputRequest': 'ask_sdk_model.dialog.input_request.InputRequest', 'IntentRequest': 'ask_sdk_model.intent_request.IntentRequest', + 'Alexa.DataStore.PackageManager.UsagesRemoved': 'ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_removed.UsagesRemoved', + 'AlexaSkillEvent.NotificationSubscriptionChanged': 'ask_sdk_model.events.skillevents.notification_subscription_changed_request.NotificationSubscriptionChangedRequest', 'Dialog.API.Invoked': 'ask_sdk_model.interfaces.conversations.api_invocation_request.APIInvocationRequest', 'Reminders.ReminderStarted': 'ask_sdk_model.services.reminder_management.reminder_started_event_request.ReminderStartedEventRequest', 'AudioPlayer.PlaybackStopped': 'ask_sdk_model.interfaces.audioplayer.playback_stopped_request.PlaybackStoppedRequest', 'PlaybackController.PreviousCommandIssued': 'ask_sdk_model.interfaces.playbackcontroller.previous_command_issued_request.PreviousCommandIssuedRequest', + 'Alexa.DataStore.PackageManager.UsagesInstalled': 'ask_sdk_model.interfaces.alexa.datastore.packagemanager.usages_installed.UsagesInstalled', 'AlexaSkillEvent.SkillAccountLinked': 'ask_sdk_model.events.skillevents.account_linked_request.AccountLinkedRequest', 'Messaging.MessageReceived': 'ask_sdk_model.interfaces.messaging.message_received_request.MessageReceivedRequest', 'Connections.Request': 'ask_sdk_model.interfaces.connections.connections_request.ConnectionsRequest', 'System.ExceptionEncountered': 'ask_sdk_model.interfaces.system.exception_encountered_request.ExceptionEncounteredRequest', 'AlexaSkillEvent.SkillPermissionAccepted': 'ask_sdk_model.events.skillevents.permission_accepted_request.PermissionAcceptedRequest', - 'PlaybackController.NextCommandIssued': 'ask_sdk_model.interfaces.playbackcontroller.next_command_issued_request.NextCommandIssuedRequest' + 'PlaybackController.NextCommandIssued': 'ask_sdk_model.interfaces.playbackcontroller.next_command_issued_request.NextCommandIssuedRequest', + 'Alexa.Presentation.APLA.RuntimeError': 'ask_sdk_model.interfaces.alexa.presentation.apla.runtime_error_event.RuntimeErrorEvent' } json_discriminator_key = "type" diff --git a/ask-sdk-model/ask_sdk_model/request_envelope.py b/ask-sdk-model/ask_sdk_model/request_envelope.py index e54643b5..84a6de30 100644 --- a/ask-sdk-model/ask_sdk_model/request_envelope.py +++ b/ask-sdk-model/ask_sdk_model/request_envelope.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.session import Session - from ask_sdk_model.request import Request - from ask_sdk_model.context import Context + from ask_sdk_model.request import Request as Request_601a68c0 + from ask_sdk_model.context import Context as Context_d885cf00 + from ask_sdk_model.session import Session as Session_c56c91ce class RequestEnvelope(object): @@ -59,7 +59,7 @@ class RequestEnvelope(object): supports_multiple_types = False def __init__(self, version=None, session=None, context=None, request=None): - # type: (Optional[str], Optional[Session], Optional[Context], Optional[Request]) -> None + # type: (Optional[str], Optional[Session_c56c91ce], Optional[Context_d885cf00], Optional[Request_601a68c0]) -> None """Request wrapper for all requests sent to your Skill. :param version: The version specifier for the request. diff --git a/ask-sdk-model/ask_sdk_model/response.py b/ask-sdk-model/ask_sdk_model/response.py index 969a2856..9cbff4ff 100644 --- a/ask-sdk-model/ask_sdk_model/response.py +++ b/ask-sdk-model/ask_sdk_model/response.py @@ -21,13 +21,14 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.canfulfill.can_fulfill_intent import CanFulfillIntent - from ask_sdk_model.ui.card import Card - from ask_sdk_model.ui.output_speech import OutputSpeech - from ask_sdk_model.directive import Directive - from ask_sdk_model.ui.reprompt import Reprompt + from ask_sdk_model.ui.reprompt import Reprompt as Reprompt_ffee6ea4 + from ask_sdk_model.directive import Directive as Directive_e3e6b000 + from ask_sdk_model.interfaces.alexa.experimentation.experiment_trigger_response import ExperimentTriggerResponse as ExperimentTriggerResponse_5daea3f3 + from ask_sdk_model.canfulfill.can_fulfill_intent import CanFulfillIntent as CanFulfillIntent_8d777e62 + from ask_sdk_model.ui.output_speech import OutputSpeech as OutputSpeech_a070f8fb + from ask_sdk_model.ui.card import Card as Card_3a03f3c4 class Response(object): @@ -47,6 +48,8 @@ class Response(object): :type should_end_session: (optional) bool :param can_fulfill_intent: :type can_fulfill_intent: (optional) ask_sdk_model.canfulfill.can_fulfill_intent.CanFulfillIntent + :param experimentation: Experiment trigger response from skill + :type experimentation: (optional) ask_sdk_model.interfaces.alexa.experimentation.experiment_trigger_response.ExperimentTriggerResponse """ deserialized_types = { @@ -56,7 +59,8 @@ class Response(object): 'directives': 'list[ask_sdk_model.directive.Directive]', 'api_response': 'object', 'should_end_session': 'bool', - 'can_fulfill_intent': 'ask_sdk_model.canfulfill.can_fulfill_intent.CanFulfillIntent' + 'can_fulfill_intent': 'ask_sdk_model.canfulfill.can_fulfill_intent.CanFulfillIntent', + 'experimentation': 'ask_sdk_model.interfaces.alexa.experimentation.experiment_trigger_response.ExperimentTriggerResponse' } # type: Dict attribute_map = { @@ -66,12 +70,13 @@ class Response(object): 'directives': 'directives', 'api_response': 'apiResponse', 'should_end_session': 'shouldEndSession', - 'can_fulfill_intent': 'canFulfillIntent' + 'can_fulfill_intent': 'canFulfillIntent', + 'experimentation': 'experimentation' } # type: Dict supports_multiple_types = False - def __init__(self, output_speech=None, card=None, reprompt=None, directives=None, api_response=None, should_end_session=None, can_fulfill_intent=None): - # type: (Optional[OutputSpeech], Optional[Card], Optional[Reprompt], Optional[List[Directive]], Optional[object], Optional[bool], Optional[CanFulfillIntent]) -> None + def __init__(self, output_speech=None, card=None, reprompt=None, directives=None, api_response=None, should_end_session=None, can_fulfill_intent=None, experimentation=None): + # type: (Optional[OutputSpeech_a070f8fb], Optional[Card_3a03f3c4], Optional[Reprompt_ffee6ea4], Optional[List[Directive_e3e6b000]], Optional[object], Optional[bool], Optional[CanFulfillIntent_8d777e62], Optional[ExperimentTriggerResponse_5daea3f3]) -> None """ :param output_speech: @@ -88,6 +93,8 @@ def __init__(self, output_speech=None, card=None, reprompt=None, directives=None :type should_end_session: (optional) bool :param can_fulfill_intent: :type can_fulfill_intent: (optional) ask_sdk_model.canfulfill.can_fulfill_intent.CanFulfillIntent + :param experimentation: Experiment trigger response from skill + :type experimentation: (optional) ask_sdk_model.interfaces.alexa.experimentation.experiment_trigger_response.ExperimentTriggerResponse """ self.__discriminator_value = None # type: str @@ -98,6 +105,7 @@ def __init__(self, output_speech=None, card=None, reprompt=None, directives=None self.api_response = api_response self.should_end_session = should_end_session self.can_fulfill_intent = can_fulfill_intent + self.experimentation = experimentation def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-sdk-model/ask_sdk_model/response_envelope.py b/ask-sdk-model/ask_sdk_model/response_envelope.py index e513cca0..3c713eee 100644 --- a/ask-sdk-model/ask_sdk_model/response_envelope.py +++ b/ask-sdk-model/ask_sdk_model/response_envelope.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.response import Response + from ask_sdk_model.response import Response as Response_121c7e1e class ResponseEnvelope(object): @@ -55,7 +55,7 @@ class ResponseEnvelope(object): supports_multiple_types = False def __init__(self, version=None, session_attributes=None, user_agent=None, response=None): - # type: (Optional[str], Optional[Dict[str, object]], Optional[str], Optional[Response]) -> None + # type: (Optional[str], Optional[Dict[str, object]], Optional[str], Optional[Response_121c7e1e]) -> None """ :param version: diff --git a/ask-sdk-model/ask_sdk_model/scope.py b/ask-sdk-model/ask_sdk_model/scope.py index 53caf660..e077f40c 100644 --- a/ask-sdk-model/ask_sdk_model/scope.py +++ b/ask-sdk-model/ask_sdk_model/scope.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.permission_status import PermissionStatus + from ask_sdk_model.permission_status import PermissionStatus as PermissionStatus_ea4afa1d class Scope(object): @@ -45,7 +45,7 @@ class Scope(object): supports_multiple_types = False def __init__(self, status=None): - # type: (Optional[PermissionStatus]) -> None + # type: (Optional[PermissionStatus_ea4afa1d]) -> None """This is the value of LoginWithAmazon(LWA) consent scope. This object is used as in the key-value pairs that are provided in user.permissions.scopes object :param status: diff --git a/ask-sdk-model/ask_sdk_model/services/__init__.py b/ask-sdk-model/ask_sdk_model/services/__init__.py index 69ed7866..916b205e 100644 --- a/ask-sdk-model/ask_sdk_model/services/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/__init__.py @@ -15,14 +15,14 @@ from __future__ import absolute_import from .base_service_client import BaseServiceClient -from .api_response import ApiResponse -from .api_client_response import ApiClientResponse -from .service_client_factory import ServiceClientFactory -from .api_client import ApiClient -from .serializer import Serializer from .api_configuration import ApiConfiguration +from .api_response import ApiResponse from .service_client_response import ServiceClientResponse +from .api_client import ApiClient +from .service_client_factory import ServiceClientFactory +from .api_client_response import ApiClientResponse from .service_exception import ServiceException -from .api_client_request import ApiClientRequest +from .serializer import Serializer from .api_client_message import ApiClientMessage from .authentication_configuration import AuthenticationConfiguration +from .api_client_request import ApiClientRequest diff --git a/ask-sdk-model/ask_sdk_model/services/datastore/__init__.py b/ask-sdk-model/ask_sdk_model/services/datastore/__init__.py new file mode 100644 index 00000000..051cfa27 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/__init__.py @@ -0,0 +1,17 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + +from .datastore_service_client import DatastoreServiceClient diff --git a/ask-sdk-model/ask_sdk_model/services/datastore/datastore_service_client.py b/ask-sdk-model/ask_sdk_model/services/datastore/datastore_service_client.py new file mode 100644 index 00000000..5881f39f --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/datastore_service_client.py @@ -0,0 +1,299 @@ +# 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 sys +import os +import re +import six +import typing + +from ask_sdk_model.services.base_service_client import BaseServiceClient +from ask_sdk_model.services.api_configuration import ApiConfiguration +from ask_sdk_model.services.service_client_response import ServiceClientResponse +from ask_sdk_model.services.api_response import ApiResponse +from ask_sdk_model.services.utils import user_agent_info + +from ask_sdk_model.services.authentication_configuration import AuthenticationConfiguration +from ask_sdk_model.services.lwa.lwa_client import LwaClient + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Union, Any + from datetime import datetime + from ask_sdk_model.services.datastore.v1.commands_request_error import CommandsRequestError as CommandsRequestError_c6945312 + from ask_sdk_model.services.datastore.v1.commands_response import CommandsResponse as CommandsResponse_271f32fb + from ask_sdk_model.services.datastore.v1.queued_result_response import QueuedResultResponse as QueuedResultResponse_806720cc + from ask_sdk_model.services.datastore.v1.cancel_commands_request_error import CancelCommandsRequestError as CancelCommandsRequestError_26f4d59f + from ask_sdk_model.services.datastore.v1.commands_request import CommandsRequest as CommandsRequest_4046908d + from ask_sdk_model.services.datastore.v1.queued_result_request_error import QueuedResultRequestError as QueuedResultRequestError_fc34ffb1 + + +class DatastoreServiceClient(BaseServiceClient): + """ServiceClient for calling the DatastoreService APIs. + + :param api_configuration: Instance of ApiConfiguration + :type api_configuration: ask_sdk_model.services.api_configuration.ApiConfiguration + """ + def __init__(self, api_configuration, authentication_configuration, lwa_client=None, custom_user_agent=None): + # type: (ApiConfiguration, AuthenticationConfiguration, LwaClient, str) -> None + """ + :param api_configuration: Instance of :py:class:`ask_sdk_model.services.api_configuration.ApiConfiguration` + :type api_configuration: ask_sdk_model.services.api_configuration.ApiConfiguration + :param authentication_configuration: Instance of :py:class:`ask_sdk_model.services.authentication_configuration.AuthenticationConfiguration` + :type api_configuration: ask_sdk_model.services.authentication_configuration.AuthenticationConfiguration + :param lwa_client: (Optional) Instance of :py:class:`ask_sdk_model.services.lwa.LwaClient`, + can be passed when the LwaClient configuration is different from the authentication + and api configuration passed + :type lwa_client: ask_sdk_model.services.lwa.LwaClient + :param custom_user_agent: Custom User Agent string provided by the developer. + :type custom_user_agent: str + """ + super(DatastoreServiceClient, self).__init__(api_configuration) + self.user_agent = user_agent_info(sdk_version="1.0.0", custom_user_agent=custom_user_agent) + + if lwa_client is None: + self._lwa_service_client = LwaClient( + api_configuration=ApiConfiguration( + serializer=api_configuration.serializer, + api_client=api_configuration.api_client), + authentication_configuration=authentication_configuration, + grant_type=None) + else: + self._lwa_service_client = lwa_client + + def commands_v1(self, commands_request, **kwargs): + # type: (CommandsRequest_4046908d, **Any) -> Union[ApiResponse, object, CommandsResponse_271f32fb, CommandsRequestError_c6945312] + """ + Send DataStore commands to Alexa device. + + :param commands_request: (required) + :type commands_request: ask_sdk_model.services.datastore.v1.commands_request.CommandsRequest + :param full_response: Boolean value to check if response should contain headers and status code information. + This value had to be passed through keyword arguments, by default the parameter value is set to False. + :type full_response: boolean + :rtype: Union[ApiResponse, object, CommandsResponse_271f32fb, CommandsRequestError_c6945312] + """ + operation_name = "commands_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'commands_request' is set + if ('commands_request' not in params) or (params['commands_request'] is None): + raise ValueError( + "Missing the required parameter `commands_request` when calling `" + operation_name + "`") + + resource_path = '/v1/datastore/commands' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'commands_request' in params: + body_params = params['commands_request'] + header_params.append(('Content-type', 'application/json')) + header_params.append(('User-Agent', self.user_agent)) + + # Response Type + full_response = False + if 'full_response' in params: + full_response = params['full_response'] + + # Authentication setting + access_token = self._lwa_service_client.get_access_token_for_scope( + "alexa::datastore") + authorization_value = "Bearer " + access_token + header_params.append(('Authorization', authorization_value)) + + error_definitions = [] # type: List + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.commands_response.CommandsResponse", status_code=200, message="Multiple CommandsDispatchResults in response.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.commands_request_error.CommandsRequestError", status_code=400, message="Request validation fails.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.commands_request_error.CommandsRequestError", status_code=401, message="Not Authorized.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.commands_request_error.CommandsRequestError", status_code=403, message="The skill is not allowed to execute commands.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.commands_request_error.CommandsRequestError", status_code=429, message="The client has made more calls than the allowed limit.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.commands_request_error.CommandsRequestError", status_code=0, message="Unexpected error.")) + + api_response = self.invoke( + method="POST", + endpoint=self._api_endpoint, + path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + response_definitions=error_definitions, + response_type="ask_sdk_model.services.datastore.v1.commands_response.CommandsResponse") + + if full_response: + return api_response + return api_response.body + + + def cancel_commands_v1(self, queued_result_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, CancelCommandsRequestError_26f4d59f] + """ + Cancel pending DataStore commands. + + :param queued_result_id: (required) A unique identifier to query result for queued delivery for offline devices (DEVICE_UNAVAILABLE). + :type queued_result_id: str + :param full_response: Boolean value to check if response should contain headers and status code information. + This value had to be passed through keyword arguments, by default the parameter value is set to False. + :type full_response: boolean + :rtype: Union[ApiResponse, object, CancelCommandsRequestError_26f4d59f] + """ + operation_name = "cancel_commands_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'queued_result_id' is set + if ('queued_result_id' not in params) or (params['queued_result_id'] is None): + raise ValueError( + "Missing the required parameter `queued_result_id` when calling `" + operation_name + "`") + + resource_path = '/v1/datastore/queue/{queuedResultId}/cancel' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'queued_result_id' in params: + path_params['queuedResultId'] = params['queued_result_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + header_params.append(('User-Agent', self.user_agent)) + + # Response Type + full_response = False + if 'full_response' in params: + full_response = params['full_response'] + + # Authentication setting + access_token = self._lwa_service_client.get_access_token_for_scope( + "alexa::datastore") + authorization_value = "Bearer " + access_token + header_params.append(('Authorization', authorization_value)) + + error_definitions = [] # type: List + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.cancel_commands_request_error.CancelCommandsRequestError", status_code=400, message="Request validation fails.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.cancel_commands_request_error.CancelCommandsRequestError", status_code=401, message="Not Authorized.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.cancel_commands_request_error.CancelCommandsRequestError", status_code=403, message="The skill is not allowed to call this API commands.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.cancel_commands_request_error.CancelCommandsRequestError", status_code=404, message="Unable to find the pending request.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.cancel_commands_request_error.CancelCommandsRequestError", status_code=429, message="The client has made more calls than the allowed limit.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.cancel_commands_request_error.CancelCommandsRequestError", status_code=0, message="Unexpected error.")) + + api_response = self.invoke( + method="POST", + endpoint=self._api_endpoint, + path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + response_definitions=error_definitions, + response_type=None) + + if full_response: + return api_response + + return None + + def queued_result_v1(self, queued_result_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, QueuedResultResponse_806720cc, QueuedResultRequestError_fc34ffb1] + """ + Query statuses of deliveries to offline devices returned by commands API. + + :param queued_result_id: (required) A unique identifier to query result for queued delivery for offline devices (DEVICE_UNAVAILABLE). + :type queued_result_id: str + :param max_results: Maximum number of CommandsDispatchResult items to return. + :type max_results: int + :param next_token: The value of nextToken in the response to fetch next page. If not specified, the request fetches result for the first page. + :type next_token: str + :param full_response: Boolean value to check if response should contain headers and status code information. + This value had to be passed through keyword arguments, by default the parameter value is set to False. + :type full_response: boolean + :rtype: Union[ApiResponse, object, QueuedResultResponse_806720cc, QueuedResultRequestError_fc34ffb1] + """ + operation_name = "queued_result_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'queued_result_id' is set + if ('queued_result_id' not in params) or (params['queued_result_id'] is None): + raise ValueError( + "Missing the required parameter `queued_result_id` when calling `" + operation_name + "`") + + resource_path = '/v1/datastore/queue/{queuedResultId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'queued_result_id' in params: + path_params['queuedResultId'] = params['queued_result_id'] + + query_params = [] # type: List + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + header_params.append(('User-Agent', self.user_agent)) + + # Response Type + full_response = False + if 'full_response' in params: + full_response = params['full_response'] + + # Authentication setting + access_token = self._lwa_service_client.get_access_token_for_scope( + "alexa::datastore") + authorization_value = "Bearer " + access_token + header_params.append(('Authorization', authorization_value)) + + error_definitions = [] # type: List + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.queued_result_response.QueuedResultResponse", status_code=200, message="Unordered array of CommandsDispatchResult and pagination details.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.queued_result_request_error.QueuedResultRequestError", status_code=400, message="Request validation fails.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.queued_result_request_error.QueuedResultRequestError", status_code=401, message="Not Authorized.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.queued_result_request_error.QueuedResultRequestError", status_code=403, message="The skill is not allowed to call this API commands.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.queued_result_request_error.QueuedResultRequestError", status_code=429, message="The client has made more calls than the allowed limit.")) + error_definitions.append(ServiceClientResponse(response_type="ask_sdk_model.services.datastore.v1.queued_result_request_error.QueuedResultRequestError", status_code=0, message="Unexpected error.")) + + api_response = self.invoke( + method="GET", + endpoint=self._api_endpoint, + path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + response_definitions=error_definitions, + response_type="ask_sdk_model.services.datastore.v1.queued_result_response.QueuedResultResponse") + + if full_response: + return api_response + return api_response.body + diff --git a/ask-sdk-model/ask_sdk_model/services/datastore/py.typed b/ask-sdk-model/ask_sdk_model/services/datastore/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-sdk-model/ask_sdk_model/services/datastore/v1/__init__.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/__init__.py new file mode 100644 index 00000000..90d14c1a --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/__init__.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +# +# Copyright 2018 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. +# +from __future__ import absolute_import + +from .cancel_commands_request_error_type import CancelCommandsRequestErrorType +from .put_object_command import PutObjectCommand +from .commands_request_error import CommandsRequestError +from .put_namespace_command import PutNamespaceCommand +from .commands_request import CommandsRequest +from .commands_response import CommandsResponse +from .command import Command +from .remove_namespace_command import RemoveNamespaceCommand +from .queued_result_request_error import QueuedResultRequestError +from .remove_object_command import RemoveObjectCommand +from .target import Target +from .commands_dispatch_result import CommandsDispatchResult +from .clear_command import ClearCommand +from .queued_result_request_error_type import QueuedResultRequestErrorType +from .cancel_commands_request_error import CancelCommandsRequestError +from .queued_result_response import QueuedResultResponse +from .devices import Devices +from .commands_request_error_type import CommandsRequestErrorType +from .response_pagination_context import ResponsePaginationContext +from .user import User +from .dispatch_result_type import DispatchResultType diff --git a/ask-sdk-model/ask_sdk_model/services/datastore/v1/cancel_commands_request_error.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/cancel_commands_request_error.py new file mode 100644 index 00000000..60cbf5a7 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/cancel_commands_request_error.py @@ -0,0 +1,114 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.services.datastore.v1.cancel_commands_request_error_type import CancelCommandsRequestErrorType as CancelCommandsRequestErrorType_ac0fce54 + + +class CancelCommandsRequestError(object): + """ + + :param object_type: + :type object_type: (optional) ask_sdk_model.services.datastore.v1.cancel_commands_request_error_type.CancelCommandsRequestErrorType + :param message: Descriptive error message. + :type message: (optional) str + + """ + deserialized_types = { + 'object_type': 'ask_sdk_model.services.datastore.v1.cancel_commands_request_error_type.CancelCommandsRequestErrorType', + 'message': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'message': 'message' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, message=None): + # type: (Optional[CancelCommandsRequestErrorType_ac0fce54], Optional[str]) -> None + """ + + :param object_type: + :type object_type: (optional) ask_sdk_model.services.datastore.v1.cancel_commands_request_error_type.CancelCommandsRequestErrorType + :param message: Descriptive error message. + :type message: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.message = message + + 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, CancelCommandsRequestError): + 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/services/datastore/v1/cancel_commands_request_error_type.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/cancel_commands_request_error_type.py new file mode 100644 index 00000000..8ec0319d --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/cancel_commands_request_error_type.py @@ -0,0 +1,71 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class CancelCommandsRequestErrorType(Enum): + """ + Error code of the response. * `COMMANDS_DELIVERED` - The pending commands have been delivered. * `CONCURRENCY_ERROR` - There are concurrent attempts to deliver the pending commands. * `NOT_FOUND` - Unable to find pending request for the given queuedResultId. * `INVALID_ACCESS_TOKEN` - Access token is expire or invalid. * `DATASTORE_SUPPORT_REQUIRED` - Client has not opted into DataStore interface in skill manifest. * `TOO_MANY_REQUESTS` - The request has been throttled because client has exceed maximum allowed request rate. * `DATASTORE_UNAVAILABLE` - Internal service error. + + + + Allowed enum values: [COMMANDS_DELIVERED, CONCURRENCY_ERROR, NOT_FOUND, INVALID_ACCESS_TOKEN, DATASTORE_SUPPORT_REQUIRED, TOO_MANY_REQUESTS, DATASTORE_UNAVAILABLE] + """ + COMMANDS_DELIVERED = "COMMANDS_DELIVERED" + CONCURRENCY_ERROR = "CONCURRENCY_ERROR" + NOT_FOUND = "NOT_FOUND" + INVALID_ACCESS_TOKEN = "INVALID_ACCESS_TOKEN" + DATASTORE_SUPPORT_REQUIRED = "DATASTORE_SUPPORT_REQUIRED" + TOO_MANY_REQUESTS = "TOO_MANY_REQUESTS" + DATASTORE_UNAVAILABLE = "DATASTORE_UNAVAILABLE" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, CancelCommandsRequestErrorType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/datastore/v1/clear_command.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/clear_command.py new file mode 100644 index 00000000..58bc67d6 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/clear_command.py @@ -0,0 +1,106 @@ +# 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.services.datastore.v1.command import Command + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ClearCommand(Command): + """ + Remove all existing data in skill's DataStore. + + + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """Remove all existing data in skill's DataStore. + + """ + self.__discriminator_value = "CLEAR" # type: str + + self.object_type = self.__discriminator_value + super(ClearCommand, self).__init__(object_type=self.__discriminator_value) + + 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, ClearCommand): + 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/services/datastore/v1/command.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/command.py new file mode 100644 index 00000000..5d00e913 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/command.py @@ -0,0 +1,144 @@ +# 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 abc import ABCMeta, abstractmethod + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Command(object): + """ + DataStore command which will run in DataStore. + + + :param object_type: The type of the component. Allowed values are * `PUT_OBJECT` - Creates or updates an object. * `PUT_NAMESPACE` - Creates a new namespace. If the namespace already exists, the command succeeds without any change. * `REMOVE_OBJECT` - Deletes an existing object. If the object doesn't exist, this command succeeds without any change. * `REMOVE_NAMESPACE` - Deletes an existing namespace. If the namespace doesn't exist, this command succeeds without any change. * `CLEAR` - Remove all existing data in skill's DataStore. + :type object_type: (optional) str + + .. note:: + + This is an abstract class. Use the following mapping, to figure out + the model class to be instantiated, that sets ``type`` variable. + + | REMOVE_NAMESPACE: :py:class:`ask_sdk_model.services.datastore.v1.remove_namespace_command.RemoveNamespaceCommand`, + | + | REMOVE_OBJECT: :py:class:`ask_sdk_model.services.datastore.v1.remove_object_command.RemoveObjectCommand`, + | + | PUT_OBJECT: :py:class:`ask_sdk_model.services.datastore.v1.put_object_command.PutObjectCommand`, + | + | CLEAR: :py:class:`ask_sdk_model.services.datastore.v1.clear_command.ClearCommand`, + | + | PUT_NAMESPACE: :py:class:`ask_sdk_model.services.datastore.v1.put_namespace_command.PutNamespaceCommand` + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'REMOVE_NAMESPACE': 'ask_sdk_model.services.datastore.v1.remove_namespace_command.RemoveNamespaceCommand', + 'REMOVE_OBJECT': 'ask_sdk_model.services.datastore.v1.remove_object_command.RemoveObjectCommand', + 'PUT_OBJECT': 'ask_sdk_model.services.datastore.v1.put_object_command.PutObjectCommand', + 'CLEAR': 'ask_sdk_model.services.datastore.v1.clear_command.ClearCommand', + 'PUT_NAMESPACE': 'ask_sdk_model.services.datastore.v1.put_namespace_command.PutNamespaceCommand' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None): + # type: (Optional[str]) -> None + """DataStore command which will run in DataStore. + + :param object_type: The type of the component. Allowed values are * `PUT_OBJECT` - Creates or updates an object. * `PUT_NAMESPACE` - Creates a new namespace. If the namespace already exists, the command succeeds without any change. * `REMOVE_OBJECT` - Deletes an existing object. If the object doesn't exist, this command succeeds without any change. * `REMOVE_NAMESPACE` - Deletes an existing namespace. If the namespace doesn't exist, this command succeeds without any change. * `CLEAR` - Remove all existing data in skill's DataStore. + :type object_type: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + + @classmethod + def get_real_child_model(cls, data): + # type: (Dict[str, str]) -> Optional[str] + """Returns the real base class specified by the discriminator""" + discriminator_value = data[cls.json_discriminator_key] + return cls.discriminator_value_class_map.get(discriminator_value) + + 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, Command): + 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/services/datastore/v1/commands_dispatch_result.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/commands_dispatch_result.py new file mode 100644 index 00000000..1036647e --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/commands_dispatch_result.py @@ -0,0 +1,121 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.services.datastore.v1.dispatch_result_type import DispatchResultType as DispatchResultType_c649ef4c + + +class CommandsDispatchResult(object): + """ + + :param device_id: identifier of a device. + :type device_id: (optional) str + :param object_type: + :type object_type: (optional) ask_sdk_model.services.datastore.v1.dispatch_result_type.DispatchResultType + :param message: Opaque description of the error. + :type message: (optional) str + + """ + deserialized_types = { + 'device_id': 'str', + 'object_type': 'ask_sdk_model.services.datastore.v1.dispatch_result_type.DispatchResultType', + 'message': 'str' + } # type: Dict + + attribute_map = { + 'device_id': 'deviceId', + 'object_type': 'type', + 'message': 'message' + } # type: Dict + supports_multiple_types = False + + def __init__(self, device_id=None, object_type=None, message=None): + # type: (Optional[str], Optional[DispatchResultType_c649ef4c], Optional[str]) -> None + """ + + :param device_id: identifier of a device. + :type device_id: (optional) str + :param object_type: + :type object_type: (optional) ask_sdk_model.services.datastore.v1.dispatch_result_type.DispatchResultType + :param message: Opaque description of the error. + :type message: (optional) str + """ + self.__discriminator_value = None # type: str + + self.device_id = device_id + self.object_type = object_type + self.message = message + + 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, CommandsDispatchResult): + 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/services/datastore/v1/commands_request.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/commands_request.py new file mode 100644 index 00000000..54d6cf11 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/commands_request.py @@ -0,0 +1,122 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.services.datastore.v1.command import Command as Command_6778502c + from ask_sdk_model.services.datastore.v1.target import Target as Target_ae761a52 + + +class CommandsRequest(object): + """ + + :param commands: Collection of ordered commands which needs to be executed in DataStore. + :type commands: (optional) list[ask_sdk_model.services.datastore.v1.command.Command] + :param target: Target where update needs to be published. + :type target: (optional) ask_sdk_model.services.datastore.v1.target.Target + :param attempt_delivery_until: Date and time, in ISO-8601 representation, when to halt the attempt to deliver the commands. + :type attempt_delivery_until: (optional) str + + """ + deserialized_types = { + 'commands': 'list[ask_sdk_model.services.datastore.v1.command.Command]', + 'target': 'ask_sdk_model.services.datastore.v1.target.Target', + 'attempt_delivery_until': 'str' + } # type: Dict + + attribute_map = { + 'commands': 'commands', + 'target': 'target', + 'attempt_delivery_until': 'attemptDeliveryUntil' + } # type: Dict + supports_multiple_types = False + + def __init__(self, commands=None, target=None, attempt_delivery_until=None): + # type: (Optional[List[Command_6778502c]], Optional[Target_ae761a52], Optional[str]) -> None + """ + + :param commands: Collection of ordered commands which needs to be executed in DataStore. + :type commands: (optional) list[ask_sdk_model.services.datastore.v1.command.Command] + :param target: Target where update needs to be published. + :type target: (optional) ask_sdk_model.services.datastore.v1.target.Target + :param attempt_delivery_until: Date and time, in ISO-8601 representation, when to halt the attempt to deliver the commands. + :type attempt_delivery_until: (optional) str + """ + self.__discriminator_value = None # type: str + + self.commands = commands + self.target = target + self.attempt_delivery_until = attempt_delivery_until + + 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, CommandsRequest): + 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/services/datastore/v1/commands_request_error.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/commands_request_error.py new file mode 100644 index 00000000..9d759054 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/commands_request_error.py @@ -0,0 +1,114 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.services.datastore.v1.commands_request_error_type import CommandsRequestErrorType as CommandsRequestErrorType_1bf5bf8d + + +class CommandsRequestError(object): + """ + + :param object_type: + :type object_type: (optional) ask_sdk_model.services.datastore.v1.commands_request_error_type.CommandsRequestErrorType + :param message: Descriptive error message. + :type message: (optional) str + + """ + deserialized_types = { + 'object_type': 'ask_sdk_model.services.datastore.v1.commands_request_error_type.CommandsRequestErrorType', + 'message': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'message': 'message' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, message=None): + # type: (Optional[CommandsRequestErrorType_1bf5bf8d], Optional[str]) -> None + """ + + :param object_type: + :type object_type: (optional) ask_sdk_model.services.datastore.v1.commands_request_error_type.CommandsRequestErrorType + :param message: Descriptive error message. + :type message: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.message = message + + 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, CommandsRequestError): + 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/services/datastore/v1/commands_request_error_type.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/commands_request_error_type.py new file mode 100644 index 00000000..89f14bb3 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/commands_request_error_type.py @@ -0,0 +1,72 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class CommandsRequestErrorType(Enum): + """ + Error code of the response. * `COMMANDS_PAYLOAD_EXCEEDS_LIMIT` - The total size of commands cannot exceed maximum size in UTF-encoding. * `TOO_MANY_TARGETS` - Number of target exceeds limits. * `NO_TARGET_DEFINED` - There is no target defined. * `INVALID_REQUEST` - request payload does not compliant with JSON schema. * `INVALID_ACCESS_TOKEN` - Access token is expire or invalid. * `DATASTORE_SUPPORT_REQUIRED` - Client has not opted into DataStore interface in skill manifest. * `TOO_MANY_REQUESTS` - The request has been throttled because client has exceed maximum allowed request rate. * `DATASTORE_UNAVAILABLE` - Internal service error. + + + + Allowed enum values: [COMMANDS_PAYLOAD_EXCEEDS_LIMIT, TOO_MANY_TARGETS, NO_TARGET_DEFINED, INVALID_REQUEST, INVALID_ACCESS_TOKEN, DATASTORE_SUPPORT_REQUIRED, TOO_MANY_REQUESTS, DATASTORE_UNAVAILABLE] + """ + COMMANDS_PAYLOAD_EXCEEDS_LIMIT = "COMMANDS_PAYLOAD_EXCEEDS_LIMIT" + TOO_MANY_TARGETS = "TOO_MANY_TARGETS" + NO_TARGET_DEFINED = "NO_TARGET_DEFINED" + INVALID_REQUEST = "INVALID_REQUEST" + INVALID_ACCESS_TOKEN = "INVALID_ACCESS_TOKEN" + DATASTORE_SUPPORT_REQUIRED = "DATASTORE_SUPPORT_REQUIRED" + TOO_MANY_REQUESTS = "TOO_MANY_REQUESTS" + DATASTORE_UNAVAILABLE = "DATASTORE_UNAVAILABLE" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, CommandsRequestErrorType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/datastore/v1/commands_response.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/commands_response.py new file mode 100644 index 00000000..9dc562a7 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/commands_response.py @@ -0,0 +1,114 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_sdk_model.services.datastore.v1.commands_dispatch_result import CommandsDispatchResult as CommandsDispatchResult_a4ae4026 + + +class CommandsResponse(object): + """ + + :param results: List of results for each dispatch to a device target. This indicates the results of 1st attempt of deliveries. + :type results: (optional) list[ask_sdk_model.services.datastore.v1.commands_dispatch_result.CommandsDispatchResult] + :param queued_result_id: A unique identifier to query result for queued delivery for offline devices (DEVICE_UNAVAILABLE). If there is no offline device, this value is not specified. The result will be available for query at least one hour after attemptDeliveryUntil. + :type queued_result_id: (optional) str + + """ + deserialized_types = { + 'results': 'list[ask_sdk_model.services.datastore.v1.commands_dispatch_result.CommandsDispatchResult]', + 'queued_result_id': 'str' + } # type: Dict + + attribute_map = { + 'results': 'results', + 'queued_result_id': 'queuedResultId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, results=None, queued_result_id=None): + # type: (Optional[List[CommandsDispatchResult_a4ae4026]], Optional[str]) -> None + """ + + :param results: List of results for each dispatch to a device target. This indicates the results of 1st attempt of deliveries. + :type results: (optional) list[ask_sdk_model.services.datastore.v1.commands_dispatch_result.CommandsDispatchResult] + :param queued_result_id: A unique identifier to query result for queued delivery for offline devices (DEVICE_UNAVAILABLE). If there is no offline device, this value is not specified. The result will be available for query at least one hour after attemptDeliveryUntil. + :type queued_result_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.results = results + self.queued_result_id = queued_result_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, CommandsResponse): + 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/services/datastore/v1/devices.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/devices.py new file mode 100644 index 00000000..2cb3f9a8 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/devices.py @@ -0,0 +1,111 @@ +# 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.services.datastore.v1.target import Target + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Devices(Target): + """ + + :param items: Unordered array of device identifiers. + :type items: (optional) list[str] + + """ + deserialized_types = { + 'object_type': 'str', + 'items': 'list[str]' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'items': 'items' + } # type: Dict + supports_multiple_types = False + + def __init__(self, items=None): + # type: (Optional[List[object]]) -> None + """ + + :param items: Unordered array of device identifiers. + :type items: (optional) list[str] + """ + self.__discriminator_value = "DEVICES" # type: str + + self.object_type = self.__discriminator_value + super(Devices, self).__init__(object_type=self.__discriminator_value) + self.items = items + + 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, Devices): + 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/services/datastore/v1/dispatch_result_type.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/dispatch_result_type.py new file mode 100644 index 00000000..ed7d114c --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/dispatch_result_type.py @@ -0,0 +1,71 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class DispatchResultType(Enum): + """ + Defines success or a type of error from dispatch. * `SUCCESS` - device has received the payload. * `INVALID_DEVICE` - device is not capable of processing the payload. * `DEVICE_UNAVAILABLE` - dispatch failed because device is offline. * `DEVICE_PERMANENTLY_UNAVAILABLE` - target no longer available to receive data. This is reported for a failed delivery attempt related to an unregistered device. * `CONCURRENCY_ERROR` - there are concurrent attempts to update to the same device. * `INTERNAL_ERROR`- dispatch failed because of unknown error - see message. * `PENDING_REQUEST_COUNT_EXCEEDS_LIMIT` - the count of pending requests exceeds the limit. + + + + Allowed enum values: [SUCCESS, INVALID_DEVICE, DEVICE_UNAVAILABLE, DEVICE_PERMANENTLY_UNAVAILABLE, CONCURRENCY_ERROR, INTERNAL_ERROR, PENDING_REQUEST_COUNT_EXCEEDS_LIMIT] + """ + SUCCESS = "SUCCESS" + INVALID_DEVICE = "INVALID_DEVICE" + DEVICE_UNAVAILABLE = "DEVICE_UNAVAILABLE" + DEVICE_PERMANENTLY_UNAVAILABLE = "DEVICE_PERMANENTLY_UNAVAILABLE" + CONCURRENCY_ERROR = "CONCURRENCY_ERROR" + INTERNAL_ERROR = "INTERNAL_ERROR" + PENDING_REQUEST_COUNT_EXCEEDS_LIMIT = "PENDING_REQUEST_COUNT_EXCEEDS_LIMIT" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DispatchResultType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/datastore/v1/put_namespace_command.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/put_namespace_command.py new file mode 100644 index 00000000..a60041a8 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/put_namespace_command.py @@ -0,0 +1,113 @@ +# 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.services.datastore.v1.command import Command + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class PutNamespaceCommand(Command): + """ + Creates a new namespace. If the namespace already exists, the command succeeds without any change. + + + :param namespace: Namespace where object needs to be created. Its unique identifier within skill's DataStore. + :type namespace: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'namespace': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'namespace': 'namespace' + } # type: Dict + supports_multiple_types = False + + def __init__(self, namespace=None): + # type: (Optional[str]) -> None + """Creates a new namespace. If the namespace already exists, the command succeeds without any change. + + :param namespace: Namespace where object needs to be created. Its unique identifier within skill's DataStore. + :type namespace: (optional) str + """ + self.__discriminator_value = "PUT_NAMESPACE" # type: str + + self.object_type = self.__discriminator_value + super(PutNamespaceCommand, self).__init__(object_type=self.__discriminator_value) + self.namespace = namespace + + 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, PutNamespaceCommand): + 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/services/datastore/v1/put_object_command.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/put_object_command.py new file mode 100644 index 00000000..0da3b305 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/put_object_command.py @@ -0,0 +1,127 @@ +# 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.services.datastore.v1.command import Command + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class PutObjectCommand(Command): + """ + Creates or updates an object. + + + :param namespace: Namespace where object needs to be created. Its unique identifier within skill's DataStore. + :type namespace: (optional) str + :param key: Unique identifier of the objects. Needs to be unique only within client's namespace not globally unique. + :type key: (optional) str + :param content: Open content payload that is not inspected by the DataStore. + :type content: (optional) object + + """ + deserialized_types = { + 'object_type': 'str', + 'namespace': 'str', + 'key': 'str', + 'content': 'object' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'namespace': 'namespace', + 'key': 'key', + 'content': 'content' + } # type: Dict + supports_multiple_types = False + + def __init__(self, namespace=None, key=None, content=None): + # type: (Optional[str], Optional[str], Optional[object]) -> None + """Creates or updates an object. + + :param namespace: Namespace where object needs to be created. Its unique identifier within skill's DataStore. + :type namespace: (optional) str + :param key: Unique identifier of the objects. Needs to be unique only within client's namespace not globally unique. + :type key: (optional) str + :param content: Open content payload that is not inspected by the DataStore. + :type content: (optional) object + """ + self.__discriminator_value = "PUT_OBJECT" # type: str + + self.object_type = self.__discriminator_value + super(PutObjectCommand, self).__init__(object_type=self.__discriminator_value) + self.namespace = namespace + self.key = key + self.content = content + + 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, PutObjectCommand): + 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/services/datastore/v1/py.typed b/ask-sdk-model/ask_sdk_model/services/datastore/v1/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/skill.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/queued_result_request_error.py similarity index 68% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/skill.py rename to ask-sdk-model/ask_sdk_model/services/datastore/v1/queued_result_request_error.py index 77c8e24a..df847995 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/skill.py +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/queued_result_request_error.py @@ -21,44 +21,44 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.stage_type import StageTypeV1 + from ask_sdk_model.services.datastore.v1.queued_result_request_error_type import QueuedResultRequestErrorType as QueuedResultRequestErrorType_ea915d1e -class Skill(object): +class QueuedResultRequestError(object): """ - :param stage: - :type stage: (optional) ask_smapi_model.v1.stage_type.StageType - :param locale: skill locale in bcp 47 format - :type locale: (optional) str + :param object_type: + :type object_type: (optional) ask_sdk_model.services.datastore.v1.queued_result_request_error_type.QueuedResultRequestErrorType + :param message: Descriptive error message. + :type message: (optional) str """ deserialized_types = { - 'stage': 'ask_smapi_model.v1.stage_type.StageType', - 'locale': 'str' + 'object_type': 'ask_sdk_model.services.datastore.v1.queued_result_request_error_type.QueuedResultRequestErrorType', + 'message': 'str' } # type: Dict attribute_map = { - 'stage': 'stage', - 'locale': 'locale' + 'object_type': 'type', + 'message': 'message' } # type: Dict supports_multiple_types = False - def __init__(self, stage=None, locale=None): - # type: (Optional[StageTypeV1], Optional[str]) -> None + def __init__(self, object_type=None, message=None): + # type: (Optional[QueuedResultRequestErrorType_ea915d1e], Optional[str]) -> None """ - :param stage: - :type stage: (optional) ask_smapi_model.v1.stage_type.StageType - :param locale: skill locale in bcp 47 format - :type locale: (optional) str + :param object_type: + :type object_type: (optional) ask_sdk_model.services.datastore.v1.queued_result_request_error_type.QueuedResultRequestErrorType + :param message: Descriptive error message. + :type message: (optional) str """ self.__discriminator_value = None # type: str - self.stage = stage - self.locale = locale + self.object_type = object_type + self.message = message def to_dict(self): # type: () -> Dict[str, object] @@ -103,7 +103,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, Skill): + if not isinstance(other, QueuedResultRequestError): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/services/datastore/v1/queued_result_request_error_type.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/queued_result_request_error_type.py new file mode 100644 index 00000000..31870ec7 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/queued_result_request_error_type.py @@ -0,0 +1,70 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class QueuedResultRequestErrorType(Enum): + """ + Error code of the response. * `NOT_FOUND` - queuedResultId is not found for the skill. * `INVALID_REQUEST` - One or more request parameters are invalid, see message for more details. * `INVALID_ACCESS_TOKEN` - Access token is expire or invalid. * `DATASTORE_SUPPORT_REQUIRED` - Client has not opted into DataStore interface in skill manifest. * `TOO_MANY_REQUESTS` - The request has been throttled because client has exceed maximum allowed request rate. * `DATASTORE_UNAVAILABLE` - Internal service error. + + + + Allowed enum values: [NOT_FOUND, INVALID_REQUEST, INVALID_ACCESS_TOKEN, DATASTORE_SUPPORT_REQUIRED, TOO_MANY_REQUESTS, DATASTORE_UNAVAILABLE] + """ + NOT_FOUND = "NOT_FOUND" + INVALID_REQUEST = "INVALID_REQUEST" + INVALID_ACCESS_TOKEN = "INVALID_ACCESS_TOKEN" + DATASTORE_SUPPORT_REQUIRED = "DATASTORE_SUPPORT_REQUIRED" + TOO_MANY_REQUESTS = "TOO_MANY_REQUESTS" + DATASTORE_UNAVAILABLE = "DATASTORE_UNAVAILABLE" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, QueuedResultRequestErrorType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/list_asr_evaluations_response.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/queued_result_response.py similarity index 60% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/list_asr_evaluations_response.py rename to ask-sdk-model/ask_sdk_model/services/datastore/v1/queued_result_response.py index a997315b..43751103 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/list_asr_evaluations_response.py +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/queued_result_response.py @@ -21,46 +21,46 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.asr.evaluations.pagination_context import PaginationContextV1 - from ask_smapi_model.v1.skill.asr.evaluations.evaluation_items import EvaluationItemsV1 + from ask_sdk_model.services.datastore.v1.response_pagination_context import ResponsePaginationContext as ResponsePaginationContext_2e377452 + from ask_sdk_model.services.datastore.v1.commands_dispatch_result import CommandsDispatchResult as CommandsDispatchResult_a4ae4026 -class ListAsrEvaluationsResponse(object): +class QueuedResultResponse(object): """ - response body for a list evaluation API + Response for queued deliveries query. - :param evaluations: an array containing all evaluations that have ever run by developers based on the filter criteria defined in the request - :type evaluations: (optional) list[ask_smapi_model.v1.skill.asr.evaluations.evaluation_items.EvaluationItems] + :param items: The array only contains results which have not been a SUCCESS delivery. An empty response means that all targeted devices has been received the commands payload. + :type items: (optional) list[ask_sdk_model.services.datastore.v1.commands_dispatch_result.CommandsDispatchResult] :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.asr.evaluations.pagination_context.PaginationContext + :type pagination_context: (optional) ask_sdk_model.services.datastore.v1.response_pagination_context.ResponsePaginationContext """ deserialized_types = { - 'evaluations': 'list[ask_smapi_model.v1.skill.asr.evaluations.evaluation_items.EvaluationItems]', - 'pagination_context': 'ask_smapi_model.v1.skill.asr.evaluations.pagination_context.PaginationContext' + 'items': 'list[ask_sdk_model.services.datastore.v1.commands_dispatch_result.CommandsDispatchResult]', + 'pagination_context': 'ask_sdk_model.services.datastore.v1.response_pagination_context.ResponsePaginationContext' } # type: Dict attribute_map = { - 'evaluations': 'evaluations', + 'items': 'items', 'pagination_context': 'paginationContext' } # type: Dict supports_multiple_types = False - def __init__(self, evaluations=None, pagination_context=None): - # type: (Optional[List[EvaluationItemsV1]], Optional[PaginationContextV1]) -> None - """response body for a list evaluation API + def __init__(self, items=None, pagination_context=None): + # type: (Optional[List[CommandsDispatchResult_a4ae4026]], Optional[ResponsePaginationContext_2e377452]) -> None + """Response for queued deliveries query. - :param evaluations: an array containing all evaluations that have ever run by developers based on the filter criteria defined in the request - :type evaluations: (optional) list[ask_smapi_model.v1.skill.asr.evaluations.evaluation_items.EvaluationItems] + :param items: The array only contains results which have not been a SUCCESS delivery. An empty response means that all targeted devices has been received the commands payload. + :type items: (optional) list[ask_sdk_model.services.datastore.v1.commands_dispatch_result.CommandsDispatchResult] :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.asr.evaluations.pagination_context.PaginationContext + :type pagination_context: (optional) ask_sdk_model.services.datastore.v1.response_pagination_context.ResponsePaginationContext """ self.__discriminator_value = None # type: str - self.evaluations = evaluations + self.items = items self.pagination_context = pagination_context def to_dict(self): @@ -106,7 +106,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, ListAsrEvaluationsResponse): + if not isinstance(other, QueuedResultResponse): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/services/datastore/v1/remove_namespace_command.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/remove_namespace_command.py new file mode 100644 index 00000000..d3a81d1c --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/remove_namespace_command.py @@ -0,0 +1,113 @@ +# 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.services.datastore.v1.command import Command + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class RemoveNamespaceCommand(Command): + """ + Deletes an existing namespace. If the namespace doesn't exist, this command succeeds without any change. + + + :param namespace: Namespace which needs to be removed. It's unique identifier within skill's DataStore. + :type namespace: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'namespace': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'namespace': 'namespace' + } # type: Dict + supports_multiple_types = False + + def __init__(self, namespace=None): + # type: (Optional[str]) -> None + """Deletes an existing namespace. If the namespace doesn't exist, this command succeeds without any change. + + :param namespace: Namespace which needs to be removed. It's unique identifier within skill's DataStore. + :type namespace: (optional) str + """ + self.__discriminator_value = "REMOVE_NAMESPACE" # type: str + + self.object_type = self.__discriminator_value + super(RemoveNamespaceCommand, self).__init__(object_type=self.__discriminator_value) + self.namespace = namespace + + 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, RemoveNamespaceCommand): + 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/services/datastore/v1/remove_object_command.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/remove_object_command.py new file mode 100644 index 00000000..a8033d7e --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/remove_object_command.py @@ -0,0 +1,120 @@ +# 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.services.datastore.v1.command import Command + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class RemoveObjectCommand(Command): + """ + Deletes an existing object. If the object doesn't exist, this command succeeds without any change. + + + :param namespace: Namespace where the object is stored. Its unique identifier within skill's DataStore. + :type namespace: (optional) str + :param key: Unique identifier of the objects. Needs to be unique only within client's namespace not globally unique. + :type key: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'namespace': 'str', + 'key': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'namespace': 'namespace', + 'key': 'key' + } # type: Dict + supports_multiple_types = False + + def __init__(self, namespace=None, key=None): + # type: (Optional[str], Optional[str]) -> None + """Deletes an existing object. If the object doesn't exist, this command succeeds without any change. + + :param namespace: Namespace where the object is stored. Its unique identifier within skill's DataStore. + :type namespace: (optional) str + :param key: Unique identifier of the objects. Needs to be unique only within client's namespace not globally unique. + :type key: (optional) str + """ + self.__discriminator_value = "REMOVE_OBJECT" # type: str + + self.object_type = self.__discriminator_value + super(RemoveObjectCommand, self).__init__(object_type=self.__discriminator_value) + self.namespace = namespace + self.key = key + + 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, RemoveObjectCommand): + 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/pagination_context.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/response_pagination_context.py similarity index 68% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/pagination_context.py rename to ask-sdk-model/ask_sdk_model/services/datastore/v1/response_pagination_context.py index f6d5a016..7963e9a1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/pagination_context.py +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/response_pagination_context.py @@ -21,37 +21,49 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class PaginationContext(object): +class ResponsePaginationContext(object): """ - This holds all data needed to control pagination from the user. - - :param next_token: The page token, this should be passed as a `nextToken` query parameter to the API to retrieve more items. If this field is not present the end of all of the items was reached. If a `maxResults` query parameter was specified then no more than `maxResults` items are returned. + :param total_count: The total number of results at the time of current response. + :type total_count: (optional) int + :param previous_token: The token of previous page - Not specified for the response of first page. + :type previous_token: (optional) str + :param next_token: The token of next page - Not specified for the response of last page. :type next_token: (optional) str """ deserialized_types = { + 'total_count': 'int', + 'previous_token': 'str', 'next_token': 'str' } # type: Dict attribute_map = { + 'total_count': 'totalCount', + 'previous_token': 'previousToken', 'next_token': 'nextToken' } # type: Dict supports_multiple_types = False - def __init__(self, next_token=None): - # type: (Optional[str]) -> None - """This holds all data needed to control pagination from the user. + def __init__(self, total_count=None, previous_token=None, next_token=None): + # type: (Optional[int], Optional[str], Optional[str]) -> None + """ - :param next_token: The page token, this should be passed as a `nextToken` query parameter to the API to retrieve more items. If this field is not present the end of all of the items was reached. If a `maxResults` query parameter was specified then no more than `maxResults` items are returned. + :param total_count: The total number of results at the time of current response. + :type total_count: (optional) int + :param previous_token: The token of previous page - Not specified for the response of first page. + :type previous_token: (optional) str + :param next_token: The token of next page - Not specified for the response of last page. :type next_token: (optional) str """ self.__discriminator_value = None # type: str + self.total_count = total_count + self.previous_token = previous_token self.next_token = next_token def to_dict(self): @@ -97,7 +109,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, PaginationContext): + if not isinstance(other, ResponsePaginationContext): return False return self.__dict__ == other.__dict__ diff --git a/ask-sdk-model/ask_sdk_model/services/datastore/v1/target.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/target.py new file mode 100644 index 00000000..93a6b3ec --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/target.py @@ -0,0 +1,133 @@ +# 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 abc import ABCMeta, abstractmethod + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Target(object): + """ + + :param object_type: Type of the target * `DEVICES` - an unordered array of Device ID * `USER - a single User ID + :type object_type: (optional) str + + .. note:: + + This is an abstract class. Use the following mapping, to figure out + the model class to be instantiated, that sets ``type`` variable. + + | USER: :py:class:`ask_sdk_model.services.datastore.v1.user.User`, + | + | DEVICES: :py:class:`ask_sdk_model.services.datastore.v1.devices.Devices` + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'USER': 'ask_sdk_model.services.datastore.v1.user.User', + 'DEVICES': 'ask_sdk_model.services.datastore.v1.devices.Devices' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None): + # type: (Optional[str]) -> None + """ + + :param object_type: Type of the target * `DEVICES` - an unordered array of Device ID * `USER - a single User ID + :type object_type: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + + @classmethod + def get_real_child_model(cls, data): + # type: (Dict[str, str]) -> Optional[str] + """Returns the real base class specified by the discriminator""" + discriminator_value = data[cls.json_discriminator_key] + return cls.discriminator_value_class_map.get(discriminator_value) + + 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, Target): + 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/services/datastore/v1/user.py b/ask-sdk-model/ask_sdk_model/services/datastore/v1/user.py new file mode 100644 index 00000000..51fab459 --- /dev/null +++ b/ask-sdk-model/ask_sdk_model/services/datastore/v1/user.py @@ -0,0 +1,111 @@ +# 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.services.datastore.v1.target import Target + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class User(Target): + """ + + :param id: User ID in request envelope (context.System.user.userId). + :type id: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'id': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'id': 'id' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None): + # type: (Optional[str]) -> None + """ + + :param id: User ID in request envelope (context.System.user.userId). + :type id: (optional) str + """ + self.__discriminator_value = "USER" # type: str + + self.object_type = self.__discriminator_value + super(User, self).__init__(object_type=self.__discriminator_value) + self.id = 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, User): + 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/services/device_address/__init__.py b/ask-sdk-model/ask_sdk_model/services/device_address/__init__.py index 0201e911..081ec3fc 100644 --- a/ask-sdk-model/ask_sdk_model/services/device_address/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/device_address/__init__.py @@ -14,7 +14,7 @@ # from __future__ import absolute_import -from .address import Address from .error import Error from .device_address_service_client import DeviceAddressServiceClient from .short_address import ShortAddress +from .address import Address diff --git a/ask-sdk-model/ask_sdk_model/services/device_address/address.py b/ask-sdk-model/ask_sdk_model/services/device_address/address.py index 7589e869..019835ce 100644 --- a/ask-sdk-model/ask_sdk_model/services/device_address/address.py +++ b/ask-sdk-model/ask_sdk_model/services/device_address/address.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/device_address/device_address_service_client.py b/ask-sdk-model/ask_sdk_model/services/device_address/device_address_service_client.py index 8d4e55be..a9bfdded 100644 --- a/ask-sdk-model/ask_sdk_model/services/device_address/device_address_service_client.py +++ b/ask-sdk-model/ask_sdk_model/services/device_address/device_address_service_client.py @@ -30,9 +30,9 @@ if typing.TYPE_CHECKING: from typing import Dict, List, Union, Any from datetime import datetime - from ask_sdk_model.services.device_address.short_address import ShortAddress - from ask_sdk_model.services.device_address.error import Error - from ask_sdk_model.services.device_address.address import Address + from ask_sdk_model.services.device_address.short_address import ShortAddress as ShortAddress_6be70e18 + from ask_sdk_model.services.device_address.address import Address as Address_b1cbe937 + from ask_sdk_model.services.device_address.error import Error as Error_5ed86e5f class DeviceAddressServiceClient(BaseServiceClient): @@ -53,7 +53,7 @@ def __init__(self, api_configuration, custom_user_agent=None): self.user_agent = user_agent_info(sdk_version="1.0.0", custom_user_agent=custom_user_agent) def get_country_and_postal_code(self, device_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ShortAddress, Error] + # type: (str, **Any) -> Union[ApiResponse, object, ShortAddress_6be70e18, Error_5ed86e5f] """ Gets the country and postal code of a device @@ -62,7 +62,7 @@ def get_country_and_postal_code(self, device_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ShortAddress, Error] + :rtype: Union[ApiResponse, object, ShortAddress_6be70e18, Error_5ed86e5f] """ operation_name = "get_country_and_postal_code" params = locals() @@ -120,9 +120,10 @@ def get_country_and_postal_code(self, device_id, **kwargs): if full_response: return api_response return api_response.body + def get_full_address(self, device_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, Address, Error] + # type: (str, **Any) -> Union[ApiResponse, object, Address_b1cbe937, Error_5ed86e5f] """ Gets the address of a device @@ -131,7 +132,7 @@ def get_full_address(self, device_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Address, Error] + :rtype: Union[ApiResponse, object, Address_b1cbe937, Error_5ed86e5f] """ operation_name = "get_full_address" params = locals() @@ -189,3 +190,4 @@ def get_full_address(self, device_id, **kwargs): if full_response: return api_response return api_response.body + diff --git a/ask-sdk-model/ask_sdk_model/services/device_address/error.py b/ask-sdk-model/ask_sdk_model/services/device_address/error.py index 09e0742f..934d3612 100644 --- a/ask-sdk-model/ask_sdk_model/services/device_address/error.py +++ b/ask-sdk-model/ask_sdk_model/services/device_address/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/device_address/short_address.py b/ask-sdk-model/ask_sdk_model/services/device_address/short_address.py index 2922933c..a7fa6161 100644 --- a/ask-sdk-model/ask_sdk_model/services/device_address/short_address.py +++ b/ask-sdk-model/ask_sdk_model/services/device_address/short_address.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/directive/__init__.py b/ask-sdk-model/ask_sdk_model/services/directive/__init__.py index cd76b422..c5eb1456 100644 --- a/ask-sdk-model/ask_sdk_model/services/directive/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/directive/__init__.py @@ -14,9 +14,9 @@ # from __future__ import absolute_import -from .error import Error -from .speak_directive import SpeakDirective -from .directive_service_client import DirectiveServiceClient from .header import Header from .send_directive_request import SendDirectiveRequest +from .error import Error from .directive import Directive +from .speak_directive import SpeakDirective +from .directive_service_client import DirectiveServiceClient diff --git a/ask-sdk-model/ask_sdk_model/services/directive/directive.py b/ask-sdk-model/ask_sdk_model/services/directive/directive.py index f607f10b..d06ff72d 100644 --- a/ask-sdk-model/ask_sdk_model/services/directive/directive.py +++ b/ask-sdk-model/ask_sdk_model/services/directive/directive.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/directive/directive_service_client.py b/ask-sdk-model/ask_sdk_model/services/directive/directive_service_client.py index 5e58d23d..66c0ac2f 100644 --- a/ask-sdk-model/ask_sdk_model/services/directive/directive_service_client.py +++ b/ask-sdk-model/ask_sdk_model/services/directive/directive_service_client.py @@ -30,8 +30,8 @@ if typing.TYPE_CHECKING: from typing import Dict, List, Union, Any from datetime import datetime - from ask_sdk_model.services.directive.error import Error - from ask_sdk_model.services.directive.send_directive_request import SendDirectiveRequest + from ask_sdk_model.services.directive.send_directive_request import SendDirectiveRequest as SendDirectiveRequest_e934a2f + from ask_sdk_model.services.directive.error import Error as Error_67b0923 class DirectiveServiceClient(BaseServiceClient): @@ -52,7 +52,7 @@ def __init__(self, api_configuration, custom_user_agent=None): self.user_agent = user_agent_info(sdk_version="1.0.0", custom_user_agent=custom_user_agent) def enqueue(self, send_directive_request, **kwargs): - # type: (SendDirectiveRequest, **Any) -> Union[ApiResponse, Error] + # type: (SendDirectiveRequest_e934a2f, **Any) -> Union[ApiResponse, object, Error_67b0923] """ Send directives to Alexa. @@ -61,7 +61,7 @@ def enqueue(self, send_directive_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error] + :rtype: Union[ApiResponse, object, Error_67b0923] """ operation_name = "enqueue" params = locals() @@ -118,3 +118,4 @@ def enqueue(self, send_directive_request, **kwargs): if full_response: return api_response + return None diff --git a/ask-sdk-model/ask_sdk_model/services/directive/error.py b/ask-sdk-model/ask_sdk_model/services/directive/error.py index fc937d43..5af1f06a 100644 --- a/ask-sdk-model/ask_sdk_model/services/directive/error.py +++ b/ask-sdk-model/ask_sdk_model/services/directive/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/directive/header.py b/ask-sdk-model/ask_sdk_model/services/directive/header.py index 328e1aea..11311371 100644 --- a/ask-sdk-model/ask_sdk_model/services/directive/header.py +++ b/ask-sdk-model/ask_sdk_model/services/directive/header.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/directive/send_directive_request.py b/ask-sdk-model/ask_sdk_model/services/directive/send_directive_request.py index 52e1c322..8a747241 100644 --- a/ask-sdk-model/ask_sdk_model/services/directive/send_directive_request.py +++ b/ask-sdk-model/ask_sdk_model/services/directive/send_directive_request.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.directive.header import Header - from ask_sdk_model.services.directive.directive import Directive + from ask_sdk_model.services.directive.header import Header as Header_6046f38f + from ask_sdk_model.services.directive.directive import Directive as Directive_4b928af1 class SendDirectiveRequest(object): @@ -50,7 +50,7 @@ class SendDirectiveRequest(object): supports_multiple_types = False def __init__(self, header=None, directive=None): - # type: (Optional[Header], Optional[Directive]) -> None + # type: (Optional[Header_6046f38f], Optional[Directive_4b928af1]) -> None """Send Directive Request payload. :param header: contains the header attributes of the send directive request. diff --git a/ask-sdk-model/ask_sdk_model/services/directive/speak_directive.py b/ask-sdk-model/ask_sdk_model/services/directive/speak_directive.py index f65b2fb6..46ff3c39 100644 --- a/ask-sdk-model/ask_sdk_model/services/directive/speak_directive.py +++ b/ask-sdk-model/ask_sdk_model/services/directive/speak_directive.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/__init__.py b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/__init__.py index 1b1fccf7..52c78bea 100644 --- a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/__init__.py @@ -15,7 +15,7 @@ from __future__ import absolute_import from .error import Error -from .endpoint_capability import EndpointCapability -from .endpoint_enumeration_response import EndpointEnumerationResponse -from .endpoint_info import EndpointInfo from .endpoint_enumeration_service_client import EndpointEnumerationServiceClient +from .endpoint_info import EndpointInfo +from .endpoint_enumeration_response import EndpointEnumerationResponse +from .endpoint_capability import EndpointCapability diff --git a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_capability.py b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_capability.py index d0f1a984..e1a91a27 100644 --- a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_capability.py +++ b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_capability.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_enumeration_response.py b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_enumeration_response.py index 7ce57dc6..11157bd6 100644 --- a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_enumeration_response.py +++ b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_enumeration_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.endpoint_enumeration.endpoint_info import EndpointInfo + from ask_sdk_model.services.endpoint_enumeration.endpoint_info import EndpointInfo as EndpointInfo_f10a0cca class EndpointEnumerationResponse(object): @@ -45,7 +45,7 @@ class EndpointEnumerationResponse(object): supports_multiple_types = False def __init__(self, endpoints=None): - # type: (Optional[List[EndpointInfo]]) -> None + # type: (Optional[List[EndpointInfo_f10a0cca]]) -> None """Contains the list of endpoints. :param endpoints: The list of endpoints. diff --git a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_enumeration_service_client.py b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_enumeration_service_client.py index 274d8515..4df36a8f 100644 --- a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_enumeration_service_client.py +++ b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_enumeration_service_client.py @@ -30,8 +30,8 @@ if typing.TYPE_CHECKING: from typing import Dict, List, Union, Any from datetime import datetime - from ask_sdk_model.services.endpoint_enumeration.endpoint_enumeration_response import EndpointEnumerationResponse - from ask_sdk_model.services.endpoint_enumeration.error import Error + from ask_sdk_model.services.endpoint_enumeration.endpoint_enumeration_response import EndpointEnumerationResponse as EndpointEnumerationResponse_5b0d1e17 + from ask_sdk_model.services.endpoint_enumeration.error import Error as Error_3a116f1 class EndpointEnumerationServiceClient(BaseServiceClient): @@ -52,14 +52,14 @@ def __init__(self, api_configuration, custom_user_agent=None): self.user_agent = user_agent_info(sdk_version="1.0.0", custom_user_agent=custom_user_agent) def get_endpoints(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, EndpointEnumerationResponse, Error] + # type: (**Any) -> Union[ApiResponse, object, EndpointEnumerationResponse_5b0d1e17, Error_3a116f1] """ This API is invoked by the skill to retrieve endpoints connected to the Echo device. :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, EndpointEnumerationResponse, Error] + :rtype: Union[ApiResponse, object, EndpointEnumerationResponse_5b0d1e17, Error_3a116f1] """ operation_name = "get_endpoints" params = locals() @@ -67,7 +67,7 @@ def get_endpoints(self, **kwargs): params[key] = val del params['kwargs'] - resource_path = '/v1/endpoints/' + resource_path = '/v1/endpoints' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -112,3 +112,4 @@ def get_endpoints(self, **kwargs): if full_response: return api_response return api_response.body + diff --git a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_info.py b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_info.py index df2e48a4..e4c6a0a1 100644 --- a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_info.py +++ b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/endpoint_info.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.endpoint_enumeration.endpoint_capability import EndpointCapability + from ask_sdk_model.services.endpoint_enumeration.endpoint_capability import EndpointCapability as EndpointCapability_afc63a4a class EndpointInfo(object): @@ -53,7 +53,7 @@ class EndpointInfo(object): supports_multiple_types = False def __init__(self, endpoint_id=None, friendly_name=None, capabilities=None): - # type: (Optional[str], Optional[str], Optional[List[EndpointCapability]]) -> None + # type: (Optional[str], Optional[str], Optional[List[EndpointCapability_afc63a4a]]) -> None """Contains the list of connected endpoints and their declared capabilities. :param endpoint_id: A unique identifier for the endpoint. diff --git a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/error.py b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/error.py index e15fd68a..e3c15695 100644 --- a/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/error.py +++ b/ask-sdk-model/ask_sdk_model/services/endpoint_enumeration/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/gadget_controller/__init__.py b/ask-sdk-model/ask_sdk_model/services/gadget_controller/__init__.py index d9f72178..f883b332 100644 --- a/ask-sdk-model/ask_sdk_model/services/gadget_controller/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/gadget_controller/__init__.py @@ -14,7 +14,7 @@ # from __future__ import absolute_import -from .animation_step import AnimationStep -from .light_animation import LightAnimation from .trigger_event_type import TriggerEventType +from .light_animation import LightAnimation +from .animation_step import AnimationStep from .set_light_parameters import SetLightParameters diff --git a/ask-sdk-model/ask_sdk_model/services/gadget_controller/animation_step.py b/ask-sdk-model/ask_sdk_model/services/gadget_controller/animation_step.py index 9e37ce33..c7988757 100644 --- a/ask-sdk-model/ask_sdk_model/services/gadget_controller/animation_step.py +++ b/ask-sdk-model/ask_sdk_model/services/gadget_controller/animation_step.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/gadget_controller/light_animation.py b/ask-sdk-model/ask_sdk_model/services/gadget_controller/light_animation.py index 707386bf..393f9a11 100644 --- a/ask-sdk-model/ask_sdk_model/services/gadget_controller/light_animation.py +++ b/ask-sdk-model/ask_sdk_model/services/gadget_controller/light_animation.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.gadget_controller.animation_step import AnimationStep + from ask_sdk_model.services.gadget_controller.animation_step import AnimationStep as AnimationStep_8c5baba8 class LightAnimation(object): @@ -51,7 +51,7 @@ class LightAnimation(object): supports_multiple_types = False def __init__(self, repeat=None, target_lights=None, sequence=None): - # type: (Optional[int], Optional[List[object]], Optional[List[AnimationStep]]) -> None + # type: (Optional[int], Optional[List[object]], Optional[List[AnimationStep_8c5baba8]]) -> None """ :param repeat: The number of times to play this animation. diff --git a/ask-sdk-model/ask_sdk_model/services/gadget_controller/set_light_parameters.py b/ask-sdk-model/ask_sdk_model/services/gadget_controller/set_light_parameters.py index b651e4fc..2468adaa 100644 --- a/ask-sdk-model/ask_sdk_model/services/gadget_controller/set_light_parameters.py +++ b/ask-sdk-model/ask_sdk_model/services/gadget_controller/set_light_parameters.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.gadget_controller.light_animation import LightAnimation - from ask_sdk_model.services.gadget_controller.trigger_event_type import TriggerEventType + from ask_sdk_model.services.gadget_controller.light_animation import LightAnimation as LightAnimation_f3c63c80 + from ask_sdk_model.services.gadget_controller.trigger_event_type import TriggerEventType as TriggerEventType_3b491945 class SetLightParameters(object): @@ -54,7 +54,7 @@ class SetLightParameters(object): supports_multiple_types = False def __init__(self, trigger_event=None, trigger_event_time_ms=None, animations=None): - # type: (Optional[TriggerEventType], Optional[int], Optional[List[LightAnimation]]) -> None + # type: (Optional[TriggerEventType_3b491945], Optional[int], Optional[List[LightAnimation_f3c63c80]]) -> None """Arguments that pertain to animating the buttons. :param trigger_event: diff --git a/ask-sdk-model/ask_sdk_model/services/gadget_controller/trigger_event_type.py b/ask-sdk-model/ask_sdk_model/services/gadget_controller/trigger_event_type.py index b6e14493..7677c7da 100644 --- a/ask-sdk-model/ask_sdk_model/services/gadget_controller/trigger_event_type.py +++ b/ask-sdk-model/ask_sdk_model/services/gadget_controller/trigger_event_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class TriggerEventType(Enum): none = "none" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, TriggerEventType): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/__init__.py b/ask-sdk-model/ask_sdk_model/services/game_engine/__init__.py index b77cd69a..7b82d404 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/__init__.py @@ -14,14 +14,14 @@ # from __future__ import absolute_import -from .progress_recognizer import ProgressRecognizer -from .deviation_recognizer import DeviationRecognizer -from .input_event import InputEvent from .input_event_action_type import InputEventActionType -from .event_reporting_type import EventReportingType +from .input_event import InputEvent from .pattern_recognizer import PatternRecognizer -from .pattern_recognizer_anchor_type import PatternRecognizerAnchorType +from .progress_recognizer import ProgressRecognizer from .input_handler_event import InputHandlerEvent -from .recognizer import Recognizer +from .event_reporting_type import EventReportingType from .event import Event from .pattern import Pattern +from .pattern_recognizer_anchor_type import PatternRecognizerAnchorType +from .deviation_recognizer import DeviationRecognizer +from .recognizer import Recognizer diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/deviation_recognizer.py b/ask-sdk-model/ask_sdk_model/services/game_engine/deviation_recognizer.py index c852958e..91514db5 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/deviation_recognizer.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/deviation_recognizer.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/event.py b/ask-sdk-model/ask_sdk_model/services/game_engine/event.py index 0907c45b..4eedcf0b 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/event.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/event.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.game_engine.event_reporting_type import EventReportingType + from ask_sdk_model.services.game_engine.event_reporting_type import EventReportingType as EventReportingType_9ff38fed class Event(object): @@ -65,7 +65,7 @@ class Event(object): supports_multiple_types = False def __init__(self, should_end_input_handler=None, meets=None, fails=None, reports=None, maximum_invocations=None, trigger_time_milliseconds=None): - # type: (Optional[bool], Optional[List[object]], Optional[List[object]], Optional[EventReportingType], Optional[int], Optional[int]) -> None + # type: (Optional[bool], Optional[List[object]], Optional[List[object]], Optional[EventReportingType_9ff38fed], Optional[int], Optional[int]) -> None """The events object is where you define the conditions that must be met for your skill to be notified of Echo Button input. You must define at least one event. :param should_end_input_handler: Whether the Input Handler should end after this event fires. If true, the Input Handler will stop and no further events will be sent to your skill unless you call StartInputHandler again. diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/event_reporting_type.py b/ask-sdk-model/ask_sdk_model/services/game_engine/event_reporting_type.py index 150b8977..6fb19e25 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/event_reporting_type.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/event_reporting_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class EventReportingType(Enum): matches = "matches" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, EventReportingType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/input_event.py b/ask-sdk-model/ask_sdk_model/services/game_engine/input_event.py index c7a5fedc..3a8bd89c 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/input_event.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/input_event.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.game_engine.input_event_action_type import InputEventActionType + from ask_sdk_model.services.game_engine.input_event_action_type import InputEventActionType as InputEventActionType_89d7c6e4 class InputEvent(object): @@ -59,7 +59,7 @@ class InputEvent(object): supports_multiple_types = False def __init__(self, gadget_id=None, timestamp=None, action=None, color=None, feature=None): - # type: (Optional[str], Optional[str], Optional[InputEventActionType], Optional[str], Optional[str]) -> None + # type: (Optional[str], Optional[str], Optional[InputEventActionType_89d7c6e4], Optional[str], Optional[str]) -> None """ :param gadget_id: The identifier of the Echo Button in question. It matches the gadgetId that you will have discovered in roll call. diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/input_event_action_type.py b/ask-sdk-model/ask_sdk_model/services/game_engine/input_event_action_type.py index 59a45681..9df99988 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/input_event_action_type.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/input_event_action_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class InputEventActionType(Enum): up = "up" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, InputEventActionType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/input_handler_event.py b/ask-sdk-model/ask_sdk_model/services/game_engine/input_handler_event.py index 75b2ed28..27bdb817 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/input_handler_event.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/input_handler_event.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.game_engine.input_event import InputEvent + from ask_sdk_model.services.game_engine.input_event import InputEvent as InputEvent_46dfcc98 class InputHandlerEvent(object): @@ -47,7 +47,7 @@ class InputHandlerEvent(object): supports_multiple_types = False def __init__(self, name=None, input_events=None): - # type: (Optional[str], Optional[List[InputEvent]]) -> None + # type: (Optional[str], Optional[List[InputEvent_46dfcc98]]) -> None """ :param name: The name of the event as you defined it in your GameEngine.StartInputHandler directive. diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/pattern.py b/ask-sdk-model/ask_sdk_model/services/game_engine/pattern.py index a7238a9f..eb35d1a7 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/pattern.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/pattern.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.game_engine.input_event_action_type import InputEventActionType + from ask_sdk_model.services.game_engine.input_event_action_type import InputEventActionType as InputEventActionType_89d7c6e4 class Pattern(object): @@ -57,7 +57,7 @@ class Pattern(object): supports_multiple_types = False def __init__(self, gadget_ids=None, colors=None, action=None, repeat=None): - # type: (Optional[List[object]], Optional[List[object]], Optional[InputEventActionType], Optional[int]) -> None + # type: (Optional[List[object]], Optional[List[object]], Optional[InputEventActionType_89d7c6e4], Optional[int]) -> None """An object that provides all of the events that need to occur, in a specific order, for this recognizer to be true. Omitting any parameters in this object means \"match anything\". :param gadget_ids: A whitelist of gadgetIds that are eligible for this match. diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/pattern_recognizer.py b/ask-sdk-model/ask_sdk_model/services/game_engine/pattern_recognizer.py index 885c7597..c3dd9852 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/pattern_recognizer.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/pattern_recognizer.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.game_engine.pattern import Pattern - from ask_sdk_model.services.game_engine.pattern_recognizer_anchor_type import PatternRecognizerAnchorType + from ask_sdk_model.services.game_engine.pattern_recognizer_anchor_type import PatternRecognizerAnchorType as PatternRecognizerAnchorType_61e1414c + from ask_sdk_model.services.game_engine.pattern import Pattern as Pattern_e6ee4413 class PatternRecognizer(Recognizer): @@ -65,7 +65,7 @@ class PatternRecognizer(Recognizer): supports_multiple_types = False def __init__(self, anchor=None, fuzzy=None, gadget_ids=None, actions=None, pattern=None): - # type: (Optional[PatternRecognizerAnchorType], Optional[bool], Optional[List[object]], Optional[List[object]], Optional[List[Pattern]]) -> None + # type: (Optional[PatternRecognizerAnchorType_61e1414c], Optional[bool], Optional[List[object]], Optional[List[object]], Optional[List[Pattern_e6ee4413]]) -> None """This recognizer is true when all of the specified events have occurred in the specified order. :param anchor: diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/pattern_recognizer_anchor_type.py b/ask-sdk-model/ask_sdk_model/services/game_engine/pattern_recognizer_anchor_type.py index 22265d7f..948dd2ed 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/pattern_recognizer_anchor_type.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/pattern_recognizer_anchor_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class PatternRecognizerAnchorType(Enum): anywhere = "anywhere" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PatternRecognizerAnchorType): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/progress_recognizer.py b/ask-sdk-model/ask_sdk_model/services/game_engine/progress_recognizer.py index d7451f9f..8ddae962 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/progress_recognizer.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/progress_recognizer.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/game_engine/recognizer.py b/ask-sdk-model/ask_sdk_model/services/game_engine/recognizer.py index e7c796ac..68dbd737 100644 --- a/ask-sdk-model/ask_sdk_model/services/game_engine/recognizer.py +++ b/ask-sdk-model/ask_sdk_model/services/game_engine/recognizer.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/__init__.py b/ask-sdk-model/ask_sdk_model/services/list_management/__init__.py index 76789cca..320661d1 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/__init__.py @@ -14,26 +14,26 @@ # from __future__ import absolute_import -from .forbidden_error import ForbiddenError -from .list_items_deleted_event_request import ListItemsDeletedEventRequest from .list_body import ListBody +from .list_created_event_request import ListCreatedEventRequest +from .update_list_item_request import UpdateListItemRequest +from .list_deleted_event_request import ListDeletedEventRequest +from .forbidden_error import ForbiddenError +from .list_item_state import ListItemState from .error import Error +from .links import Links from .alexa_list_metadata import AlexaListMetadata -from .list_created_event_request import ListCreatedEventRequest -from .list_management_service_client import ListManagementServiceClient -from .list_items_created_event_request import ListItemsCreatedEventRequest -from .alexa_list_item import AlexaListItem +from .alexa_lists_metadata import AlexaListsMetadata +from .list_items_deleted_event_request import ListItemsDeletedEventRequest from .list_state import ListState -from .list_item_state import ListItemState -from .list_item_body import ListItemBody -from .list_updated_event_request import ListUpdatedEventRequest from .update_list_request import UpdateListRequest -from .list_items_updated_event_request import ListItemsUpdatedEventRequest -from .list_deleted_event_request import ListDeletedEventRequest -from .status import Status from .create_list_request import CreateListRequest -from .links import Links -from .alexa_list import AlexaList +from .list_items_updated_event_request import ListItemsUpdatedEventRequest +from .list_updated_event_request import ListUpdatedEventRequest +from .list_items_created_event_request import ListItemsCreatedEventRequest +from .list_management_service_client import ListManagementServiceClient from .create_list_item_request import CreateListItemRequest -from .alexa_lists_metadata import AlexaListsMetadata -from .update_list_item_request import UpdateListItemRequest +from .alexa_list import AlexaList +from .list_item_body import ListItemBody +from .status import Status +from .alexa_list_item import AlexaListItem diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list.py b/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list.py index 1c493c2b..53364e19 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.alexa_list_item import AlexaListItem - from ask_sdk_model.services.list_management.list_state import ListState - from ask_sdk_model.services.list_management.links import Links + from ask_sdk_model.services.list_management.links import Links as Links_2cc36a7a + from ask_sdk_model.services.list_management.alexa_list_item import AlexaListItem as AlexaListItem_6fd31314 + from ask_sdk_model.services.list_management.list_state import ListState as ListState_7568bb1f class AlexaList(object): @@ -65,7 +65,7 @@ class AlexaList(object): supports_multiple_types = False def __init__(self, list_id=None, name=None, state=None, version=None, items=None, links=None): - # type: (Optional[str], Optional[str], Optional[ListState], Optional[int], Optional[List[AlexaListItem]], Optional[Links]) -> None + # type: (Optional[str], Optional[str], Optional[ListState_7568bb1f], Optional[int], Optional[List[AlexaListItem_6fd31314]], Optional[Links_2cc36a7a]) -> None """ :param list_id: diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list_item.py b/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list_item.py index 853d6819..3829045c 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list_item.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list_item.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_item_state import ListItemState + from ask_sdk_model.services.list_management.list_item_state import ListItemState as ListItemState_1ae3b0ae class AlexaListItem(object): @@ -67,7 +67,7 @@ class AlexaListItem(object): supports_multiple_types = False def __init__(self, id=None, version=None, value=None, status=None, created_time=None, updated_time=None, href=None): - # type: (Optional[str], Optional[int], Optional[str], Optional[ListItemState], Optional[str], Optional[str], Optional[str]) -> None + # type: (Optional[str], Optional[int], Optional[str], Optional[ListItemState_1ae3b0ae], Optional[str], Optional[str], Optional[str]) -> None """ :param id: diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list_metadata.py b/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list_metadata.py index 61ca0374..5b3f5964 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list_metadata.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/alexa_list_metadata.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_state import ListState - from ask_sdk_model.services.list_management.status import Status + from ask_sdk_model.services.list_management.status import Status as Status_bac65d64 + from ask_sdk_model.services.list_management.list_state import ListState as ListState_7568bb1f class AlexaListMetadata(object): @@ -60,7 +60,7 @@ class AlexaListMetadata(object): supports_multiple_types = False def __init__(self, list_id=None, name=None, state=None, version=None, status_map=None): - # type: (Optional[str], Optional[str], Optional[ListState], Optional[int], Optional[List[Status]]) -> None + # type: (Optional[str], Optional[str], Optional[ListState_7568bb1f], Optional[int], Optional[List[Status_bac65d64]]) -> None """ :param list_id: diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/alexa_lists_metadata.py b/ask-sdk-model/ask_sdk_model/services/list_management/alexa_lists_metadata.py index 785e3e95..6cd1e1e1 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/alexa_lists_metadata.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/alexa_lists_metadata.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.alexa_list_metadata import AlexaListMetadata + from ask_sdk_model.services.list_management.alexa_list_metadata import AlexaListMetadata as AlexaListMetadata_bfa5b64c class AlexaListsMetadata(object): @@ -43,7 +43,7 @@ class AlexaListsMetadata(object): supports_multiple_types = False def __init__(self, lists=None): - # type: (Optional[List[AlexaListMetadata]]) -> None + # type: (Optional[List[AlexaListMetadata_bfa5b64c]]) -> None """ :param lists: diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/create_list_item_request.py b/ask-sdk-model/ask_sdk_model/services/list_management/create_list_item_request.py index 5a537153..c9f304da 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/create_list_item_request.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/create_list_item_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_item_state import ListItemState + from ask_sdk_model.services.list_management.list_item_state import ListItemState as ListItemState_1ae3b0ae class CreateListItemRequest(object): @@ -47,7 +47,7 @@ class CreateListItemRequest(object): supports_multiple_types = False def __init__(self, value=None, status=None): - # type: (Optional[str], Optional[ListItemState]) -> None + # type: (Optional[str], Optional[ListItemState_1ae3b0ae]) -> None """ :param value: diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/create_list_request.py b/ask-sdk-model/ask_sdk_model/services/list_management/create_list_request.py index c5c925e4..1b7425b8 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/create_list_request.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/create_list_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_state import ListState + from ask_sdk_model.services.list_management.list_state import ListState as ListState_7568bb1f class CreateListRequest(object): @@ -47,7 +47,7 @@ class CreateListRequest(object): supports_multiple_types = False def __init__(self, name=None, state=None): - # type: (Optional[str], Optional[ListState]) -> None + # type: (Optional[str], Optional[ListState_7568bb1f]) -> None """ :param name: diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/error.py b/ask-sdk-model/ask_sdk_model/services/list_management/error.py index b2dc737e..a10b758b 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/error.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/forbidden_error.py b/ask-sdk-model/ask_sdk_model/services/list_management/forbidden_error.py index 7876c493..c8882854 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/forbidden_error.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/forbidden_error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/links.py b/ask-sdk-model/ask_sdk_model/services/list_management/links.py index de51e171..c85e9f34 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/links.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/links.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/list_body.py b/ask-sdk-model/ask_sdk_model/services/list_management/list_body.py index bd8cf975..b26c3924 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/list_body.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/list_body.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/list_created_event_request.py b/ask-sdk-model/ask_sdk_model/services/list_management/list_created_event_request.py index 8fdf03ca..668c8cbb 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/list_created_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/list_created_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_body import ListBody + from ask_sdk_model.services.list_management.list_body import ListBody as ListBody_9725fe55 class ListCreatedEventRequest(Request): @@ -66,7 +66,7 @@ class ListCreatedEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListBody], Optional[datetime], Optional[datetime]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListBody_9725fe55], Optional[datetime], Optional[datetime]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/list_deleted_event_request.py b/ask-sdk-model/ask_sdk_model/services/list_management/list_deleted_event_request.py index 2f70b0c1..ebf4f43c 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/list_deleted_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/list_deleted_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_body import ListBody + from ask_sdk_model.services.list_management.list_body import ListBody as ListBody_9725fe55 class ListDeletedEventRequest(Request): @@ -66,7 +66,7 @@ class ListDeletedEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListBody], Optional[datetime], Optional[datetime]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListBody_9725fe55], Optional[datetime], Optional[datetime]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/list_item_body.py b/ask-sdk-model/ask_sdk_model/services/list_management/list_item_body.py index 2623bf89..d4a30f08 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/list_item_body.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/list_item_body.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/list_item_state.py b/ask-sdk-model/ask_sdk_model/services/list_management/list_item_state.py index 5b96061b..3bd9eb9f 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/list_item_state.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/list_item_state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,7 +35,7 @@ class ListItemState(Enum): completed = "completed" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -51,7 +51,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ListItemState): return False @@ -59,6 +59,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/list_items_created_event_request.py b/ask-sdk-model/ask_sdk_model/services/list_management/list_items_created_event_request.py index 8a49c260..bd6a13e2 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/list_items_created_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/list_items_created_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_item_body import ListItemBody + from ask_sdk_model.services.list_management.list_item_body import ListItemBody as ListItemBody_c30b8eea class ListItemsCreatedEventRequest(Request): @@ -66,7 +66,7 @@ class ListItemsCreatedEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListItemBody], Optional[datetime], Optional[datetime]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListItemBody_c30b8eea], Optional[datetime], Optional[datetime]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/list_items_deleted_event_request.py b/ask-sdk-model/ask_sdk_model/services/list_management/list_items_deleted_event_request.py index 4867043e..cbcf7832 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/list_items_deleted_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/list_items_deleted_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_item_body import ListItemBody + from ask_sdk_model.services.list_management.list_item_body import ListItemBody as ListItemBody_c30b8eea class ListItemsDeletedEventRequest(Request): @@ -66,7 +66,7 @@ class ListItemsDeletedEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListItemBody], Optional[datetime], Optional[datetime]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListItemBody_c30b8eea], Optional[datetime], Optional[datetime]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/list_items_updated_event_request.py b/ask-sdk-model/ask_sdk_model/services/list_management/list_items_updated_event_request.py index 430b11d1..7c0605a6 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/list_items_updated_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/list_items_updated_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_item_body import ListItemBody + from ask_sdk_model.services.list_management.list_item_body import ListItemBody as ListItemBody_c30b8eea class ListItemsUpdatedEventRequest(Request): @@ -66,7 +66,7 @@ class ListItemsUpdatedEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListItemBody], Optional[datetime], Optional[datetime]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListItemBody_c30b8eea], Optional[datetime], Optional[datetime]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/list_management_service_client.py b/ask-sdk-model/ask_sdk_model/services/list_management/list_management_service_client.py index 89c80eea..6cbe3878 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/list_management_service_client.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/list_management_service_client.py @@ -30,16 +30,16 @@ if typing.TYPE_CHECKING: from typing import Dict, List, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.forbidden_error import ForbiddenError - from ask_sdk_model.services.list_management.alexa_lists_metadata import AlexaListsMetadata - from ask_sdk_model.services.list_management.alexa_list_item import AlexaListItem - from ask_sdk_model.services.list_management.update_list_request import UpdateListRequest - from ask_sdk_model.services.list_management.alexa_list_metadata import AlexaListMetadata - from ask_sdk_model.services.list_management.alexa_list import AlexaList - from ask_sdk_model.services.list_management.error import Error - from ask_sdk_model.services.list_management.create_list_item_request import CreateListItemRequest - from ask_sdk_model.services.list_management.update_list_item_request import UpdateListItemRequest - from ask_sdk_model.services.list_management.create_list_request import CreateListRequest + from ask_sdk_model.services.list_management.update_list_request import UpdateListRequest as UpdateListRequest_414a7d74 + from ask_sdk_model.services.list_management.alexa_list import AlexaList as AlexaList_3da10cf7 + from ask_sdk_model.services.list_management.alexa_lists_metadata import AlexaListsMetadata as AlexaListsMetadata_4de49d50 + from ask_sdk_model.services.list_management.update_list_item_request import UpdateListItemRequest as UpdateListItemRequest_72b7a2bf + from ask_sdk_model.services.list_management.create_list_request import CreateListRequest as CreateListRequest_9fe258ce + from ask_sdk_model.services.list_management.create_list_item_request import CreateListItemRequest as CreateListItemRequest_1aaa675f + from ask_sdk_model.services.list_management.error import Error as Error_6c6937d8 + from ask_sdk_model.services.list_management.alexa_list_item import AlexaListItem as AlexaListItem_6fd31314 + from ask_sdk_model.services.list_management.forbidden_error import ForbiddenError as ForbiddenError_56e425c5 + from ask_sdk_model.services.list_management.alexa_list_metadata import AlexaListMetadata as AlexaListMetadata_bfa5b64c class ListManagementServiceClient(BaseServiceClient): @@ -60,14 +60,14 @@ def __init__(self, api_configuration, custom_user_agent=None): self.user_agent = user_agent_info(sdk_version="1.0.0", custom_user_agent=custom_user_agent) def get_lists_metadata(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, ForbiddenError, Error, AlexaListsMetadata] + # type: (**Any) -> Union[ApiResponse, object, ForbiddenError_56e425c5, Error_6c6937d8, AlexaListsMetadata_4de49d50] """ Retrieves the metadata for all customer lists, including the customer’s default lists. :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ForbiddenError, Error, AlexaListsMetadata] + :rtype: Union[ApiResponse, object, ForbiddenError_56e425c5, Error_6c6937d8, AlexaListsMetadata_4de49d50] """ operation_name = "get_lists_metadata" params = locals() @@ -75,7 +75,7 @@ def get_lists_metadata(self, **kwargs): params[key] = val del params['kwargs'] - resource_path = '/v2/householdlists/' + resource_path = '/v2/householdlists' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -116,9 +116,10 @@ def get_lists_metadata(self, **kwargs): if full_response: return api_response return api_response.body + def delete_list(self, list_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, Error] + # type: (str, **Any) -> Union[ApiResponse, object, Error_6c6937d8] """ This API deletes a customer custom list. @@ -127,7 +128,7 @@ def delete_list(self, list_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error] + :rtype: Union[ApiResponse, object, Error_6c6937d8] """ operation_name = "delete_list" params = locals() @@ -139,7 +140,7 @@ def delete_list(self, list_id, **kwargs): raise ValueError( "Missing the required parameter `list_id` when calling `" + operation_name + "`") - resource_path = '/v2/householdlists/{listId}/' + resource_path = '/v2/householdlists/{listId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -184,9 +185,10 @@ def delete_list(self, list_id, **kwargs): if full_response: return api_response + return None def delete_list_item(self, list_id, item_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, Error] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_6c6937d8] """ This API deletes an item in the specified list. @@ -197,7 +199,7 @@ def delete_list_item(self, list_id, item_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error] + :rtype: Union[ApiResponse, object, Error_6c6937d8] """ operation_name = "delete_list_item" params = locals() @@ -213,7 +215,7 @@ def delete_list_item(self, list_id, item_id, **kwargs): raise ValueError( "Missing the required parameter `item_id` when calling `" + operation_name + "`") - resource_path = '/v2/householdlists/{listId}/items/{itemId}/' + resource_path = '/v2/householdlists/{listId}/items/{itemId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -260,9 +262,10 @@ def delete_list_item(self, list_id, item_id, **kwargs): if full_response: return api_response + return None def get_list_item(self, list_id, item_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, AlexaListItem, Error] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_6c6937d8, AlexaListItem_6fd31314] """ This API can be used to retrieve single item with in any list by listId and itemId. This API can read list items from an archived list. Attempting to read list items from a deleted list return an ObjectNotFound 404 error. @@ -273,7 +276,7 @@ def get_list_item(self, list_id, item_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, AlexaListItem, Error] + :rtype: Union[ApiResponse, object, Error_6c6937d8, AlexaListItem_6fd31314] """ operation_name = "get_list_item" params = locals() @@ -289,7 +292,7 @@ def get_list_item(self, list_id, item_id, **kwargs): raise ValueError( "Missing the required parameter `item_id` when calling `" + operation_name + "`") - resource_path = '/v2/householdlists/{listId}/items/{itemId}/' + resource_path = '/v2/householdlists/{listId}/items/{itemId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -336,9 +339,10 @@ def get_list_item(self, list_id, item_id, **kwargs): if full_response: return api_response return api_response.body + def update_list_item(self, list_id, item_id, update_list_item_request, **kwargs): - # type: (str, str, UpdateListItemRequest, **Any) -> Union[ApiResponse, AlexaListItem, Error] + # type: (str, str, UpdateListItemRequest_72b7a2bf, **Any) -> Union[ApiResponse, object, Error_6c6937d8, AlexaListItem_6fd31314] """ API used to update an item value or item status. @@ -351,7 +355,7 @@ def update_list_item(self, list_id, item_id, update_list_item_request, **kwargs) :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, AlexaListItem, Error] + :rtype: Union[ApiResponse, object, Error_6c6937d8, AlexaListItem_6fd31314] """ operation_name = "update_list_item" params = locals() @@ -371,7 +375,7 @@ def update_list_item(self, list_id, item_id, update_list_item_request, **kwargs) raise ValueError( "Missing the required parameter `update_list_item_request` when calling `" + operation_name + "`") - resource_path = '/v2/householdlists/{listId}/items/{itemId}/' + resource_path = '/v2/householdlists/{listId}/items/{itemId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -421,9 +425,10 @@ def update_list_item(self, list_id, item_id, update_list_item_request, **kwargs) if full_response: return api_response return api_response.body + def create_list_item(self, list_id, create_list_item_request, **kwargs): - # type: (str, CreateListItemRequest, **Any) -> Union[ApiResponse, AlexaListItem, Error] + # type: (str, CreateListItemRequest_1aaa675f, **Any) -> Union[ApiResponse, object, Error_6c6937d8, AlexaListItem_6fd31314] """ This API creates an item in an active list or in a default list. @@ -434,7 +439,7 @@ def create_list_item(self, list_id, create_list_item_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, AlexaListItem, Error] + :rtype: Union[ApiResponse, object, Error_6c6937d8, AlexaListItem_6fd31314] """ operation_name = "create_list_item" params = locals() @@ -450,7 +455,7 @@ def create_list_item(self, list_id, create_list_item_request, **kwargs): raise ValueError( "Missing the required parameter `create_list_item_request` when calling `" + operation_name + "`") - resource_path = '/v2/householdlists/{listId}/items/' + resource_path = '/v2/householdlists/{listId}/items' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -498,9 +503,10 @@ def create_list_item(self, list_id, create_list_item_request, **kwargs): if full_response: return api_response return api_response.body + def update_list(self, list_id, update_list_request, **kwargs): - # type: (str, UpdateListRequest, **Any) -> Union[ApiResponse, Error, AlexaListMetadata] + # type: (str, UpdateListRequest_414a7d74, **Any) -> Union[ApiResponse, object, Error_6c6937d8, AlexaListMetadata_bfa5b64c] """ This API updates a custom list. Only the list name or state can be updated. An Alexa customer can turn an archived list into an active one. @@ -511,7 +517,7 @@ def update_list(self, list_id, update_list_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error, AlexaListMetadata] + :rtype: Union[ApiResponse, object, Error_6c6937d8, AlexaListMetadata_bfa5b64c] """ operation_name = "update_list" params = locals() @@ -527,7 +533,7 @@ def update_list(self, list_id, update_list_request, **kwargs): raise ValueError( "Missing the required parameter `update_list_request` when calling `" + operation_name + "`") - resource_path = '/v2/householdlists/{listId}/' + resource_path = '/v2/householdlists/{listId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -576,9 +582,10 @@ def update_list(self, list_id, update_list_request, **kwargs): if full_response: return api_response return api_response.body + def get_list(self, list_id, status, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, AlexaList, Error] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_6c6937d8, AlexaList_3da10cf7] """ Retrieves the list metadata including the items in the list with requested status. @@ -589,7 +596,7 @@ def get_list(self, list_id, status, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, AlexaList, Error] + :rtype: Union[ApiResponse, object, Error_6c6937d8, AlexaList_3da10cf7] """ operation_name = "get_list" params = locals() @@ -605,7 +612,7 @@ def get_list(self, list_id, status, **kwargs): raise ValueError( "Missing the required parameter `status` when calling `" + operation_name + "`") - resource_path = '/v2/householdlists/{listId}/{status}/' + resource_path = '/v2/householdlists/{listId}/{status}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -653,9 +660,10 @@ def get_list(self, list_id, status, **kwargs): if full_response: return api_response return api_response.body + def create_list(self, create_list_request, **kwargs): - # type: (CreateListRequest, **Any) -> Union[ApiResponse, Error, AlexaListMetadata] + # type: (CreateListRequest_9fe258ce, **Any) -> Union[ApiResponse, object, Error_6c6937d8, AlexaListMetadata_bfa5b64c] """ This API creates a custom list. The new list name must be different than any existing list name. @@ -664,7 +672,7 @@ def create_list(self, create_list_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error, AlexaListMetadata] + :rtype: Union[ApiResponse, object, Error_6c6937d8, AlexaListMetadata_bfa5b64c] """ operation_name = "create_list" params = locals() @@ -676,7 +684,7 @@ def create_list(self, create_list_request, **kwargs): raise ValueError( "Missing the required parameter `create_list_request` when calling `" + operation_name + "`") - resource_path = '/v2/householdlists/' + resource_path = '/v2/householdlists' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -722,3 +730,4 @@ def create_list(self, create_list_request, **kwargs): if full_response: return api_response return api_response.body + diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/list_state.py b/ask-sdk-model/ask_sdk_model/services/list_management/list_state.py index e8ca3d73..2c74b58b 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/list_state.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/list_state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,7 +35,7 @@ class ListState(Enum): archived = "archived" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -51,7 +51,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ListState): return False @@ -59,6 +59,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/list_updated_event_request.py b/ask-sdk-model/ask_sdk_model/services/list_management/list_updated_event_request.py index 59338236..1bfe5c08 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/list_updated_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/list_updated_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_body import ListBody + from ask_sdk_model.services.list_management.list_body import ListBody as ListBody_9725fe55 class ListUpdatedEventRequest(Request): @@ -66,7 +66,7 @@ class ListUpdatedEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None, event_creation_time=None, event_publishing_time=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListBody], Optional[datetime], Optional[datetime]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[ListBody_9725fe55], Optional[datetime], Optional[datetime]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/status.py b/ask-sdk-model/ask_sdk_model/services/list_management/status.py index b5e0bb5a..cdbb2383 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/status.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_item_state import ListItemState + from ask_sdk_model.services.list_management.list_item_state import ListItemState as ListItemState_1ae3b0ae class Status(object): @@ -47,7 +47,7 @@ class Status(object): supports_multiple_types = False def __init__(self, url=None, status=None): - # type: (Optional[str], Optional[ListItemState]) -> None + # type: (Optional[str], Optional[ListItemState_1ae3b0ae]) -> None """ :param url: diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/update_list_item_request.py b/ask-sdk-model/ask_sdk_model/services/list_management/update_list_item_request.py index 1f875f8b..93cd1b17 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/update_list_item_request.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/update_list_item_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_item_state import ListItemState + from ask_sdk_model.services.list_management.list_item_state import ListItemState as ListItemState_1ae3b0ae class UpdateListItemRequest(object): @@ -51,7 +51,7 @@ class UpdateListItemRequest(object): supports_multiple_types = False def __init__(self, value=None, status=None, version=None): - # type: (Optional[str], Optional[ListItemState], Optional[int]) -> None + # type: (Optional[str], Optional[ListItemState_1ae3b0ae], Optional[int]) -> None """ :param value: New item value diff --git a/ask-sdk-model/ask_sdk_model/services/list_management/update_list_request.py b/ask-sdk-model/ask_sdk_model/services/list_management/update_list_request.py index 47606b88..a392bc0e 100644 --- a/ask-sdk-model/ask_sdk_model/services/list_management/update_list_request.py +++ b/ask-sdk-model/ask_sdk_model/services/list_management/update_list_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.list_management.list_state import ListState + from ask_sdk_model.services.list_management.list_state import ListState as ListState_7568bb1f class UpdateListRequest(object): @@ -51,7 +51,7 @@ class UpdateListRequest(object): supports_multiple_types = False def __init__(self, name=None, state=None, version=None): - # type: (Optional[str], Optional[ListState], Optional[int]) -> None + # type: (Optional[str], Optional[ListState_7568bb1f], Optional[int]) -> None """ :param name: diff --git a/ask-sdk-model/ask_sdk_model/services/lwa/__init__.py b/ask-sdk-model/ask_sdk_model/services/lwa/__init__.py index eda0327c..cf832f09 100644 --- a/ask-sdk-model/ask_sdk_model/services/lwa/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/lwa/__init__.py @@ -14,8 +14,8 @@ # from __future__ import absolute_import +from .access_token import AccessToken from .error import Error -from .lwa_client import LwaClient -from .access_token_response import AccessTokenResponse from .access_token_request import AccessTokenRequest -from .access_token import AccessToken +from .access_token_response import AccessTokenResponse +from .lwa_client import LwaClient diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/__init__.py b/ask-sdk-model/ask_sdk_model/services/monetization/__init__.py index 53aff1b0..3e89e16e 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/__init__.py @@ -14,17 +14,17 @@ # from __future__ import absolute_import -from .error import Error -from .product_type import ProductType -from .in_skill_products_response import InSkillProductsResponse -from .entitlement_reason import EntitlementReason from .transactions import Transactions -from .metadata import Metadata -from .status import Status -from .purchasable_state import PurchasableState -from .in_skill_product_transactions_response import InSkillProductTransactionsResponse -from .in_skill_product import InSkillProduct -from .monetization_service_client import MonetizationServiceClient +from .error import Error from .purchase_mode import PurchaseMode from .entitled_state import EntitledState +from .in_skill_product_transactions_response import InSkillProductTransactionsResponse +from .metadata import Metadata +from .in_skill_product import InSkillProduct +from .entitlement_reason import EntitlementReason +from .product_type import ProductType from .result_set import ResultSet +from .purchasable_state import PurchasableState +from .status import Status +from .in_skill_products_response import InSkillProductsResponse +from .monetization_service_client import MonetizationServiceClient diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/entitled_state.py b/ask-sdk-model/ask_sdk_model/services/monetization/entitled_state.py index d44157f6..1f14b2a8 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/entitled_state.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/entitled_state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class EntitledState(Enum): NOT_ENTITLED = "NOT_ENTITLED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, EntitledState): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/entitlement_reason.py b/ask-sdk-model/ask_sdk_model/services/monetization/entitlement_reason.py index 99e1fc76..1a3418a0 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/entitlement_reason.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/entitlement_reason.py @@ -21,24 +21,25 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class EntitlementReason(Enum): """ - Reason for the entitlement status. * 'PURCHASED' - The user is entitled to the product because they purchased it. * 'NOT_PURCHASED' - The user is not entitled to the product because they have not purchased it. * 'AUTO_ENTITLED' - The user is auto entitled to the product because they have subscribed to a broader service. + Reason for the entitlement status. * 'PURCHASED' - The user is entitled to the product because they purchased it directly. * 'NOT_PURCHASED' - The user is not entitled to the product because they have not purchased it. * 'AUTO_ENTITLED' - The user is auto entitled to the product because they have subscribed to a broader service. * 'BUNDLE_ENTITLED' - The user is entitled to the product because they purchased it indirectly as part of a bundle. If the user is entitled via both PURCHASED and BUNDLE_ENTITLED, then BUNDLE_ENTITLED takes priority. - Allowed enum values: [PURCHASED, NOT_PURCHASED, AUTO_ENTITLED] + Allowed enum values: [PURCHASED, NOT_PURCHASED, AUTO_ENTITLED, BUNDLE_ENTITLED] """ PURCHASED = "PURCHASED" NOT_PURCHASED = "NOT_PURCHASED" AUTO_ENTITLED = "AUTO_ENTITLED" + BUNDLE_ENTITLED = "BUNDLE_ENTITLED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, EntitlementReason): return False @@ -62,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/error.py b/ask-sdk-model/ask_sdk_model/services/monetization/error.py index 82ddc29e..598167b7 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/error.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_product.py b/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_product.py index 115d22dc..5bec1100 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_product.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_product.py @@ -21,13 +21,13 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.monetization.purchasable_state import PurchasableState - from ask_sdk_model.services.monetization.purchase_mode import PurchaseMode - from ask_sdk_model.services.monetization.entitled_state import EntitledState - from ask_sdk_model.services.monetization.product_type import ProductType - from ask_sdk_model.services.monetization.entitlement_reason import EntitlementReason + from ask_sdk_model.services.monetization.product_type import ProductType as ProductType_8f71260a + from ask_sdk_model.services.monetization.entitled_state import EntitledState as EntitledState_c546a5da + from ask_sdk_model.services.monetization.entitlement_reason import EntitlementReason as EntitlementReason_43c3309e + from ask_sdk_model.services.monetization.purchasable_state import PurchasableState as PurchasableState_f8ea2076 + from ask_sdk_model.services.monetization.purchase_mode import PurchaseMode as PurchaseMode_156cd096 class InSkillProduct(object): @@ -83,7 +83,7 @@ class InSkillProduct(object): supports_multiple_types = False def __init__(self, product_id=None, reference_name=None, name=None, object_type=None, summary=None, purchasable=None, entitled=None, entitlement_reason=None, active_entitlement_count=None, purchase_mode=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[ProductType], Optional[str], Optional[PurchasableState], Optional[EntitledState], Optional[EntitlementReason], Optional[int], Optional[PurchaseMode]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[ProductType_8f71260a], Optional[str], Optional[PurchasableState_f8ea2076], Optional[EntitledState_c546a5da], Optional[EntitlementReason_43c3309e], Optional[int], Optional[PurchaseMode_156cd096]) -> None """ :param product_id: Product Id diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_product_transactions_response.py b/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_product_transactions_response.py index b71831c2..eff5cb27 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_product_transactions_response.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_product_transactions_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.monetization.transactions import Transactions - from ask_sdk_model.services.monetization.metadata import Metadata + from ask_sdk_model.services.monetization.metadata import Metadata as Metadata_a873d209 + from ask_sdk_model.services.monetization.transactions import Transactions as Transactions_c92d5d49 class InSkillProductTransactionsResponse(object): @@ -48,7 +48,7 @@ class InSkillProductTransactionsResponse(object): supports_multiple_types = False def __init__(self, results=None, metadata=None): - # type: (Optional[List[Transactions]], Optional[Metadata]) -> None + # type: (Optional[List[Transactions_c92d5d49]], Optional[Metadata_a873d209]) -> None """ :param results: List of transactions of in skill products purchases diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_products_response.py b/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_products_response.py index 21196f77..3a3be9d9 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_products_response.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/in_skill_products_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.monetization.in_skill_product import InSkillProduct + from ask_sdk_model.services.monetization.in_skill_product import InSkillProduct as InSkillProduct_81648c45 class InSkillProductsResponse(object): @@ -51,7 +51,7 @@ class InSkillProductsResponse(object): supports_multiple_types = False def __init__(self, in_skill_products=None, is_truncated=None, next_token=None): - # type: (Optional[List[InSkillProduct]], Optional[bool], Optional[str]) -> None + # type: (Optional[List[InSkillProduct_81648c45]], Optional[bool], Optional[str]) -> None """ :param in_skill_products: List of In-Skill Products diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/metadata.py b/ask-sdk-model/ask_sdk_model/services/monetization/metadata.py index 841366a5..470e1d61 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/metadata.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/metadata.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.monetization.result_set import ResultSet + from ask_sdk_model.services.monetization.result_set import ResultSet as ResultSet_6c062fc class Metadata(object): @@ -43,7 +43,7 @@ class Metadata(object): supports_multiple_types = False def __init__(self, result_set=None): - # type: (Optional[ResultSet]) -> None + # type: (Optional[ResultSet_6c062fc]) -> None """ :param result_set: diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/monetization_service_client.py b/ask-sdk-model/ask_sdk_model/services/monetization/monetization_service_client.py index 9d6443b7..fbe6467f 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/monetization_service_client.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/monetization_service_client.py @@ -30,11 +30,11 @@ if typing.TYPE_CHECKING: from typing import Dict, List, Union, Any from datetime import datetime - from ask_sdk_model.services.monetization.error import Error - from ask_sdk_model.services.monetization.in_skill_product import InSkillProduct - from ask_sdk_model.services.monetization.in_skill_products_response import InSkillProductsResponse - from ask_sdk_model.services.monetization.in_skill_product_transactions_response import InSkillProductTransactionsResponse + from ask_sdk_model.services.monetization.in_skill_products_response import InSkillProductsResponse as InSkillProductsResponse_3986bfbc + from ask_sdk_model.services.monetization.error import Error as Error_c27e519d + from ask_sdk_model.services.monetization.in_skill_product_transactions_response import InSkillProductTransactionsResponse as InSkillProductTransactionsResponse_a4649d2f import bool + from ask_sdk_model.services.monetization.in_skill_product import InSkillProduct as InSkillProduct_81648c45 class MonetizationServiceClient(BaseServiceClient): @@ -55,7 +55,7 @@ def __init__(self, api_configuration, custom_user_agent=None): self.user_agent = user_agent_info(sdk_version="1.0.0", custom_user_agent=custom_user_agent) def get_in_skill_products(self, accept_language, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, Error, InSkillProductsResponse] + # type: (str, **Any) -> Union[ApiResponse, object, Error_c27e519d, InSkillProductsResponse_3986bfbc] """ Gets In-Skill Products based on user's context for the Skill. @@ -74,7 +74,7 @@ def get_in_skill_products(self, accept_language, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error, InSkillProductsResponse] + :rtype: Union[ApiResponse, object, Error_c27e519d, InSkillProductsResponse_3986bfbc] """ operation_name = "get_in_skill_products" params = locals() @@ -140,9 +140,10 @@ def get_in_skill_products(self, accept_language, **kwargs): if full_response: return api_response return api_response.body + def get_in_skill_product(self, accept_language, product_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, Error, InSkillProduct] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_c27e519d, InSkillProduct_81648c45] """ Get In-Skill Product information based on user context for the Skill. @@ -153,7 +154,7 @@ def get_in_skill_product(self, accept_language, product_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error, InSkillProduct] + :rtype: Union[ApiResponse, object, Error_c27e519d, InSkillProduct_81648c45] """ operation_name = "get_in_skill_product" params = locals() @@ -216,9 +217,10 @@ def get_in_skill_product(self, accept_language, product_id, **kwargs): if full_response: return api_response return api_response.body + def get_in_skill_products_transactions(self, accept_language, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, Error, InSkillProductTransactionsResponse] + # type: (str, **Any) -> Union[ApiResponse, object, InSkillProductTransactionsResponse_a4649d2f, Error_c27e519d] """ Returns transactions of all in skill products purchases of the customer @@ -239,7 +241,7 @@ def get_in_skill_products_transactions(self, accept_language, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error, InSkillProductTransactionsResponse] + :rtype: Union[ApiResponse, object, InSkillProductTransactionsResponse_a4649d2f, Error_c27e519d] """ operation_name = "get_in_skill_products_transactions" params = locals() @@ -311,16 +313,17 @@ def get_in_skill_products_transactions(self, accept_language, **kwargs): if full_response: return api_response return api_response.body + def get_voice_purchase_setting(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, bool, Error] + # type: (**Any) -> Union[ApiResponse, object, bool, Error_c27e519d] """ Returns whether or not voice purchasing is enabled for the skill :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, bool, Error] + :rtype: Union[ApiResponse, object, bool, Error_c27e519d] """ operation_name = "get_voice_purchase_setting" params = locals() @@ -370,3 +373,4 @@ def get_voice_purchase_setting(self, **kwargs): if full_response: return api_response return api_response.body + diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/product_type.py b/ask-sdk-model/ask_sdk_model/services/monetization/product_type.py index 4f3b94e3..3682de6f 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/product_type.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/product_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ProductType(Enum): CONSUMABLE = "CONSUMABLE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ProductType): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/purchasable_state.py b/ask-sdk-model/ask_sdk_model/services/monetization/purchasable_state.py index f0e2f365..3ca41047 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/purchasable_state.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/purchasable_state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PurchasableState(Enum): NOT_PURCHASABLE = "NOT_PURCHASABLE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PurchasableState): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/purchase_mode.py b/ask-sdk-model/ask_sdk_model/services/monetization/purchase_mode.py index 7edc4b71..51bdb348 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/purchase_mode.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/purchase_mode.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PurchaseMode(Enum): LIVE = "LIVE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PurchaseMode): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/result_set.py b/ask-sdk-model/ask_sdk_model/services/monetization/result_set.py index d3c33c40..036624d0 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/result_set.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/result_set.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/status.py b/ask-sdk-model/ask_sdk_model/services/monetization/status.py index 1088a7be..12a89d2c 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/status.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -40,7 +40,7 @@ class Status(Enum): ERROR = "ERROR" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -56,7 +56,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Status): return False @@ -64,6 +64,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/monetization/transactions.py b/ask-sdk-model/ask_sdk_model/services/monetization/transactions.py index bed8315c..e7d2fce6 100644 --- a/ask-sdk-model/ask_sdk_model/services/monetization/transactions.py +++ b/ask-sdk-model/ask_sdk_model/services/monetization/transactions.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.monetization.status import Status + from ask_sdk_model.services.monetization.status import Status as Status_dffc19e9 class Transactions(object): @@ -55,7 +55,7 @@ class Transactions(object): supports_multiple_types = False def __init__(self, status=None, product_id=None, created_time=None, last_modified_time=None): - # type: (Optional[Status], Optional[str], Optional[datetime], Optional[datetime]) -> None + # type: (Optional[Status_dffc19e9], Optional[str], Optional[datetime], Optional[datetime]) -> None """ :param status: diff --git a/ask-sdk-model/ask_sdk_model/services/proactive_events/__init__.py b/ask-sdk-model/ask_sdk_model/services/proactive_events/__init__.py index b9685487..6fde86a4 100644 --- a/ask-sdk-model/ask_sdk_model/services/proactive_events/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/proactive_events/__init__.py @@ -15,9 +15,9 @@ from __future__ import absolute_import from .error import Error -from .relevant_audience import RelevantAudience -from .relevant_audience_type import RelevantAudienceType -from .create_proactive_event_request import CreateProactiveEventRequest from .skill_stage import SkillStage -from .proactive_events_service_client import ProactiveEventsServiceClient from .event import Event +from .proactive_events_service_client import ProactiveEventsServiceClient +from .relevant_audience_type import RelevantAudienceType +from .relevant_audience import RelevantAudience +from .create_proactive_event_request import CreateProactiveEventRequest diff --git a/ask-sdk-model/ask_sdk_model/services/proactive_events/create_proactive_event_request.py b/ask-sdk-model/ask_sdk_model/services/proactive_events/create_proactive_event_request.py index 117c0639..d276e882 100644 --- a/ask-sdk-model/ask_sdk_model/services/proactive_events/create_proactive_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/proactive_events/create_proactive_event_request.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.proactive_events.relevant_audience import RelevantAudience - from ask_sdk_model.services.proactive_events.event import Event + from ask_sdk_model.services.proactive_events.event import Event as Event_6f1ea2dd + from ask_sdk_model.services.proactive_events.relevant_audience import RelevantAudience as RelevantAudience_fa9e50d2 class CreateProactiveEventRequest(object): @@ -64,7 +64,7 @@ class CreateProactiveEventRequest(object): supports_multiple_types = False def __init__(self, timestamp=None, reference_id=None, expiry_time=None, event=None, localized_attributes=None, relevant_audience=None): - # type: (Optional[datetime], Optional[str], Optional[datetime], Optional[Event], Optional[List[object]], Optional[RelevantAudience]) -> None + # type: (Optional[datetime], Optional[str], Optional[datetime], Optional[Event_6f1ea2dd], Optional[List[object]], Optional[RelevantAudience_fa9e50d2]) -> None """ :param timestamp: The date and time of the event associated with this request, in ISO 8601 format. diff --git a/ask-sdk-model/ask_sdk_model/services/proactive_events/error.py b/ask-sdk-model/ask_sdk_model/services/proactive_events/error.py index 8f46815c..93828748 100644 --- a/ask-sdk-model/ask_sdk_model/services/proactive_events/error.py +++ b/ask-sdk-model/ask_sdk_model/services/proactive_events/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/proactive_events/event.py b/ask-sdk-model/ask_sdk_model/services/proactive_events/event.py index 67c7f4a4..661803a1 100644 --- a/ask-sdk-model/ask_sdk_model/services/proactive_events/event.py +++ b/ask-sdk-model/ask_sdk_model/services/proactive_events/event.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/proactive_events/proactive_events_service_client.py b/ask-sdk-model/ask_sdk_model/services/proactive_events/proactive_events_service_client.py index 720187e5..34bf856e 100644 --- a/ask-sdk-model/ask_sdk_model/services/proactive_events/proactive_events_service_client.py +++ b/ask-sdk-model/ask_sdk_model/services/proactive_events/proactive_events_service_client.py @@ -33,8 +33,8 @@ if typing.TYPE_CHECKING: from typing import Dict, List, Union, Any from datetime import datetime - from ask_sdk_model.services.proactive_events.error import Error - from ask_sdk_model.services.proactive_events.create_proactive_event_request import CreateProactiveEventRequest + from ask_sdk_model.services.proactive_events.error import Error as Error_23859739 + from ask_sdk_model.services.proactive_events.create_proactive_event_request import CreateProactiveEventRequest as CreateProactiveEventRequest_3eea71c2 class ProactiveEventsServiceClient(BaseServiceClient): @@ -71,7 +71,7 @@ def __init__(self, api_configuration, authentication_configuration, lwa_client=N self._lwa_service_client = lwa_client def create_proactive_event(self, create_proactive_event_request, stage, **kwargs): - # type: (CreateProactiveEventRequest, SkillStage, **Any) -> Union[ApiResponse, Error] + # type: (CreateProactiveEventRequest_3eea71c2, SkillStage, **Any) -> Union[ApiResponse, object, Error_23859739] """ Create a new proactive event in live stage. @@ -80,7 +80,7 @@ def create_proactive_event(self, create_proactive_event_request, stage, **kwargs :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error] + :rtype: Union[ApiResponse, object, Error_23859739] """ operation_name = "create_proactive_event" params = locals() @@ -143,3 +143,4 @@ def create_proactive_event(self, create_proactive_event_request, stage, **kwargs if full_response: return api_response + return None diff --git a/ask-sdk-model/ask_sdk_model/services/proactive_events/relevant_audience.py b/ask-sdk-model/ask_sdk_model/services/proactive_events/relevant_audience.py index da68eae5..922f9576 100644 --- a/ask-sdk-model/ask_sdk_model/services/proactive_events/relevant_audience.py +++ b/ask-sdk-model/ask_sdk_model/services/proactive_events/relevant_audience.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.proactive_events.relevant_audience_type import RelevantAudienceType + from ask_sdk_model.services.proactive_events.relevant_audience_type import RelevantAudienceType as RelevantAudienceType_a189080d class RelevantAudience(object): @@ -49,7 +49,7 @@ class RelevantAudience(object): supports_multiple_types = False def __init__(self, object_type=None, payload=None): - # type: (Optional[RelevantAudienceType], Optional[object]) -> None + # type: (Optional[RelevantAudienceType_a189080d], Optional[object]) -> None """The audience for this event. :param object_type: diff --git a/ask-sdk-model/ask_sdk_model/services/proactive_events/relevant_audience_type.py b/ask-sdk-model/ask_sdk_model/services/proactive_events/relevant_audience_type.py index cff0ea59..1b30fcda 100644 --- a/ask-sdk-model/ask_sdk_model/services/proactive_events/relevant_audience_type.py +++ b/ask-sdk-model/ask_sdk_model/services/proactive_events/relevant_audience_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class RelevantAudienceType(Enum): Multicast = "Multicast" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, RelevantAudienceType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/proactive_events/skill_stage.py b/ask-sdk-model/ask_sdk_model/services/proactive_events/skill_stage.py index a6e53c02..00987e92 100644 --- a/ask-sdk-model/ask_sdk_model/services/proactive_events/skill_stage.py +++ b/ask-sdk-model/ask_sdk_model/services/proactive_events/skill_stage.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class SkillStage(Enum): LIVE = "LIVE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SkillStage): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/__init__.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/__init__.py index b9ae74fe..9549959b 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/__init__.py @@ -14,28 +14,28 @@ # from __future__ import absolute_import -from .reminder_deleted_event_request import ReminderDeletedEventRequest -from .reminder import Reminder -from .reminder_started_event_request import ReminderStartedEventRequest -from .error import Error from .get_reminder_response import GetReminderResponse -from .alert_info import AlertInfo -from .trigger import Trigger -from .reminder_response import ReminderResponse -from .get_reminders_response import GetRemindersResponse -from .reminder_updated_event_request import ReminderUpdatedEventRequest -from .reminder_status_changed_event_request import ReminderStatusChangedEventRequest +from .reminder_request import ReminderRequest from .recurrence_freq import RecurrenceFreq from .spoken_text import SpokenText -from .alert_info_spoken_info import SpokenInfo -from .status import Status -from .recurrence import Recurrence +from .error import Error +from .reminder_started_event_request import ReminderStartedEventRequest +from .reminder_created_event_request import ReminderCreatedEventRequest +from .reminder import Reminder +from .reminder_deleted_event_request import ReminderDeletedEventRequest from .recurrence_day import RecurrenceDay -from .reminder_deleted_event import ReminderDeletedEvent +from .reminder_status_changed_event_request import ReminderStatusChangedEventRequest from .push_notification_status import PushNotificationStatus -from .trigger_type import TriggerType -from .reminder_created_event_request import ReminderCreatedEventRequest -from .reminder_request import ReminderRequest from .event import Event -from .push_notification import PushNotification from .reminder_management_service_client import ReminderManagementServiceClient +from .get_reminders_response import GetRemindersResponse +from .reminder_response import ReminderResponse +from .spoken_info import SpokenInfo +from .alert_info import AlertInfo +from .reminder_deleted_event import ReminderDeletedEvent +from .reminder_updated_event_request import ReminderUpdatedEventRequest +from .status import Status +from .trigger_type import TriggerType +from .push_notification import PushNotification +from .trigger import Trigger +from .recurrence import Recurrence diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/alert_info.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/alert_info.py index 327629a9..df8c7753 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/alert_info.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/alert_info.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.alert_info_spoken_info import SpokenInfo + from ask_sdk_model.services.reminder_management.alert_info_spoken_info import SpokenInfo as SpokenInfo_e1d2a971 class AlertInfo(object): @@ -45,7 +45,7 @@ class AlertInfo(object): supports_multiple_types = False def __init__(self, spoken_info=None): - # type: (Optional[SpokenInfo]) -> None + # type: (Optional[SpokenInfo_e1d2a971]) -> None """Alert info for VUI / GUI :param spoken_info: diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/error.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/error.py index 9ccae550..31804e67 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/error.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/event.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/event.py index c874005c..556ca202 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/event.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/event.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.status import Status + from ask_sdk_model.services.reminder_management.status import Status as Status_fbbd2410 class Event(object): @@ -47,7 +47,7 @@ class Event(object): supports_multiple_types = False def __init__(self, status=None, alert_token=None): - # type: (Optional[Status], Optional[str]) -> None + # type: (Optional[Status_fbbd2410], Optional[str]) -> None """ :param status: diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/get_reminder_response.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/get_reminder_response.py index b345c1c4..839d2b51 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/get_reminder_response.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/get_reminder_response.py @@ -22,12 +22,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.push_notification import PushNotification - from ask_sdk_model.services.reminder_management.status import Status - from ask_sdk_model.services.reminder_management.alert_info import AlertInfo - from ask_sdk_model.services.reminder_management.trigger import Trigger + from ask_sdk_model.services.reminder_management.trigger import Trigger as Trigger_4ec8964 + from ask_sdk_model.services.reminder_management.status import Status as Status_fbbd2410 + from ask_sdk_model.services.reminder_management.push_notification import PushNotification as PushNotification_dd7adc41 + from ask_sdk_model.services.reminder_management.alert_info import AlertInfo as AlertInfo_97082f4b class GetReminderResponse(Reminder): @@ -77,7 +77,7 @@ class GetReminderResponse(Reminder): supports_multiple_types = False def __init__(self, alert_token=None, created_time=None, updated_time=None, status=None, trigger=None, alert_info=None, push_notification=None, version=None): - # type: (Optional[str], Optional[datetime], Optional[datetime], Optional[Status], Optional[Trigger], Optional[AlertInfo], Optional[PushNotification], Optional[str]) -> None + # type: (Optional[str], Optional[datetime], Optional[datetime], Optional[Status_fbbd2410], Optional[Trigger_4ec8964], Optional[AlertInfo_97082f4b], Optional[PushNotification_dd7adc41], Optional[str]) -> None """Response object for get reminder request :param alert_token: Unique id of this reminder alert diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/get_reminders_response.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/get_reminders_response.py index 9eee8d9f..cab4f285 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/get_reminders_response.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/get_reminders_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.reminder import Reminder + from ask_sdk_model.services.reminder_management.reminder import Reminder as Reminder_9b9bac10 class GetRemindersResponse(object): @@ -53,7 +53,7 @@ class GetRemindersResponse(object): supports_multiple_types = False def __init__(self, total_count=None, alerts=None, links=None): - # type: (Optional[str], Optional[List[Reminder]], Optional[str]) -> None + # type: (Optional[str], Optional[List[Reminder_9b9bac10]], Optional[str]) -> None """Response object for get reminders request :param total_count: Total count of reminders returned diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/push_notification.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/push_notification.py index c7b2db84..36c20cf5 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/push_notification.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/push_notification.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.push_notification_status import PushNotificationStatus + from ask_sdk_model.services.reminder_management.push_notification_status import PushNotificationStatus as PushNotificationStatus_149f8706 class PushNotification(object): @@ -45,7 +45,7 @@ class PushNotification(object): supports_multiple_types = False def __init__(self, status=None): - # type: (Optional[PushNotificationStatus]) -> None + # type: (Optional[PushNotificationStatus_149f8706]) -> None """Enable / disable reminders push notifications to Alexa mobile apps :param status: diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/push_notification_status.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/push_notification_status.py index 2a8048a8..ca3c1844 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/push_notification_status.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/push_notification_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PushNotificationStatus(Enum): DISABLED = "DISABLED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PushNotificationStatus): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence.py index a14a13d5..61555aa3 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.recurrence_freq import RecurrenceFreq - from ask_sdk_model.services.reminder_management.recurrence_day import RecurrenceDay + from ask_sdk_model.services.reminder_management.recurrence_day import RecurrenceDay as RecurrenceDay_64e1cd49 + from ask_sdk_model.services.reminder_management.recurrence_freq import RecurrenceFreq as RecurrenceFreq_e8445a4d class Recurrence(object): @@ -66,7 +66,7 @@ class Recurrence(object): supports_multiple_types = False def __init__(self, freq=None, by_day=None, interval=None, start_date_time=None, end_date_time=None, recurrence_rules=None): - # type: (Optional[RecurrenceFreq], Optional[List[RecurrenceDay]], Optional[int], Optional[datetime], Optional[datetime], Optional[List[object]]) -> None + # type: (Optional[RecurrenceFreq_e8445a4d], Optional[List[RecurrenceDay_64e1cd49]], Optional[int], Optional[datetime], Optional[datetime], Optional[List[object]]) -> None """Recurring date/time using the RFC 5545 standard in JSON object form :param freq: diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence_day.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence_day.py index e61e8de7..a7444284 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence_day.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence_day.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -42,7 +42,7 @@ class RecurrenceDay(Enum): SA = "SA" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -58,7 +58,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, RecurrenceDay): return False @@ -66,6 +66,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence_freq.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence_freq.py index 3de0d740..51344953 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence_freq.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/recurrence_freq.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class RecurrenceFreq(Enum): DAILY = "DAILY" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, RecurrenceFreq): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder.py index edaceb25..35c2f03d 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.push_notification import PushNotification - from ask_sdk_model.services.reminder_management.status import Status - from ask_sdk_model.services.reminder_management.alert_info import AlertInfo - from ask_sdk_model.services.reminder_management.trigger import Trigger + from ask_sdk_model.services.reminder_management.trigger import Trigger as Trigger_4ec8964 + from ask_sdk_model.services.reminder_management.status import Status as Status_fbbd2410 + from ask_sdk_model.services.reminder_management.push_notification import PushNotification as PushNotification_dd7adc41 + from ask_sdk_model.services.reminder_management.alert_info import AlertInfo as AlertInfo_97082f4b class Reminder(object): @@ -76,7 +76,7 @@ class Reminder(object): supports_multiple_types = False def __init__(self, alert_token=None, created_time=None, updated_time=None, status=None, trigger=None, alert_info=None, push_notification=None, version=None): - # type: (Optional[str], Optional[datetime], Optional[datetime], Optional[Status], Optional[Trigger], Optional[AlertInfo], Optional[PushNotification], Optional[str]) -> None + # type: (Optional[str], Optional[datetime], Optional[datetime], Optional[Status_fbbd2410], Optional[Trigger_4ec8964], Optional[AlertInfo_97082f4b], Optional[PushNotification_dd7adc41], Optional[str]) -> None """Reminder object :param alert_token: Unique id of this reminder alert diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_created_event_request.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_created_event_request.py index 8cfd2d42..589b030c 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_created_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_created_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.event import Event + from ask_sdk_model.services.reminder_management.event import Event as Event_7b12c528 class ReminderCreatedEventRequest(Request): @@ -58,7 +58,7 @@ class ReminderCreatedEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[Event]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[Event_7b12c528]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_deleted_event.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_deleted_event.py index f19bd172..88d02f23 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_deleted_event.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_deleted_event.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_deleted_event_request.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_deleted_event_request.py index cdaa826c..08465924 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_deleted_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_deleted_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.reminder_deleted_event import ReminderDeletedEvent + from ask_sdk_model.services.reminder_management.reminder_deleted_event import ReminderDeletedEvent as ReminderDeletedEvent_c49d505c class ReminderDeletedEventRequest(Request): @@ -58,7 +58,7 @@ class ReminderDeletedEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[ReminderDeletedEvent]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[ReminderDeletedEvent_c49d505c]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_management_service_client.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_management_service_client.py index a39938b3..da03289d 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_management_service_client.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_management_service_client.py @@ -30,11 +30,11 @@ if typing.TYPE_CHECKING: from typing import Dict, List, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.get_reminders_response import GetRemindersResponse - from ask_sdk_model.services.reminder_management.get_reminder_response import GetReminderResponse - from ask_sdk_model.services.reminder_management.reminder_response import ReminderResponse - from ask_sdk_model.services.reminder_management.reminder_request import ReminderRequest - from ask_sdk_model.services.reminder_management.error import Error + from ask_sdk_model.services.reminder_management.get_reminders_response import GetRemindersResponse as GetRemindersResponse_6fac8e34 + from ask_sdk_model.services.reminder_management.get_reminder_response import GetReminderResponse as GetReminderResponse_bbe3cb02 + from ask_sdk_model.services.reminder_management.error import Error as Error_2f79b984 + from ask_sdk_model.services.reminder_management.reminder_request import ReminderRequest as ReminderRequest_85a375af + from ask_sdk_model.services.reminder_management.reminder_response import ReminderResponse as ReminderResponse_a3c43231 class ReminderManagementServiceClient(BaseServiceClient): @@ -55,7 +55,7 @@ def __init__(self, api_configuration, custom_user_agent=None): self.user_agent = user_agent_info(sdk_version="1.0.0", custom_user_agent=custom_user_agent) def delete_reminder(self, alert_token, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, Error] + # type: (str, **Any) -> Union[ApiResponse, object, Error_2f79b984] """ This API is invoked by the skill to delete a single reminder. @@ -64,7 +64,7 @@ def delete_reminder(self, alert_token, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error] + :rtype: Union[ApiResponse, object, Error_2f79b984] """ operation_name = "delete_reminder" params = locals() @@ -120,9 +120,10 @@ def delete_reminder(self, alert_token, **kwargs): if full_response: return api_response + return None def get_reminder(self, alert_token, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, GetReminderResponse, Error] + # type: (str, **Any) -> Union[ApiResponse, object, Error_2f79b984, GetReminderResponse_bbe3cb02] """ This API is invoked by the skill to get a single reminder. @@ -131,7 +132,7 @@ def get_reminder(self, alert_token, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, GetReminderResponse, Error] + :rtype: Union[ApiResponse, object, Error_2f79b984, GetReminderResponse_bbe3cb02] """ operation_name = "get_reminder" params = locals() @@ -187,9 +188,10 @@ def get_reminder(self, alert_token, **kwargs): if full_response: return api_response return api_response.body + def update_reminder(self, alert_token, reminder_request, **kwargs): - # type: (str, ReminderRequest, **Any) -> Union[ApiResponse, ReminderResponse, Error] + # type: (str, ReminderRequest_85a375af, **Any) -> Union[ApiResponse, object, Error_2f79b984, ReminderResponse_a3c43231] """ This API is invoked by the skill to update a reminder. @@ -200,7 +202,7 @@ def update_reminder(self, alert_token, reminder_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ReminderResponse, Error] + :rtype: Union[ApiResponse, object, Error_2f79b984, ReminderResponse_a3c43231] """ operation_name = "update_reminder" params = locals() @@ -264,16 +266,17 @@ def update_reminder(self, alert_token, reminder_request, **kwargs): if full_response: return api_response return api_response.body + def get_reminders(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, GetRemindersResponse, Error] + # type: (**Any) -> Union[ApiResponse, object, Error_2f79b984, GetRemindersResponse_6fac8e34] """ This API is invoked by the skill to get a all reminders created by the caller. :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, GetRemindersResponse, Error] + :rtype: Union[ApiResponse, object, Error_2f79b984, GetRemindersResponse_6fac8e34] """ operation_name = "get_reminders" params = locals() @@ -281,7 +284,7 @@ def get_reminders(self, **kwargs): params[key] = val del params['kwargs'] - resource_path = '/v1/alerts/reminders/' + resource_path = '/v1/alerts/reminders' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -323,9 +326,10 @@ def get_reminders(self, **kwargs): if full_response: return api_response return api_response.body + def create_reminder(self, reminder_request, **kwargs): - # type: (ReminderRequest, **Any) -> Union[ApiResponse, ReminderResponse, Error] + # type: (ReminderRequest_85a375af, **Any) -> Union[ApiResponse, object, Error_2f79b984, ReminderResponse_a3c43231] """ This API is invoked by the skill to create a new reminder. @@ -334,7 +338,7 @@ def create_reminder(self, reminder_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ReminderResponse, Error] + :rtype: Union[ApiResponse, object, Error_2f79b984, ReminderResponse_a3c43231] """ operation_name = "create_reminder" params = locals() @@ -346,7 +350,7 @@ def create_reminder(self, reminder_request, **kwargs): raise ValueError( "Missing the required parameter `reminder_request` when calling `" + operation_name + "`") - resource_path = '/v1/alerts/reminders/' + resource_path = '/v1/alerts/reminders' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -393,3 +397,4 @@ def create_reminder(self, reminder_request, **kwargs): if full_response: return api_response return api_response.body + diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_request.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_request.py index ab46afc6..e02ef64b 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_request.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_request.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.push_notification import PushNotification - from ask_sdk_model.services.reminder_management.alert_info import AlertInfo - from ask_sdk_model.services.reminder_management.trigger import Trigger + from ask_sdk_model.services.reminder_management.trigger import Trigger as Trigger_4ec8964 + from ask_sdk_model.services.reminder_management.push_notification import PushNotification as PushNotification_dd7adc41 + from ask_sdk_model.services.reminder_management.alert_info import AlertInfo as AlertInfo_97082f4b class ReminderRequest(object): @@ -59,7 +59,7 @@ class ReminderRequest(object): supports_multiple_types = False def __init__(self, request_time=None, trigger=None, alert_info=None, push_notification=None): - # type: (Optional[datetime], Optional[Trigger], Optional[AlertInfo], Optional[PushNotification]) -> None + # type: (Optional[datetime], Optional[Trigger_4ec8964], Optional[AlertInfo_97082f4b], Optional[PushNotification_dd7adc41]) -> None """Input request for creating a reminder :param request_time: Valid ISO 8601 format - Creation time of this reminder alert diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_response.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_response.py index b5bd18a9..33a18615 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_response.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.status import Status + from ask_sdk_model.services.reminder_management.status import Status as Status_fbbd2410 class ReminderResponse(object): @@ -65,7 +65,7 @@ class ReminderResponse(object): supports_multiple_types = False def __init__(self, alert_token=None, created_time=None, updated_time=None, status=None, version=None, href=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[Status], Optional[str], Optional[str]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[Status_fbbd2410], Optional[str], Optional[str]) -> None """Response object for post/put/delete reminder request :param alert_token: Unique id of this reminder alert diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_started_event_request.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_started_event_request.py index 89a2a257..da9175ca 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_started_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_started_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.event import Event + from ask_sdk_model.services.reminder_management.event import Event as Event_7b12c528 class ReminderStartedEventRequest(Request): @@ -58,7 +58,7 @@ class ReminderStartedEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[Event]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[Event_7b12c528]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_status_changed_event_request.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_status_changed_event_request.py index 80522135..b7f64460 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_status_changed_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_status_changed_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.event import Event + from ask_sdk_model.services.reminder_management.event import Event as Event_7b12c528 class ReminderStatusChangedEventRequest(Request): @@ -58,7 +58,7 @@ class ReminderStatusChangedEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[Event]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[Event_7b12c528]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_updated_event_request.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_updated_event_request.py index 8be97d1d..66e583af 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_updated_event_request.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/reminder_updated_event_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.event import Event + from ask_sdk_model.services.reminder_management.event import Event as Event_7b12c528 class ReminderUpdatedEventRequest(Request): @@ -58,7 +58,7 @@ class ReminderUpdatedEventRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, body=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[Event]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[Event_7b12c528]) -> None """ :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/alert_info_spoken_info.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/spoken_info.py similarity index 95% rename from ask-sdk-model/ask_sdk_model/services/reminder_management/alert_info_spoken_info.py rename to ask-sdk-model/ask_sdk_model/services/reminder_management/spoken_info.py index 33c24090..878205b7 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/alert_info_spoken_info.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/spoken_info.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.spoken_text import SpokenText + from ask_sdk_model.services.reminder_management.spoken_text import SpokenText as SpokenText_b927b411 class SpokenInfo(object): @@ -45,7 +45,7 @@ class SpokenInfo(object): supports_multiple_types = False def __init__(self, content=None): - # type: (Optional[List[SpokenText]]) -> None + # type: (Optional[List[SpokenText_b927b411]]) -> None """Parameters for VUI presentation of the reminder :param content: diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/spoken_text.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/spoken_text.py index 490dbe5a..473049af 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/spoken_text.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/spoken_text.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/status.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/status.py index b747c691..d8dfa78b 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/status.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class Status(Enum): COMPLETED = "COMPLETED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Status): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/trigger.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/trigger.py index a8a8eb39..ef8a3bf1 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/trigger.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/trigger.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.reminder_management.trigger_type import TriggerType - from ask_sdk_model.services.reminder_management.recurrence import Recurrence + from ask_sdk_model.services.reminder_management.trigger_type import TriggerType as TriggerType_e3ee0c23 + from ask_sdk_model.services.reminder_management.recurrence import Recurrence as Recurrence_12788150 class Trigger(object): @@ -62,7 +62,7 @@ class Trigger(object): supports_multiple_types = False def __init__(self, object_type=None, scheduled_time=None, offset_in_seconds=None, time_zone_id=None, recurrence=None): - # type: (Optional[TriggerType], Optional[datetime], Optional[int], Optional[str], Optional[Recurrence]) -> None + # type: (Optional[TriggerType_e3ee0c23], Optional[datetime], Optional[int], Optional[str], Optional[Recurrence_12788150]) -> None """Trigger information for Reminder :param object_type: diff --git a/ask-sdk-model/ask_sdk_model/services/reminder_management/trigger_type.py b/ask-sdk-model/ask_sdk_model/services/reminder_management/trigger_type.py index 8779ddb5..e9ed4641 100644 --- a/ask-sdk-model/ask_sdk_model/services/reminder_management/trigger_type.py +++ b/ask-sdk-model/ask_sdk_model/services/reminder_management/trigger_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class TriggerType(Enum): SCHEDULED_RELATIVE = "SCHEDULED_RELATIVE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, TriggerType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/service_client_factory.py b/ask-sdk-model/ask_sdk_model/services/service_client_factory.py index 30e9e464..d6b1c2e4 100644 --- a/ask-sdk-model/ask_sdk_model/services/service_client_factory.py +++ b/ask-sdk-model/ask_sdk_model/services/service_client_factory.py @@ -18,6 +18,7 @@ import re import six import typing +from .datastore import DatastoreServiceClient from .device_address import DeviceAddressServiceClient from .directive import DirectiveServiceClient from .endpoint_enumeration import EndpointEnumerationServiceClient diff --git a/ask-sdk-model/ask_sdk_model/services/skill_messaging/error.py b/ask-sdk-model/ask_sdk_model/services/skill_messaging/error.py index 8f46815c..93828748 100644 --- a/ask-sdk-model/ask_sdk_model/services/skill_messaging/error.py +++ b/ask-sdk-model/ask_sdk_model/services/skill_messaging/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/skill_messaging/send_skill_messaging_request.py b/ask-sdk-model/ask_sdk_model/services/skill_messaging/send_skill_messaging_request.py index d99ff437..e4e81c2f 100644 --- a/ask-sdk-model/ask_sdk_model/services/skill_messaging/send_skill_messaging_request.py +++ b/ask-sdk-model/ask_sdk_model/services/skill_messaging/send_skill_messaging_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/skill_messaging/skill_messaging_service_client.py b/ask-sdk-model/ask_sdk_model/services/skill_messaging/skill_messaging_service_client.py index 0781346a..5d7b9289 100644 --- a/ask-sdk-model/ask_sdk_model/services/skill_messaging/skill_messaging_service_client.py +++ b/ask-sdk-model/ask_sdk_model/services/skill_messaging/skill_messaging_service_client.py @@ -32,8 +32,8 @@ if typing.TYPE_CHECKING: from typing import Dict, List, Union, Any from datetime import datetime - from ask_sdk_model.services.skill_messaging.send_skill_messaging_request import SendSkillMessagingRequest - from ask_sdk_model.services.skill_messaging.error import Error + from ask_sdk_model.services.skill_messaging.error import Error as Error_3e9888ea + from ask_sdk_model.services.skill_messaging.send_skill_messaging_request import SendSkillMessagingRequest as SendSkillMessagingRequest_c84462d class SkillMessagingServiceClient(BaseServiceClient): @@ -70,7 +70,7 @@ def __init__(self, api_configuration, authentication_configuration, lwa_client=N self._lwa_service_client = lwa_client def send_skill_message(self, user_id, send_skill_messaging_request, **kwargs): - # type: (str, SendSkillMessagingRequest, **Any) -> Union[ApiResponse, Error] + # type: (str, SendSkillMessagingRequest_c84462d, **Any) -> Union[ApiResponse, object, Error_3e9888ea] """ Send a message request to a skill for a specified user. @@ -81,7 +81,7 @@ def send_skill_message(self, user_id, send_skill_messaging_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error] + :rtype: Union[ApiResponse, object, Error_3e9888ea] """ operation_name = "send_skill_message" params = locals() @@ -148,3 +148,4 @@ def send_skill_message(self, user_id, send_skill_messaging_request, **kwargs): if full_response: return api_response + return None diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/__init__.py b/ask-sdk-model/ask_sdk_model/services/timer_management/__init__.py index 46acb26f..a733f916 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/__init__.py @@ -14,21 +14,21 @@ # from __future__ import absolute_import -from .error import Error +from .visibility import Visibility +from .text_to_announce import TextToAnnounce from .notification_config import NotificationConfig -from .timer_response import TimerResponse -from .timer_request import TimerRequest -from .display_experience import DisplayExperience +from .error import Error from .task import Task +from .timer_management_service_client import TimerManagementServiceClient from .launch_task_operation import LaunchTaskOperation -from .visibility import Visibility -from .status import Status +from .timers_response import TimersResponse +from .notify_only_operation import NotifyOnlyOperation +from .timer_request import TimerRequest +from .display_experience import DisplayExperience from .triggering_behavior import TriggeringBehavior -from .text_to_confirm import TextToConfirm from .creation_behavior import CreationBehavior -from .timer_management_service_client import TimerManagementServiceClient +from .timer_response import TimerResponse from .announce_operation import AnnounceOperation -from .timers_response import TimersResponse +from .text_to_confirm import TextToConfirm +from .status import Status from .operation import Operation -from .text_to_announce import TextToAnnounce -from .notify_only_operation import NotifyOnlyOperation diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/announce_operation.py b/ask-sdk-model/ask_sdk_model/services/timer_management/announce_operation.py index 6936d13f..663aebbf 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/announce_operation.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/announce_operation.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.timer_management.text_to_announce import TextToAnnounce + from ask_sdk_model.services.timer_management.text_to_announce import TextToAnnounce as TextToAnnounce_94c703b3 class AnnounceOperation(Operation): @@ -48,7 +48,7 @@ class AnnounceOperation(Operation): supports_multiple_types = False def __init__(self, text_to_announce=None): - # type: (Optional[List[TextToAnnounce]]) -> None + # type: (Optional[List[TextToAnnounce_94c703b3]]) -> None """ANNOUNCE trigger behavior represents announcing a certain text that the developer wants to be read out at the expiration of the timer. :param text_to_announce: diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/creation_behavior.py b/ask-sdk-model/ask_sdk_model/services/timer_management/creation_behavior.py index a67c1593..2efcb39e 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/creation_behavior.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/creation_behavior.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.timer_management.display_experience import DisplayExperience + from ask_sdk_model.services.timer_management.display_experience import DisplayExperience as DisplayExperience_450b6a16 class CreationBehavior(object): @@ -45,7 +45,7 @@ class CreationBehavior(object): supports_multiple_types = False def __init__(self, display_experience=None): - # type: (Optional[DisplayExperience]) -> None + # type: (Optional[DisplayExperience_450b6a16]) -> None """Whether the native Timer GUI is shown for 8-seconds upon Timer Creation. :param display_experience: diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/display_experience.py b/ask-sdk-model/ask_sdk_model/services/timer_management/display_experience.py index ac86f3d0..2df82fdd 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/display_experience.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/display_experience.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.timer_management.visibility import Visibility + from ask_sdk_model.services.timer_management.visibility import Visibility as Visibility_d5053c1d class DisplayExperience(object): @@ -45,7 +45,7 @@ class DisplayExperience(object): supports_multiple_types = False def __init__(self, visibility=None): - # type: (Optional[Visibility]) -> None + # type: (Optional[Visibility_d5053c1d]) -> None """Multi model presentation of the timer creation. :param visibility: diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/error.py b/ask-sdk-model/ask_sdk_model/services/timer_management/error.py index 3e38a7da..b7251000 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/error.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/launch_task_operation.py b/ask-sdk-model/ask_sdk_model/services/timer_management/launch_task_operation.py index 80883991..f3a7b2a6 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/launch_task_operation.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/launch_task_operation.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.timer_management.text_to_confirm import TextToConfirm - from ask_sdk_model.services.timer_management.task import Task + from ask_sdk_model.services.timer_management.task import Task as Task_55b9f77d + from ask_sdk_model.services.timer_management.text_to_confirm import TextToConfirm as TextToConfirm_792b9be7 class LaunchTaskOperation(Operation): @@ -53,7 +53,7 @@ class LaunchTaskOperation(Operation): supports_multiple_types = False def __init__(self, text_to_confirm=None, task=None): - # type: (Optional[List[TextToConfirm]], Optional[Task]) -> None + # type: (Optional[List[TextToConfirm_792b9be7]], Optional[Task_55b9f77d]) -> None """LAUNCH_TASK trigger behavior representing launch a Skill Connection task exposed by the same skill. :param text_to_confirm: diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/notification_config.py b/ask-sdk-model/ask_sdk_model/services/timer_management/notification_config.py index bc729f31..0a45e261 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/notification_config.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/notification_config.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/notify_only_operation.py b/ask-sdk-model/ask_sdk_model/services/timer_management/notify_only_operation.py index 4a293190..f5855117 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/notify_only_operation.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/notify_only_operation.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/operation.py b/ask-sdk-model/ask_sdk_model/services/timer_management/operation.py index f45139bf..741a0baa 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/operation.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/operation.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/status.py b/ask-sdk-model/ask_sdk_model/services/timer_management/status.py index 4ec73ec5..11948aed 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/status.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class Status(Enum): OFF = "OFF" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Status): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/task.py b/ask-sdk-model/ask_sdk_model/services/timer_management/task.py index 26cb104d..7eaa6c48 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/task.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/task.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/text_to_announce.py b/ask-sdk-model/ask_sdk_model/services/timer_management/text_to_announce.py index 51d37dab..0982be9a 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/text_to_announce.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/text_to_announce.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/text_to_confirm.py b/ask-sdk-model/ask_sdk_model/services/timer_management/text_to_confirm.py index 39067d74..842a01b9 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/text_to_confirm.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/text_to_confirm.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/timer_management_service_client.py b/ask-sdk-model/ask_sdk_model/services/timer_management/timer_management_service_client.py index fd809bd1..55d5dca3 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/timer_management_service_client.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/timer_management_service_client.py @@ -30,10 +30,10 @@ if typing.TYPE_CHECKING: from typing import Dict, List, Union, Any from datetime import datetime - from ask_sdk_model.services.timer_management.timer_request import TimerRequest - from ask_sdk_model.services.timer_management.timer_response import TimerResponse - from ask_sdk_model.services.timer_management.timers_response import TimersResponse - from ask_sdk_model.services.timer_management.error import Error + from ask_sdk_model.services.timer_management.timers_response import TimersResponse as TimersResponse_df2de7c + from ask_sdk_model.services.timer_management.timer_request import TimerRequest as TimerRequest_5f036a34 + from ask_sdk_model.services.timer_management.error import Error as Error_249911d1 + from ask_sdk_model.services.timer_management.timer_response import TimerResponse as TimerResponse_5be9ee64 class TimerManagementServiceClient(BaseServiceClient): @@ -54,14 +54,14 @@ def __init__(self, api_configuration, custom_user_agent=None): self.user_agent = user_agent_info(sdk_version="1.0.0", custom_user_agent=custom_user_agent) def delete_timers(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, Error] + # type: (**Any) -> Union[ApiResponse, object, Error_249911d1] """ Delete all timers created by the skill. :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error] + :rtype: Union[ApiResponse, object, Error_249911d1] """ operation_name = "delete_timers" params = locals() @@ -69,7 +69,7 @@ def delete_timers(self, **kwargs): params[key] = val del params['kwargs'] - resource_path = '/v1/alerts/timers/' + resource_path = '/v1/alerts/timers' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -111,16 +111,17 @@ def delete_timers(self, **kwargs): if full_response: return api_response + return None def get_timers(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, Error, TimersResponse] + # type: (**Any) -> Union[ApiResponse, object, TimersResponse_df2de7c, Error_249911d1] """ Get all timers created by the skill. :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error, TimersResponse] + :rtype: Union[ApiResponse, object, TimersResponse_df2de7c, Error_249911d1] """ operation_name = "get_timers" params = locals() @@ -128,7 +129,7 @@ def get_timers(self, **kwargs): params[key] = val del params['kwargs'] - resource_path = '/v1/alerts/timers/' + resource_path = '/v1/alerts/timers' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -170,9 +171,10 @@ def get_timers(self, **kwargs): if full_response: return api_response return api_response.body + def delete_timer(self, id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, Error] + # type: (str, **Any) -> Union[ApiResponse, object, Error_249911d1] """ Delete a timer by ID. @@ -181,7 +183,7 @@ def delete_timer(self, id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error] + :rtype: Union[ApiResponse, object, Error_249911d1] """ operation_name = "delete_timer" params = locals() @@ -238,9 +240,10 @@ def delete_timer(self, id, **kwargs): if full_response: return api_response + return None def get_timer(self, id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, TimerResponse, Error] + # type: (str, **Any) -> Union[ApiResponse, object, TimerResponse_5be9ee64, Error_249911d1] """ Get timer by ID. @@ -249,7 +252,7 @@ def get_timer(self, id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, TimerResponse, Error] + :rtype: Union[ApiResponse, object, TimerResponse_5be9ee64, Error_249911d1] """ operation_name = "get_timer" params = locals() @@ -306,9 +309,10 @@ def get_timer(self, id, **kwargs): if full_response: return api_response return api_response.body + def pause_timer(self, id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, Error] + # type: (str, **Any) -> Union[ApiResponse, object, Error_249911d1] """ Pause a timer. @@ -317,7 +321,7 @@ def pause_timer(self, id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error] + :rtype: Union[ApiResponse, object, Error_249911d1] """ operation_name = "pause_timer" params = locals() @@ -375,9 +379,10 @@ def pause_timer(self, id, **kwargs): if full_response: return api_response + return None def resume_timer(self, id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, Error] + # type: (str, **Any) -> Union[ApiResponse, object, Error_249911d1] """ Resume a timer. @@ -386,7 +391,7 @@ def resume_timer(self, id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error] + :rtype: Union[ApiResponse, object, Error_249911d1] """ operation_name = "resume_timer" params = locals() @@ -444,9 +449,10 @@ def resume_timer(self, id, **kwargs): if full_response: return api_response + return None def create_timer(self, timer_request, **kwargs): - # type: (TimerRequest, **Any) -> Union[ApiResponse, TimerResponse, Error] + # type: (TimerRequest_5f036a34, **Any) -> Union[ApiResponse, object, TimerResponse_5be9ee64, Error_249911d1] """ Create a new timer. @@ -455,7 +461,7 @@ def create_timer(self, timer_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, TimerResponse, Error] + :rtype: Union[ApiResponse, object, TimerResponse_5be9ee64, Error_249911d1] """ operation_name = "create_timer" params = locals() @@ -467,7 +473,7 @@ def create_timer(self, timer_request, **kwargs): raise ValueError( "Missing the required parameter `timer_request` when calling `" + operation_name + "`") - resource_path = '/v1/alerts/timers/' + resource_path = '/v1/alerts/timers' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -513,3 +519,4 @@ def create_timer(self, timer_request, **kwargs): if full_response: return api_response return api_response.body + diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/timer_request.py b/ask-sdk-model/ask_sdk_model/services/timer_management/timer_request.py index c61165c0..8168cc37 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/timer_request.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/timer_request.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.timer_management.creation_behavior import CreationBehavior - from ask_sdk_model.services.timer_management.triggering_behavior import TriggeringBehavior + from ask_sdk_model.services.timer_management.creation_behavior import CreationBehavior as CreationBehavior_c34ad8fe + from ask_sdk_model.services.timer_management.triggering_behavior import TriggeringBehavior as TriggeringBehavior_71806894 class TimerRequest(object): @@ -58,7 +58,7 @@ class TimerRequest(object): supports_multiple_types = False def __init__(self, duration=None, timer_label=None, creation_behavior=None, triggering_behavior=None): - # type: (Optional[str], Optional[str], Optional[CreationBehavior], Optional[TriggeringBehavior]) -> None + # type: (Optional[str], Optional[str], Optional[CreationBehavior_c34ad8fe], Optional[TriggeringBehavior_71806894]) -> None """Input request for creating a timer. :param duration: An ISO-8601 representation of duration. E.g. for 2 minutes and 3 seconds - \"PT2M3S\". diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/timer_response.py b/ask-sdk-model/ask_sdk_model/services/timer_management/timer_response.py index 0b03d1cf..551e582d 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/timer_response.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/timer_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.timer_management.status import Status + from ask_sdk_model.services.timer_management.status import Status as Status_26679d1d class TimerResponse(object): @@ -73,7 +73,7 @@ class TimerResponse(object): supports_multiple_types = False def __init__(self, id=None, status=None, duration=None, trigger_time=None, timer_label=None, created_time=None, updated_time=None, remaining_time_when_paused=None): - # type: (Optional[str], Optional[Status], Optional[str], Optional[datetime], Optional[str], Optional[datetime], Optional[datetime], Optional[str]) -> None + # type: (Optional[str], Optional[Status_26679d1d], Optional[str], Optional[datetime], Optional[str], Optional[datetime], Optional[datetime], Optional[str]) -> None """Timer object :param id: Unique id of this timer alert diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/timers_response.py b/ask-sdk-model/ask_sdk_model/services/timer_management/timers_response.py index 1099f8cc..987731c8 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/timers_response.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/timers_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.timer_management.timer_response import TimerResponse + from ask_sdk_model.services.timer_management.timer_response import TimerResponse as TimerResponse_5be9ee64 class TimersResponse(object): @@ -53,7 +53,7 @@ class TimersResponse(object): supports_multiple_types = False def __init__(self, total_count=None, timers=None, next_token=None): - # type: (Optional[int], Optional[List[TimerResponse]], Optional[str]) -> None + # type: (Optional[int], Optional[List[TimerResponse_5be9ee64]], Optional[str]) -> None """Timers object with paginated list of multiple timers :param total_count: Total count of timers returned. diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/triggering_behavior.py b/ask-sdk-model/ask_sdk_model/services/timer_management/triggering_behavior.py index f683b2f7..edd0f648 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/triggering_behavior.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/triggering_behavior.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.timer_management.operation import Operation - from ask_sdk_model.services.timer_management.notification_config import NotificationConfig + from ask_sdk_model.services.timer_management.operation import Operation as Operation_d6b621cf + from ask_sdk_model.services.timer_management.notification_config import NotificationConfig as NotificationConfig_41d41b56 class TriggeringBehavior(object): @@ -50,7 +50,7 @@ class TriggeringBehavior(object): supports_multiple_types = False def __init__(self, operation=None, notification_config=None): - # type: (Optional[Operation], Optional[NotificationConfig]) -> None + # type: (Optional[Operation_d6b621cf], Optional[NotificationConfig_41d41b56]) -> None """The triggering behavior upon Timer Expired. :param operation: diff --git a/ask-sdk-model/ask_sdk_model/services/timer_management/visibility.py b/ask-sdk-model/ask_sdk_model/services/timer_management/visibility.py index 1ec5b5b3..4af91fc5 100644 --- a/ask-sdk-model/ask_sdk_model/services/timer_management/visibility.py +++ b/ask-sdk-model/ask_sdk_model/services/timer_management/visibility.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class Visibility(Enum): HIDDEN = "HIDDEN" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Visibility): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/ups/__init__.py b/ask-sdk-model/ask_sdk_model/services/ups/__init__.py index c2e79732..3b2281a7 100644 --- a/ask-sdk-model/ask_sdk_model/services/ups/__init__.py +++ b/ask-sdk-model/ask_sdk_model/services/ups/__init__.py @@ -16,7 +16,7 @@ from .error import Error from .distance_units import DistanceUnits +from .temperature_unit import TemperatureUnit from .error_code import ErrorCode from .ups_service_client import UpsServiceClient from .phone_number import PhoneNumber -from .temperature_unit import TemperatureUnit diff --git a/ask-sdk-model/ask_sdk_model/services/ups/distance_units.py b/ask-sdk-model/ask_sdk_model/services/ups/distance_units.py index 87cc5ce2..b01dbc5a 100644 --- a/ask-sdk-model/ask_sdk_model/services/ups/distance_units.py +++ b/ask-sdk-model/ask_sdk_model/services/ups/distance_units.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,7 +35,7 @@ class DistanceUnits(Enum): IMPERIAL = "IMPERIAL" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -51,7 +51,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, DistanceUnits): return False @@ -59,6 +59,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/ups/error.py b/ask-sdk-model/ask_sdk_model/services/ups/error.py index 28c436e9..920d1ab4 100644 --- a/ask-sdk-model/ask_sdk_model/services/ups/error.py +++ b/ask-sdk-model/ask_sdk_model/services/ups/error.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.services.ups.error_code import ErrorCode + from ask_sdk_model.services.ups.error_code import ErrorCode as ErrorCode_2d037d81 class Error(object): @@ -47,7 +47,7 @@ class Error(object): supports_multiple_types = False def __init__(self, code=None, message=None): - # type: (Optional[ErrorCode], Optional[str]) -> None + # type: (Optional[ErrorCode_2d037d81], Optional[str]) -> None """ :param code: diff --git a/ask-sdk-model/ask_sdk_model/services/ups/error_code.py b/ask-sdk-model/ask_sdk_model/services/ups/error_code.py index b67a7ec8..d2fd48d0 100644 --- a/ask-sdk-model/ask_sdk_model/services/ups/error_code.py +++ b/ask-sdk-model/ask_sdk_model/services/ups/error_code.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -41,7 +41,7 @@ class ErrorCode(Enum): UNKNOWN_ERROR = "UNKNOWN_ERROR" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -57,7 +57,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ErrorCode): return False @@ -65,6 +65,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/ups/phone_number.py b/ask-sdk-model/ask_sdk_model/services/ups/phone_number.py index 72cf5c0f..c54689c1 100644 --- a/ask-sdk-model/ask_sdk_model/services/ups/phone_number.py +++ b/ask-sdk-model/ask_sdk_model/services/ups/phone_number.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/services/ups/temperature_unit.py b/ask-sdk-model/ask_sdk_model/services/ups/temperature_unit.py index d8c518a5..cfe2dd53 100644 --- a/ask-sdk-model/ask_sdk_model/services/ups/temperature_unit.py +++ b/ask-sdk-model/ask_sdk_model/services/ups/temperature_unit.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,7 +35,7 @@ class TemperatureUnit(Enum): FAHRENHEIT = "FAHRENHEIT" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -51,7 +51,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, TemperatureUnit): return False @@ -59,6 +59,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/services/ups/ups_service_client.py b/ask-sdk-model/ask_sdk_model/services/ups/ups_service_client.py index 7a23a614..75995fd3 100644 --- a/ask-sdk-model/ask_sdk_model/services/ups/ups_service_client.py +++ b/ask-sdk-model/ask_sdk_model/services/ups/ups_service_client.py @@ -30,11 +30,11 @@ if typing.TYPE_CHECKING: from typing import Dict, List, Union, Any from datetime import datetime - from ask_sdk_model.services.ups.phone_number import PhoneNumber - from ask_sdk_model.services.ups.distance_units import DistanceUnits + from ask_sdk_model.services.ups.distance_units import DistanceUnits as DistanceUnits_491ebc07 + from ask_sdk_model.services.ups.phone_number import PhoneNumber as PhoneNumber_1251efb9 import str - from ask_sdk_model.services.ups.error import Error - from ask_sdk_model.services.ups.temperature_unit import TemperatureUnit + from ask_sdk_model.services.ups.error import Error as Error_1aa1008c + from ask_sdk_model.services.ups.temperature_unit import TemperatureUnit as TemperatureUnit_3d472aaf class UpsServiceClient(BaseServiceClient): @@ -55,14 +55,14 @@ def __init__(self, api_configuration, custom_user_agent=None): self.user_agent = user_agent_info(sdk_version="1.0.0", custom_user_agent=custom_user_agent) def get_profile_email(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, str, Error] + # type: (**Any) -> Union[ApiResponse, object, str, Error_1aa1008c] """ Gets the email address of the customer associated with the current enablement. Requires customer consent for scopes: [alexa::profile:email:read] :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, str, Error] + :rtype: Union[ApiResponse, object, str, Error_1aa1008c] """ operation_name = "get_profile_email" params = locals() @@ -114,16 +114,17 @@ def get_profile_email(self, **kwargs): if full_response: return api_response return api_response.body + def get_profile_given_name(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, str, Error] + # type: (**Any) -> Union[ApiResponse, object, str, Error_1aa1008c] """ Gets the given name (first name) of the customer associated with the current enablement. Requires customer consent for scopes: [alexa::profile:given_name:read] :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, str, Error] + :rtype: Union[ApiResponse, object, str, Error_1aa1008c] """ operation_name = "get_profile_given_name" params = locals() @@ -175,16 +176,17 @@ def get_profile_given_name(self, **kwargs): if full_response: return api_response return api_response.body + def get_profile_mobile_number(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, PhoneNumber, Error] + # type: (**Any) -> Union[ApiResponse, object, Error_1aa1008c, PhoneNumber_1251efb9] """ Gets the mobile phone number of the customer associated with the current enablement. Requires customer consent for scopes: [alexa::profile:mobile_number:read] :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, PhoneNumber, Error] + :rtype: Union[ApiResponse, object, Error_1aa1008c, PhoneNumber_1251efb9] """ operation_name = "get_profile_mobile_number" params = locals() @@ -236,16 +238,17 @@ def get_profile_mobile_number(self, **kwargs): if full_response: return api_response return api_response.body + def get_profile_name(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, str, Error] + # type: (**Any) -> Union[ApiResponse, object, str, Error_1aa1008c] """ Gets the full name of the customer associated with the current enablement. Requires customer consent for scopes: [alexa::profile:name:read] :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, str, Error] + :rtype: Union[ApiResponse, object, str, Error_1aa1008c] """ operation_name = "get_profile_name" params = locals() @@ -297,9 +300,10 @@ def get_profile_name(self, **kwargs): if full_response: return api_response return api_response.body + def get_system_distance_units(self, device_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, Error, DistanceUnits] + # type: (str, **Any) -> Union[ApiResponse, object, DistanceUnits_491ebc07, Error_1aa1008c] """ Gets the distance measurement unit of the device. Does not require explict customer consent. @@ -308,7 +312,7 @@ def get_system_distance_units(self, device_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, Error, DistanceUnits] + :rtype: Union[ApiResponse, object, DistanceUnits_491ebc07, Error_1aa1008c] """ operation_name = "get_system_distance_units" params = locals() @@ -366,9 +370,10 @@ def get_system_distance_units(self, device_id, **kwargs): if full_response: return api_response return api_response.body + def get_system_temperature_unit(self, device_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, TemperatureUnit, Error] + # type: (str, **Any) -> Union[ApiResponse, object, TemperatureUnit_3d472aaf, Error_1aa1008c] """ Gets the temperature measurement units of the device. Does not require explict customer consent. @@ -377,7 +382,7 @@ def get_system_temperature_unit(self, device_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, TemperatureUnit, Error] + :rtype: Union[ApiResponse, object, TemperatureUnit_3d472aaf, Error_1aa1008c] """ operation_name = "get_system_temperature_unit" params = locals() @@ -435,9 +440,10 @@ def get_system_temperature_unit(self, device_id, **kwargs): if full_response: return api_response return api_response.body + def get_system_time_zone(self, device_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, str, Error] + # type: (str, **Any) -> Union[ApiResponse, object, str, Error_1aa1008c] """ Gets the time zone of the device. Does not require explict customer consent. @@ -446,7 +452,7 @@ def get_system_time_zone(self, device_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, str, Error] + :rtype: Union[ApiResponse, object, str, Error_1aa1008c] """ operation_name = "get_system_time_zone" params = locals() @@ -504,16 +510,17 @@ def get_system_time_zone(self, device_id, **kwargs): if full_response: return api_response return api_response.body + def get_persons_profile_given_name(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, str, Error] + # type: (**Any) -> Union[ApiResponse, object, str, Error_1aa1008c] """ Gets the given name (first name) of the recognized speaker at person-level. Requires speaker consent at person-level for scopes: [alexa::profile:given_name:read] :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, str, Error] + :rtype: Union[ApiResponse, object, str, Error_1aa1008c] """ operation_name = "get_persons_profile_given_name" params = locals() @@ -565,16 +572,17 @@ def get_persons_profile_given_name(self, **kwargs): if full_response: return api_response return api_response.body + def get_persons_profile_mobile_number(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, PhoneNumber, Error] + # type: (**Any) -> Union[ApiResponse, object, Error_1aa1008c, PhoneNumber_1251efb9] """ Gets the mobile phone number of the recognized speaker at person-level. Requires speaker consent at person-level for scopes: [alexa::profile:mobile_number:read] :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, PhoneNumber, Error] + :rtype: Union[ApiResponse, object, Error_1aa1008c, PhoneNumber_1251efb9] """ operation_name = "get_persons_profile_mobile_number" params = locals() @@ -626,16 +634,17 @@ def get_persons_profile_mobile_number(self, **kwargs): if full_response: return api_response return api_response.body + def get_persons_profile_name(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, str, Error] + # type: (**Any) -> Union[ApiResponse, object, str, Error_1aa1008c] """ Gets the full name of the recognized speaker at person-level. Requires speaker consent at person-level for scopes: [alexa::profile:name:read] :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, str, Error] + :rtype: Union[ApiResponse, object, str, Error_1aa1008c] """ operation_name = "get_persons_profile_name" params = locals() @@ -687,3 +696,4 @@ def get_persons_profile_name(self, **kwargs): if full_response: return api_response return api_response.body + diff --git a/ask-sdk-model/ask_sdk_model/session.py b/ask-sdk-model/ask_sdk_model/session.py index eb6ccfd1..f6b55c26 100644 --- a/ask-sdk-model/ask_sdk_model/session.py +++ b/ask-sdk-model/ask_sdk_model/session.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.application import Application - from ask_sdk_model.user import User + from ask_sdk_model.application import Application as Application_fbe81c42 + from ask_sdk_model.user import User as User_8987f2de class Session(object): @@ -62,7 +62,7 @@ class Session(object): supports_multiple_types = False def __init__(self, new=None, session_id=None, user=None, attributes=None, application=None): - # type: (Optional[bool], Optional[str], Optional[User], Optional[Dict[str, object]], Optional[Application]) -> None + # type: (Optional[bool], Optional[str], Optional[User_8987f2de], Optional[Dict[str, object]], Optional[Application_fbe81c42]) -> None """Represents a single execution of the alexa service :param new: A boolean value indicating whether this is a new session. Returns true for a new session or false for an existing session. diff --git a/ask-sdk-model/ask_sdk_model/session_ended_error.py b/ask-sdk-model/ask_sdk_model/session_ended_error.py index 4e169b01..610cddb4 100644 --- a/ask-sdk-model/ask_sdk_model/session_ended_error.py +++ b/ask-sdk-model/ask_sdk_model/session_ended_error.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.session_ended_error_type import SessionEndedErrorType + from ask_sdk_model.session_ended_error_type import SessionEndedErrorType as SessionEndedErrorType_fbc052bf class SessionEndedError(object): @@ -49,7 +49,7 @@ class SessionEndedError(object): supports_multiple_types = False def __init__(self, object_type=None, message=None): - # type: (Optional[SessionEndedErrorType], Optional[str]) -> None + # type: (Optional[SessionEndedErrorType_fbc052bf], Optional[str]) -> None """An error object providing more information about the error that occurred. :param object_type: A string indicating the type of error that occurred. diff --git a/ask-sdk-model/ask_sdk_model/session_ended_error_type.py b/ask-sdk-model/ask_sdk_model/session_ended_error_type.py index b4860af1..b95df3b7 100644 --- a/ask-sdk-model/ask_sdk_model/session_ended_error_type.py +++ b/ask-sdk-model/ask_sdk_model/session_ended_error_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class SessionEndedErrorType(Enum): ENDPOINT_TIMEOUT = "ENDPOINT_TIMEOUT" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SessionEndedErrorType): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/session_ended_reason.py b/ask-sdk-model/ask_sdk_model/session_ended_reason.py index feec9971..e633e343 100644 --- a/ask-sdk-model/ask_sdk_model/session_ended_reason.py +++ b/ask-sdk-model/ask_sdk_model/session_ended_reason.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class SessionEndedReason(Enum): EXCEEDED_MAX_REPROMPTS = "EXCEEDED_MAX_REPROMPTS" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SessionEndedReason): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/session_ended_request.py b/ask-sdk-model/ask_sdk_model/session_ended_request.py index af5cd52f..b3978c0d 100644 --- a/ask-sdk-model/ask_sdk_model/session_ended_request.py +++ b/ask-sdk-model/ask_sdk_model/session_ended_request.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.session_ended_error import SessionEndedError - from ask_sdk_model.session_ended_reason import SessionEndedReason + from ask_sdk_model.session_ended_reason import SessionEndedReason as SessionEndedReason_8be684f4 + from ask_sdk_model.session_ended_error import SessionEndedError as SessionEndedError_39281860 class SessionEndedRequest(Request): @@ -65,7 +65,7 @@ class SessionEndedRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, reason=None, error=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[SessionEndedReason], Optional[SessionEndedError]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[SessionEndedReason_8be684f4], Optional[SessionEndedError_39281860]) -> None """A SessionEndedRequest is an object that represents a request made to an Alexa skill to notify that a session was ended. Your service receives a SessionEndedRequest when a currently open session is closed for one of the following reasons: <ol><li>The user says “exit”</li><li>the user does not respond or says something that does not match an intent defined in your voice interface while the device is listening for the user’s response</li><li>an error occurs</li></ol> :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/session_resumed_request.py b/ask-sdk-model/ask_sdk_model/session_resumed_request.py index d89a5acf..e6396c48 100644 --- a/ask-sdk-model/ask_sdk_model/session_resumed_request.py +++ b/ask-sdk-model/ask_sdk_model/session_resumed_request.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.cause import Cause + from ask_sdk_model.cause import Cause as Cause_6683e534 class SessionResumedRequest(Request): @@ -60,7 +60,7 @@ class SessionResumedRequest(Request): supports_multiple_types = False def __init__(self, request_id=None, timestamp=None, locale=None, cause=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[Cause]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[Cause_6683e534]) -> None """The request to resume a skill's session and tells the skill why it is resumed. :param request_id: Represents the unique identifier for the specific request. diff --git a/ask-sdk-model/ask_sdk_model/simple_slot_value.py b/ask-sdk-model/ask_sdk_model/simple_slot_value.py index 9519eca5..9351bbdb 100644 --- a/ask-sdk-model/ask_sdk_model/simple_slot_value.py +++ b/ask-sdk-model/ask_sdk_model/simple_slot_value.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.slu.entityresolution.resolutions import Resolutions + from ask_sdk_model.slu.entityresolution.resolutions import Resolutions as Resolutions_e7d66a3 class SimpleSlotValue(SlotValue): @@ -52,7 +52,7 @@ class SimpleSlotValue(SlotValue): supports_multiple_types = False def __init__(self, value=None, resolutions=None): - # type: (Optional[str], Optional[Resolutions]) -> None + # type: (Optional[str], Optional[Resolutions_e7d66a3]) -> None """Slot value containing a single string value and resolutions. :param value: A string that represents the value the user spoke for the slot. This is the actual value the user spoke, not necessarily the canonical value or one of the synonyms defined for the entity. Note that AMAZON.LITERAL slot values sent to your service are always in all lower case. diff --git a/ask-sdk-model/ask_sdk_model/slot.py b/ask-sdk-model/ask_sdk_model/slot.py index 710b899f..0bb54170 100644 --- a/ask-sdk-model/ask_sdk_model/slot.py +++ b/ask-sdk-model/ask_sdk_model/slot.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.slot_value import SlotValue - from ask_sdk_model.slu.entityresolution.resolutions import Resolutions - from ask_sdk_model.slot_confirmation_status import SlotConfirmationStatus + from ask_sdk_model.slu.entityresolution.resolutions import Resolutions as Resolutions_e7d66a3 + from ask_sdk_model.slot_confirmation_status import SlotConfirmationStatus as SlotConfirmationStatus_b8466dc8 + from ask_sdk_model.slot_value import SlotValue as SlotValue_4725c8c5 class Slot(object): @@ -61,7 +61,7 @@ class Slot(object): supports_multiple_types = False def __init__(self, name=None, value=None, confirmation_status=None, resolutions=None, slot_value=None): - # type: (Optional[str], Optional[str], Optional[SlotConfirmationStatus], Optional[Resolutions], Optional[SlotValue]) -> None + # type: (Optional[str], Optional[str], Optional[SlotConfirmationStatus_b8466dc8], Optional[Resolutions_e7d66a3], Optional[SlotValue_4725c8c5]) -> None """ :param name: A string that represents the name of the slot. diff --git a/ask-sdk-model/ask_sdk_model/slot_confirmation_status.py b/ask-sdk-model/ask_sdk_model/slot_confirmation_status.py index b79b4114..3e729241 100644 --- a/ask-sdk-model/ask_sdk_model/slot_confirmation_status.py +++ b/ask-sdk-model/ask_sdk_model/slot_confirmation_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class SlotConfirmationStatus(Enum): CONFIRMED = "CONFIRMED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SlotConfirmationStatus): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/slot_value.py b/ask-sdk-model/ask_sdk_model/slot_value.py index e2b09264..9ae71184 100644 --- a/ask-sdk-model/ask_sdk_model/slot_value.py +++ b/ask-sdk-model/ask_sdk_model/slot_value.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -31,7 +31,7 @@ class SlotValue(object): Object representing the value captured in the slot. - :param object_type: Type of value that was captured. Can be 'Simple' or 'List'. + :param object_type: Type of value that was captured. Can be 'Simple','List' or 'Composite'. :type object_type: (optional) str .. note:: @@ -67,7 +67,7 @@ def __init__(self, object_type=None): # type: (Optional[str]) -> None """Object representing the value captured in the slot. - :param object_type: Type of value that was captured. Can be 'Simple' or 'List'. + :param object_type: Type of value that was captured. Can be 'Simple','List' or 'Composite'. :type object_type: (optional) str """ self.__discriminator_value = None # type: str diff --git a/ask-sdk-model/ask_sdk_model/slu/entityresolution/__init__.py b/ask-sdk-model/ask_sdk_model/slu/entityresolution/__init__.py index 7350cb84..66bd56e4 100644 --- a/ask-sdk-model/ask_sdk_model/slu/entityresolution/__init__.py +++ b/ask-sdk-model/ask_sdk_model/slu/entityresolution/__init__.py @@ -14,9 +14,9 @@ # from __future__ import absolute_import +from .resolutions import Resolutions from .resolution import Resolution -from .status import Status -from .status_code import StatusCode from .value_wrapper import ValueWrapper from .value import Value -from .resolutions import Resolutions +from .status import Status +from .status_code import StatusCode diff --git a/ask-sdk-model/ask_sdk_model/slu/entityresolution/resolution.py b/ask-sdk-model/ask_sdk_model/slu/entityresolution/resolution.py index 8ae95915..45176afe 100644 --- a/ask-sdk-model/ask_sdk_model/slu/entityresolution/resolution.py +++ b/ask-sdk-model/ask_sdk_model/slu/entityresolution/resolution.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.slu.entityresolution.status import Status - from ask_sdk_model.slu.entityresolution.value_wrapper import ValueWrapper + from ask_sdk_model.slu.entityresolution.value_wrapper import ValueWrapper as ValueWrapper_eca23f08 + from ask_sdk_model.slu.entityresolution.status import Status as Status_862c3cf1 class Resolution(object): @@ -54,7 +54,7 @@ class Resolution(object): supports_multiple_types = False def __init__(self, authority=None, status=None, values=None): - # type: (Optional[str], Optional[Status], Optional[List[ValueWrapper]]) -> None + # type: (Optional[str], Optional[Status_862c3cf1], Optional[List[ValueWrapper_eca23f08]]) -> None """Represents a possible authority for entity resolution :param authority: diff --git a/ask-sdk-model/ask_sdk_model/slu/entityresolution/resolutions.py b/ask-sdk-model/ask_sdk_model/slu/entityresolution/resolutions.py index 0baca03e..7c8131d9 100644 --- a/ask-sdk-model/ask_sdk_model/slu/entityresolution/resolutions.py +++ b/ask-sdk-model/ask_sdk_model/slu/entityresolution/resolutions.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.slu.entityresolution.resolution import Resolution + from ask_sdk_model.slu.entityresolution.resolution import Resolution as Resolution_fcf523b1 class Resolutions(object): @@ -45,7 +45,7 @@ class Resolutions(object): supports_multiple_types = False def __init__(self, resolutions_per_authority=None): - # type: (Optional[List[Resolution]]) -> None + # type: (Optional[List[Resolution_fcf523b1]]) -> None """Represents the results of resolving the words captured from the user's utterance. This is included for slots that use a custom slot type or a built-in slot type that you have extended with your own values. Note that resolutions is not included for built-in slot types that you have not extended. :param resolutions_per_authority: diff --git a/ask-sdk-model/ask_sdk_model/slu/entityresolution/status.py b/ask-sdk-model/ask_sdk_model/slu/entityresolution/status.py index 6e3e9ecb..088cfdce 100644 --- a/ask-sdk-model/ask_sdk_model/slu/entityresolution/status.py +++ b/ask-sdk-model/ask_sdk_model/slu/entityresolution/status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.slu.entityresolution.status_code import StatusCode + from ask_sdk_model.slu.entityresolution.status_code import StatusCode as StatusCode_118f7170 class Status(object): @@ -43,7 +43,7 @@ class Status(object): supports_multiple_types = False def __init__(self, code=None): - # type: (Optional[StatusCode]) -> None + # type: (Optional[StatusCode_118f7170]) -> None """ :param code: Indication of the results of attempting to resolve the user utterance against the defined slot types. diff --git a/ask-sdk-model/ask_sdk_model/slu/entityresolution/status_code.py b/ask-sdk-model/ask_sdk_model/slu/entityresolution/status_code.py index f5c2c5fa..a143b9eb 100644 --- a/ask-sdk-model/ask_sdk_model/slu/entityresolution/status_code.py +++ b/ask-sdk-model/ask_sdk_model/slu/entityresolution/status_code.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class StatusCode(Enum): ER_ERROR_EXCEPTION = "ER_ERROR_EXCEPTION" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, StatusCode): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/slu/entityresolution/value.py b/ask-sdk-model/ask_sdk_model/slu/entityresolution/value.py index 3b02489c..c67cba12 100644 --- a/ask-sdk-model/ask_sdk_model/slu/entityresolution/value.py +++ b/ask-sdk-model/ask_sdk_model/slu/entityresolution/value.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/slu/entityresolution/value_wrapper.py b/ask-sdk-model/ask_sdk_model/slu/entityresolution/value_wrapper.py index 05425f0c..9771cd89 100644 --- a/ask-sdk-model/ask_sdk_model/slu/entityresolution/value_wrapper.py +++ b/ask-sdk-model/ask_sdk_model/slu/entityresolution/value_wrapper.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.slu.entityresolution.value import Value + from ask_sdk_model.slu.entityresolution.value import Value as Value_c01e22b7 class ValueWrapper(object): @@ -45,7 +45,7 @@ class ValueWrapper(object): supports_multiple_types = False def __init__(self, value=None): - # type: (Optional[Value]) -> None + # type: (Optional[Value_c01e22b7]) -> None """A wrapper class for an entity resolution value used for JSON serialization. :param value: diff --git a/ask-sdk-model/ask_sdk_model/status.py b/ask-sdk-model/ask_sdk_model/status.py index b44c1e8f..a57cfd15 100644 --- a/ask-sdk-model/ask_sdk_model/status.py +++ b/ask-sdk-model/ask_sdk_model/status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/supported_interfaces.py b/ask-sdk-model/ask_sdk_model/supported_interfaces.py index 6abfd50d..65c8799a 100644 --- a/ask-sdk-model/ask_sdk_model/supported_interfaces.py +++ b/ask-sdk-model/ask_sdk_model/supported_interfaces.py @@ -21,16 +21,18 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.interfaces.audioplayer.audio_player_interface import AudioPlayerInterface - from ask_sdk_model.interfaces.alexa.presentation.html.alexa_presentation_html_interface import AlexaPresentationHtmlInterface - from ask_sdk_model.interfaces.alexa.presentation.apl.alexa_presentation_apl_interface import AlexaPresentationAplInterface - from ask_sdk_model.interfaces.navigation.navigation_interface import NavigationInterface - from ask_sdk_model.interfaces.videoapp.video_app_interface import VideoAppInterface - from ask_sdk_model.interfaces.geolocation.geolocation_interface import GeolocationInterface - from ask_sdk_model.interfaces.alexa.presentation.aplt.alexa_presentation_aplt_interface import AlexaPresentationApltInterface - from ask_sdk_model.interfaces.display.display_interface import DisplayInterface + from ask_sdk_model.interfaces.alexa.presentation.html.alexa_presentation_html_interface import AlexaPresentationHtmlInterface as AlexaPresentationHtmlInterface_b20f808f + from ask_sdk_model.interfaces.alexa.presentation.apl.alexa_presentation_apl_interface import AlexaPresentationAplInterface as AlexaPresentationAplInterface_58fc19ef + from ask_sdk_model.interfaces.navigation.navigation_interface import NavigationInterface as NavigationInterface_aa96009b + from ask_sdk_model.interfaces.audioplayer.audio_player_interface import AudioPlayerInterface as AudioPlayerInterface_24d2b051 + from ask_sdk_model.interfaces.alexa.advertisement.alexa_advertisement_interface import AlexaAdvertisementInterface as AlexaAdvertisementInterface_b42bb74 + from ask_sdk_model.interfaces.alexa.presentation.aplt.alexa_presentation_aplt_interface import AlexaPresentationApltInterface as AlexaPresentationApltInterface_95b3be2b + from ask_sdk_model.interfaces.applink.app_link_interface import AppLinkInterface as AppLinkInterface_4aa78e23 + from ask_sdk_model.interfaces.display.display_interface import DisplayInterface as DisplayInterface_c1477bd9 + from ask_sdk_model.interfaces.videoapp.video_app_interface import VideoAppInterface as VideoAppInterface_f245c658 + from ask_sdk_model.interfaces.geolocation.geolocation_interface import GeolocationInterface as GeolocationInterface_d5c5128d class SupportedInterfaces(object): @@ -38,12 +40,16 @@ class SupportedInterfaces(object): An object listing each interface that the device supports. For example, if supportedInterfaces includes AudioPlayer {}, then you know that the device supports streaming audio using the AudioPlayer interface. + :param alexa_advertisement: + :type alexa_advertisement: (optional) ask_sdk_model.interfaces.alexa.advertisement.alexa_advertisement_interface.AlexaAdvertisementInterface :param alexa_presentation_apl: :type alexa_presentation_apl: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.alexa_presentation_apl_interface.AlexaPresentationAplInterface :param alexa_presentation_aplt: :type alexa_presentation_aplt: (optional) ask_sdk_model.interfaces.alexa.presentation.aplt.alexa_presentation_aplt_interface.AlexaPresentationApltInterface :param alexa_presentation_html: :type alexa_presentation_html: (optional) ask_sdk_model.interfaces.alexa.presentation.html.alexa_presentation_html_interface.AlexaPresentationHtmlInterface + :param app_link: + :type app_link: (optional) ask_sdk_model.interfaces.applink.app_link_interface.AppLinkInterface :param audio_player: :type audio_player: (optional) ask_sdk_model.interfaces.audioplayer.audio_player_interface.AudioPlayerInterface :param display: @@ -57,9 +63,11 @@ class SupportedInterfaces(object): """ deserialized_types = { + 'alexa_advertisement': 'ask_sdk_model.interfaces.alexa.advertisement.alexa_advertisement_interface.AlexaAdvertisementInterface', 'alexa_presentation_apl': 'ask_sdk_model.interfaces.alexa.presentation.apl.alexa_presentation_apl_interface.AlexaPresentationAplInterface', 'alexa_presentation_aplt': 'ask_sdk_model.interfaces.alexa.presentation.aplt.alexa_presentation_aplt_interface.AlexaPresentationApltInterface', 'alexa_presentation_html': 'ask_sdk_model.interfaces.alexa.presentation.html.alexa_presentation_html_interface.AlexaPresentationHtmlInterface', + 'app_link': 'ask_sdk_model.interfaces.applink.app_link_interface.AppLinkInterface', 'audio_player': 'ask_sdk_model.interfaces.audioplayer.audio_player_interface.AudioPlayerInterface', 'display': 'ask_sdk_model.interfaces.display.display_interface.DisplayInterface', 'video_app': 'ask_sdk_model.interfaces.videoapp.video_app_interface.VideoAppInterface', @@ -68,9 +76,11 @@ class SupportedInterfaces(object): } # type: Dict attribute_map = { + 'alexa_advertisement': 'Alexa.Advertisement', 'alexa_presentation_apl': 'Alexa.Presentation.APL', 'alexa_presentation_aplt': 'Alexa.Presentation.APLT', 'alexa_presentation_html': 'Alexa.Presentation.HTML', + 'app_link': 'AppLink', 'audio_player': 'AudioPlayer', 'display': 'Display', 'video_app': 'VideoApp', @@ -79,16 +89,20 @@ class SupportedInterfaces(object): } # type: Dict supports_multiple_types = False - def __init__(self, alexa_presentation_apl=None, alexa_presentation_aplt=None, alexa_presentation_html=None, audio_player=None, display=None, video_app=None, geolocation=None, navigation=None): - # type: (Optional[AlexaPresentationAplInterface], Optional[AlexaPresentationApltInterface], Optional[AlexaPresentationHtmlInterface], Optional[AudioPlayerInterface], Optional[DisplayInterface], Optional[VideoAppInterface], Optional[GeolocationInterface], Optional[NavigationInterface]) -> None + def __init__(self, alexa_advertisement=None, alexa_presentation_apl=None, alexa_presentation_aplt=None, alexa_presentation_html=None, app_link=None, audio_player=None, display=None, video_app=None, geolocation=None, navigation=None): + # type: (Optional[AlexaAdvertisementInterface_b42bb74], Optional[AlexaPresentationAplInterface_58fc19ef], Optional[AlexaPresentationApltInterface_95b3be2b], Optional[AlexaPresentationHtmlInterface_b20f808f], Optional[AppLinkInterface_4aa78e23], Optional[AudioPlayerInterface_24d2b051], Optional[DisplayInterface_c1477bd9], Optional[VideoAppInterface_f245c658], Optional[GeolocationInterface_d5c5128d], Optional[NavigationInterface_aa96009b]) -> None """An object listing each interface that the device supports. For example, if supportedInterfaces includes AudioPlayer {}, then you know that the device supports streaming audio using the AudioPlayer interface. + :param alexa_advertisement: + :type alexa_advertisement: (optional) ask_sdk_model.interfaces.alexa.advertisement.alexa_advertisement_interface.AlexaAdvertisementInterface :param alexa_presentation_apl: :type alexa_presentation_apl: (optional) ask_sdk_model.interfaces.alexa.presentation.apl.alexa_presentation_apl_interface.AlexaPresentationAplInterface :param alexa_presentation_aplt: :type alexa_presentation_aplt: (optional) ask_sdk_model.interfaces.alexa.presentation.aplt.alexa_presentation_aplt_interface.AlexaPresentationApltInterface :param alexa_presentation_html: :type alexa_presentation_html: (optional) ask_sdk_model.interfaces.alexa.presentation.html.alexa_presentation_html_interface.AlexaPresentationHtmlInterface + :param app_link: + :type app_link: (optional) ask_sdk_model.interfaces.applink.app_link_interface.AppLinkInterface :param audio_player: :type audio_player: (optional) ask_sdk_model.interfaces.audioplayer.audio_player_interface.AudioPlayerInterface :param display: @@ -102,9 +116,11 @@ def __init__(self, alexa_presentation_apl=None, alexa_presentation_aplt=None, al """ self.__discriminator_value = None # type: str + self.alexa_advertisement = alexa_advertisement self.alexa_presentation_apl = alexa_presentation_apl self.alexa_presentation_aplt = alexa_presentation_aplt self.alexa_presentation_html = alexa_presentation_html + self.app_link = app_link self.audio_player = audio_player self.display = display self.video_app = video_app diff --git a/ask-sdk-model/ask_sdk_model/task.py b/ask-sdk-model/ask_sdk_model/task.py index 24a056ed..c5c8cea1 100644 --- a/ask-sdk-model/ask_sdk_model/task.py +++ b/ask-sdk-model/ask_sdk_model/task.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/ui/__init__.py b/ask-sdk-model/ask_sdk_model/ui/__init__.py index 1cd4d910..feb6586d 100644 --- a/ask-sdk-model/ask_sdk_model/ui/__init__.py +++ b/ask-sdk-model/ask_sdk_model/ui/__init__.py @@ -14,14 +14,14 @@ # from __future__ import absolute_import -from .link_account_card import LinkAccountCard from .plain_text_output_speech import PlainTextOutputSpeech -from .reprompt import Reprompt -from .ssml_output_speech import SsmlOutputSpeech -from .standard_card import StandardCard from .output_speech import OutputSpeech +from .link_account_card import LinkAccountCard from .image import Image +from .ssml_output_speech import SsmlOutputSpeech +from .standard_card import StandardCard +from .simple_card import SimpleCard +from .reprompt import Reprompt from .card import Card from .play_behavior import PlayBehavior from .ask_for_permissions_consent_card import AskForPermissionsConsentCard -from .simple_card import SimpleCard diff --git a/ask-sdk-model/ask_sdk_model/ui/ask_for_permissions_consent_card.py b/ask-sdk-model/ask_sdk_model/ui/ask_for_permissions_consent_card.py index b308b7a1..5bf59781 100644 --- a/ask-sdk-model/ask_sdk_model/ui/ask_for_permissions_consent_card.py +++ b/ask-sdk-model/ask_sdk_model/ui/ask_for_permissions_consent_card.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/ui/card.py b/ask-sdk-model/ask_sdk_model/ui/card.py index 2afae86d..0136c8e1 100644 --- a/ask-sdk-model/ask_sdk_model/ui/card.py +++ b/ask-sdk-model/ask_sdk_model/ui/card.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/ui/image.py b/ask-sdk-model/ask_sdk_model/ui/image.py index f0b4354c..6cee199d 100644 --- a/ask-sdk-model/ask_sdk_model/ui/image.py +++ b/ask-sdk-model/ask_sdk_model/ui/image.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/ui/link_account_card.py b/ask-sdk-model/ask_sdk_model/ui/link_account_card.py index ff4ef82f..b34b9d36 100644 --- a/ask-sdk-model/ask_sdk_model/ui/link_account_card.py +++ b/ask-sdk-model/ask_sdk_model/ui/link_account_card.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/ui/output_speech.py b/ask-sdk-model/ask_sdk_model/ui/output_speech.py index 8ba1336a..d34cc669 100644 --- a/ask-sdk-model/ask_sdk_model/ui/output_speech.py +++ b/ask-sdk-model/ask_sdk_model/ui/output_speech.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.ui.play_behavior import PlayBehavior + from ask_sdk_model.ui.play_behavior import PlayBehavior as PlayBehavior_a7b45b61 class OutputSpeech(object): @@ -67,7 +67,7 @@ class OutputSpeech(object): @abstractmethod def __init__(self, object_type=None, play_behavior=None): - # type: (Optional[str], Optional[PlayBehavior]) -> None + # type: (Optional[str], Optional[PlayBehavior_a7b45b61]) -> None """ :param object_type: diff --git a/ask-sdk-model/ask_sdk_model/ui/plain_text_output_speech.py b/ask-sdk-model/ask_sdk_model/ui/plain_text_output_speech.py index a61b39f7..4bc810d1 100644 --- a/ask-sdk-model/ask_sdk_model/ui/plain_text_output_speech.py +++ b/ask-sdk-model/ask_sdk_model/ui/plain_text_output_speech.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.ui.play_behavior import PlayBehavior + from ask_sdk_model.ui.play_behavior import PlayBehavior as PlayBehavior_a7b45b61 class PlainTextOutputSpeech(OutputSpeech): @@ -50,7 +50,7 @@ class PlainTextOutputSpeech(OutputSpeech): supports_multiple_types = False def __init__(self, play_behavior=None, text=None): - # type: (Optional[PlayBehavior], Optional[str]) -> None + # type: (Optional[PlayBehavior_a7b45b61], Optional[str]) -> None """ :param play_behavior: diff --git a/ask-sdk-model/ask_sdk_model/ui/play_behavior.py b/ask-sdk-model/ask_sdk_model/ui/play_behavior.py index 68952a54..25580ef9 100644 --- a/ask-sdk-model/ask_sdk_model/ui/play_behavior.py +++ b/ask-sdk-model/ask_sdk_model/ui/play_behavior.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class PlayBehavior(Enum): REPLACE_ENQUEUED = "REPLACE_ENQUEUED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PlayBehavior): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-sdk-model/ask_sdk_model/ui/reprompt.py b/ask-sdk-model/ask_sdk_model/ui/reprompt.py index d4a94c37..e9cacb99 100644 --- a/ask-sdk-model/ask_sdk_model/ui/reprompt.py +++ b/ask-sdk-model/ask_sdk_model/ui/reprompt.py @@ -21,9 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.ui.output_speech import OutputSpeech + from ask_sdk_model.directive import Directive as Directive_e3e6b000 + from ask_sdk_model.ui.output_speech import OutputSpeech as OutputSpeech_a070f8fb class Reprompt(object): @@ -31,27 +32,34 @@ class Reprompt(object): :param output_speech: :type output_speech: (optional) ask_sdk_model.ui.output_speech.OutputSpeech + :param directives: + :type directives: (optional) list[ask_sdk_model.directive.Directive] """ deserialized_types = { - 'output_speech': 'ask_sdk_model.ui.output_speech.OutputSpeech' + 'output_speech': 'ask_sdk_model.ui.output_speech.OutputSpeech', + 'directives': 'list[ask_sdk_model.directive.Directive]' } # type: Dict attribute_map = { - 'output_speech': 'outputSpeech' + 'output_speech': 'outputSpeech', + 'directives': 'directives' } # type: Dict supports_multiple_types = False - def __init__(self, output_speech=None): - # type: (Optional[OutputSpeech]) -> None + def __init__(self, output_speech=None, directives=None): + # type: (Optional[OutputSpeech_a070f8fb], Optional[List[Directive_e3e6b000]]) -> None """ :param output_speech: :type output_speech: (optional) ask_sdk_model.ui.output_speech.OutputSpeech + :param directives: + :type directives: (optional) list[ask_sdk_model.directive.Directive] """ self.__discriminator_value = None # type: str self.output_speech = output_speech + self.directives = directives def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-sdk-model/ask_sdk_model/ui/simple_card.py b/ask-sdk-model/ask_sdk_model/ui/simple_card.py index 587732a0..28d167f2 100644 --- a/ask-sdk-model/ask_sdk_model/ui/simple_card.py +++ b/ask-sdk-model/ask_sdk_model/ui/simple_card.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-sdk-model/ask_sdk_model/ui/ssml_output_speech.py b/ask-sdk-model/ask_sdk_model/ui/ssml_output_speech.py index eacc47eb..091b5f3d 100644 --- a/ask-sdk-model/ask_sdk_model/ui/ssml_output_speech.py +++ b/ask-sdk-model/ask_sdk_model/ui/ssml_output_speech.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.ui.play_behavior import PlayBehavior + from ask_sdk_model.ui.play_behavior import PlayBehavior as PlayBehavior_a7b45b61 class SsmlOutputSpeech(OutputSpeech): @@ -50,7 +50,7 @@ class SsmlOutputSpeech(OutputSpeech): supports_multiple_types = False def __init__(self, play_behavior=None, ssml=None): - # type: (Optional[PlayBehavior], Optional[str]) -> None + # type: (Optional[PlayBehavior_a7b45b61], Optional[str]) -> None """ :param play_behavior: diff --git a/ask-sdk-model/ask_sdk_model/ui/standard_card.py b/ask-sdk-model/ask_sdk_model/ui/standard_card.py index 0cebef79..618e4b02 100644 --- a/ask-sdk-model/ask_sdk_model/ui/standard_card.py +++ b/ask-sdk-model/ask_sdk_model/ui/standard_card.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.ui.image import Image + from ask_sdk_model.ui.image import Image as Image_510835de class StandardCard(Card): @@ -54,7 +54,7 @@ class StandardCard(Card): supports_multiple_types = False def __init__(self, title=None, text=None, image=None): - # type: (Optional[str], Optional[str], Optional[Image]) -> None + # type: (Optional[str], Optional[str], Optional[Image_510835de]) -> None """ :param title: diff --git a/ask-sdk-model/ask_sdk_model/user.py b/ask-sdk-model/ask_sdk_model/user.py index 1d284642..ba6cf05f 100644 --- a/ask-sdk-model/ask_sdk_model/user.py +++ b/ask-sdk-model/ask_sdk_model/user.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_sdk_model.permissions import Permissions + from ask_sdk_model.permissions import Permissions as Permissions_9a74ccaa class User(object): @@ -53,7 +53,7 @@ class User(object): supports_multiple_types = False def __init__(self, user_id=None, access_token=None, permissions=None): - # type: (Optional[str], Optional[str], Optional[Permissions]) -> None + # type: (Optional[str], Optional[str], Optional[Permissions_9a74ccaa]) -> None """An object that describes the Amazon account for which the skill is enabled. :param user_id: A string that represents a unique identifier for the user who made the request. The length of this identifier can vary, but is never more than 255 characters. The userId is automatically generated when a user enables the skill in the Alexa app. Note: Disabling and re-enabling a skill generates a new identifier. diff --git a/ask-sdk-model/setup.py b/ask-sdk-model/setup.py index 6963446c..d9750508 100644 --- a/ask-sdk-model/setup.py +++ b/ask-sdk-model/setup.py @@ -19,7 +19,7 @@ here = os.path.abspath(os.path.dirname(__file__)) -about = {} +about = {} # type: ignore with open(os.path.join(here, 'ask_sdk_model', '__version__.py'), 'r', 'utf-8') as f: exec(f.read(), about) diff --git a/ask-smapi-model/CHANGELOG.rst b/ask-smapi-model/CHANGELOG.rst index 1665ad9b..bf5972bb 100644 --- a/ask-smapi-model/CHANGELOG.rst +++ b/ask-smapi-model/CHANGELOG.rst @@ -131,3 +131,306 @@ This release contains the following changes : This release contains the following changes : - minor bug fixes in existing models. + + +1.8.0 +~~~~~ + +This release contains the following changes : + +- New models for `Jobs Definitions API `__ + + +1.8.1 +^^^^^ + +This release contains the following changes : + +- Fix the model definition of `AccountLinkingRequest body `__. + + +1.8.2 +^^^^^ + +This release contains the following changes : + +- Updating model definitions + + +1.9.0 +~~~~~ + +This release contains the following changes : +- Add `Smart Home Evaluation APIs `__. +- Add `get resource schema API `__. + + +1.9.1 +^^^^^ + +This release contains the following changes : + +- General bug fixes and updates. +- Model definition updates to support `AlexaCustomerFeedbackEvent.SkillReviewPublish `__ event notifications for skill developers in SMAPI. +- Developers can subscribe to this `new event and get notified `__ whenever there is a customer-review published for their skills. + + +1.9.2 +^^^^^ + +This release contains the following changes : + +- general bug fixes and updates + + +1.11.0 +~~~~~~ + +This release contains the following changes : + +- Updating model definitions +- Added new model definitions for Simulation APIs +- Added new model definitions for AutomaticClonedLocale + + +1.12.0 +~~~~~~ + +This release contains the following changes : + +- Updating model definitions to support Node.js 12.x on Alexa Hosted Skills. + + +1.13.0 +~~~~~~ + +This release contains the following changes : + +- Added models to support `Paid skills `__. + + +1.13.1 +^^^^^^ + +This release contains the following changes : + +- Updating model definitions for maxResults and simulationType. + +1.14.0 +^^^^^^ + +This release contains the following changes : + +- Updating model definitions for `App link interfaces `__. + +1.14.1 +^^^^^^ + +This release contains the following changes : + +- Enable TSB APL Extension in skill manifest + +1.14.2 +^^^^^^ + +This release contains the following changes : + +- Updating model definitions +- Added new model definitions for Knowledge APIs + +1.14.3 +^^^^^^ + +This release contains the following changes : + +- Updating model definitions + +1.14.4 +^^^^^^ + +This release contains the following changes : + +- Updating model definitions + + +1.14.5 +^^^^^^ + +This release contains the following changes : + +- Updating model definitions + + +1.14.6 +^^^^^^ + +Updating model definitions + + +1.14.7 +^^^^^^ + +1.34.2 + +This release contains the following changes : + +- Update account linking api schema for VoiceForwardedAccount Linking +- Adding enum for measurement system permission scope to manifest permission name +- Adding support for nl-NL locale + + +1.14.8 +^^^^^^ + +This release contains the following changes : + +- Add AcousticallyRecognizedPhonemes under SpeechRecognition to IntentRequest +- Adding enum for dash 3p endpoints read scope in manifest permission name + + +1.15.0 +~~~~~~ + +This release contains the following changes : + +- Added SearchAndRefineSucceeded event for Alexa.Search + + + + +1.15.1 +^^^^^^ + +This release contains the following changes : + +- Added Associates Field in ShoppingKit + + + + +1.16.0 +~~~~~~ + +This release contains the following changes : + +- Adding NODE_16_X as publicly accepted hosted skill runtime + + +1.17.0 +~~~~~~ + +General bug fixes and updates + + +1.18.0 +~~~~~~ + +General bug fixes and updates + + +1.19.0 +~~~~~~ + +General bug fixes and updates + + +1.20.0 +~~~~~~ + +General bug fixes and updates + + +1.21.0 +~~~~~~ + +General bug fixes and updates + + +1.22.0 +~~~~~~ + +General bug fixes and updates + + +1.23.0 +~~~~~~ + +General bug fixes and updates + + +1.24.0 +~~~~~~ + +General bug fixes and updates + + +1.25.0 +~~~~~~ + +General bug fixes and updates + + +1.26.0 +~~~~~~ + +General bug fixes and updates + + +1.27.0 +~~~~~~ + +General bug fixes and updates + + +1.28.0 +~~~~~~ + +General bug fixes and updates + + +1.29.0 +~~~~~~ + +General bug fixes and updates + + +1.30.0 +~~~~~~ + +General bug fixes and updates + + +1.31.0 +~~~~~~ + +General bug fixes and updates + + +1.32.0 +~~~~~~ + +General bug fixes and updates + + +1.33.0 +~~~~~~ + +General bug fixes and updates + + +1.34.0 +~~~~~~ + +General bug fixes and updates + + +1.35.0 +~~~~~~ + +General bug fixes and updates + + +1.36.0 +~~~~~~ + +General bug fixes and updates diff --git a/ask-smapi-model/ask_smapi_model/__version__.py b/ask-smapi-model/ask_smapi_model/__version__.py index 3c1d5ae7..9c67af06 100644 --- a/ask-smapi-model/ask_smapi_model/__version__.py +++ b/ask-smapi-model/ask_smapi_model/__version__.py @@ -14,9 +14,8 @@ __pip_package_name__ = 'ask-smapi-model' __description__ = 'The SMAPI SDK Model package provides model definitions for making Skill Management API calls.' __url__ = 'https://github.com/alexa/alexa-apis-for-python' -__version__ = '1.7.3' +__version__ = '1.36.0' __author__ = 'Alexa Skills Kit' __author_email__ = 'ask-sdk-dynamic@amazon.com' __license__ = 'Apache 2.0' __keywords__ = ['SMAPI SDK', 'ASK SDK', 'Alexa Skills Kit', 'Alexa', 'Models', 'Smapi'] - diff --git a/ask-smapi-model/ask_smapi_model/services/skill_management/skill_management_service_client.py b/ask-smapi-model/ask_smapi_model/services/skill_management/skill_management_service_client.py index b01bd856..e0d7918f 100644 --- a/ask-smapi-model/ask_smapi_model/services/skill_management/skill_management_service_client.py +++ b/ask-smapi-model/ask_smapi_model/services/skill_management/skill_management_service_client.py @@ -32,147 +32,156 @@ if typing.TYPE_CHECKING: from typing import Dict, List, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_response import CatalogResponseV1 - from ask_smapi_model.v1.skill.interaction_model.type_version.list_slot_type_version_response import ListSlotTypeVersionResponseV1 - from ask_smapi_model.v1.skill.beta_test.test_body import TestBodyV1 - from ask_smapi_model.v1.skill.update_skill_with_package_request import UpdateSkillWithPackageRequestV1 - from ask_smapi_model.v1.skill.asr.annotation_sets.get_asr_annotation_set_annotations_response import GetAsrAnnotationSetAnnotationsResponseV1 - from ask_smapi_model.v1.skill.nlu.annotation_sets.list_nlu_annotation_sets_response import ListNLUAnnotationSetsResponseV1 - from ask_smapi_model.v1.skill.asr.evaluations.list_asr_evaluations_response import ListAsrEvaluationsResponseV1 - from ask_smapi_model.v1.skill.metrics.get_metric_data_response import GetMetricDataResponseV1 - from ask_smapi_model.v1.isp.list_in_skill_product_response import ListInSkillProductResponseV1 - from ask_smapi_model.v1.isp.update_in_skill_product_request import UpdateInSkillProductRequestV1 - from ask_smapi_model.v1.skill.evaluations.profile_nlu_response import ProfileNluResponseV1 - from ask_smapi_model.v0.catalog.upload.create_content_upload_request import CreateContentUploadRequestV0 - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials_request import HostedSkillRepositoryCredentialsRequestV1 - from ask_smapi_model.v2.skill.invocations.invocations_api_response import InvocationsApiResponseV2 - from ask_smapi_model.v1.skill.beta_test.testers.list_testers_response import ListTestersResponseV1 - from ask_smapi_model.v0.catalog.upload.create_content_upload_response import CreateContentUploadResponseV0 - from ask_smapi_model.v1.skill.interaction_model.model_type.list_slot_type_response import ListSlotTypeResponseV1 - from ask_smapi_model.v1.skill.create_skill_response import CreateSkillResponseV1 - from ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object import PostAsrEvaluationsRequestObjectV1 - from ask_smapi_model.v1.skill.rollback_request_status import RollbackRequestStatusV1 - from ask_smapi_model.v1.skill.nlu.annotation_sets.update_nlu_annotation_set_annotations_request import UpdateNLUAnnotationSetAnnotationsRequestV1 - from ask_smapi_model.v0.catalog.create_catalog_request import CreateCatalogRequestV0 - from ask_smapi_model.v1.isp.associated_skill_response import AssociatedSkillResponseV1 - from ask_smapi_model.v1.stage_type import StageTypeV1 - from ask_smapi_model.v1.skill.nlu.evaluations.evaluate_nlu_request import EvaluateNLURequestV1 - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission import HostedSkillPermissionV1 - from ask_smapi_model.v2.skill.simulations.simulations_api_request import SimulationsApiRequestV2 - from ask_smapi_model.v1.skill.simulations.simulations_api_response import SimulationsApiResponseV1 - from ask_smapi_model.v0.development_events.subscription.subscription_info import SubscriptionInfoV0 - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials_list import HostedSkillRepositoryCredentialsListV1 - from ask_smapi_model.v1.skill.clone_locale_request import CloneLocaleRequestV1 - from ask_smapi_model.v1.skill.upload_response import UploadResponseV1 - from ask_smapi_model.v0.bad_request_error import BadRequestErrorV0 - from ask_smapi_model.v1.isp.in_skill_product_summary_response import InSkillProductSummaryResponseV1 - from ask_smapi_model.v1.catalog.create_content_upload_url_response import CreateContentUploadUrlResponseV1 - from ask_smapi_model.v1.skill.create_rollback_request import CreateRollbackRequestV1 - from ask_smapi_model.v1.skill.ssl_certificate_payload import SSLCertificatePayloadV1 - from ask_smapi_model.v1.skill.asr.annotation_sets.list_asr_annotation_sets_response import ListASRAnnotationSetsResponseV1 - from ask_smapi_model.v1.catalog.create_content_upload_url_request import CreateContentUploadUrlRequestV1 - from ask_smapi_model.v1.skill.certification.list_certifications_response import ListCertificationsResponseV1 - from ask_smapi_model.v2.skill.simulations.simulations_api_response import SimulationsApiResponseV2 - from ask_smapi_model.v1.catalog.upload.catalog_upload_base import CatalogUploadBaseV1 - from ask_smapi_model.v1.skill.interaction_model.version.catalog_values import CatalogValuesV1 - from ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_response_object import PostAsrEvaluationsResponseObjectV1 - from ask_smapi_model.v1.error import ErrorV1 - from ask_smapi_model.v1.skill.interaction_model.conflict_detection.get_conflict_detection_job_status_response import GetConflictDetectionJobStatusResponseV1 - from ask_smapi_model.v1.skill.account_linking.account_linking_request import AccountLinkingRequestV1 - from ask_smapi_model.v0.catalog.catalog_details import CatalogDetailsV0 - from ask_smapi_model.v1.skill.history.intent_requests import IntentRequestsV1 - from ask_smapi_model.v1.skill.interaction_model.interaction_model_data import InteractionModelDataV1 - from ask_smapi_model.v2.bad_request_error import BadRequestErrorV2 - from ask_smapi_model.v1.skill.interaction_model.type_version.version_data import VersionDataV1 - from ask_smapi_model.v0.development_events.subscriber.list_subscribers_response import ListSubscribersResponseV0 - from ask_smapi_model.v1.skill.beta_test.beta_test import BetaTestV1 - from ask_smapi_model.v1.skill.history.locale_in_query import LocaleInQueryV1 - from ask_smapi_model.v1.isp.create_in_skill_product_request import CreateInSkillProductRequestV1 - from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_definition_output import CatalogDefinitionOutputV1 - from ask_smapi_model.v1.skill.account_linking.account_linking_response import AccountLinkingResponseV1 - from ask_smapi_model.v0.error import ErrorV0 - from ask_smapi_model.v1.skill.interaction_model.version.version_data import VersionDataV1 - from ask_smapi_model.v1.skill.nlu.annotation_sets.get_nlu_annotation_set_properties_response import GetNLUAnnotationSetPropertiesResponseV1 - from ask_smapi_model.v1.skill.interaction_model.type_version.slot_type_update import SlotTypeUpdateV1 - from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_response import SlotTypeResponseV1 - from ask_smapi_model.v1.skill.nlu.annotation_sets.create_nlu_annotation_set_request import CreateNLUAnnotationSetRequestV1 - from ask_smapi_model.v1.skill.clone_locale_status_response import CloneLocaleStatusResponseV1 - from ask_smapi_model.v1.skill.interaction_model.catalog.update_request import UpdateRequestV1 - from ask_smapi_model.v1.skill.certification.certification_response import CertificationResponseV1 - from ask_smapi_model.v1.skill.private.list_private_distribution_accounts_response import ListPrivateDistributionAccountsResponseV1 - from ask_smapi_model.v1.skill.history.interaction_type import InteractionTypeV1 - from ask_smapi_model.v0.catalog.upload.get_content_upload_response import GetContentUploadResponseV0 - from ask_smapi_model.v1.skill.publication.skill_publication_response import SkillPublicationResponseV1 - from ask_smapi_model.v1.skill.asr.evaluations.get_asr_evaluation_status_response_object import GetAsrEvaluationStatusResponseObjectV1 - from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_status import CatalogStatusV1 - from ask_smapi_model.v1.skill.asr.annotation_sets.get_asr_annotation_sets_properties_response import GetASRAnnotationSetsPropertiesResponseV1 - from ask_smapi_model.v1.skill.invocations.invoke_skill_response import InvokeSkillResponseV1 - from ask_smapi_model.v1.skill.asr.annotation_sets.create_asr_annotation_set_response import CreateAsrAnnotationSetResponseV1 - from ask_smapi_model.v0.development_events.subscriber.create_subscriber_request import CreateSubscriberRequestV0 - from ask_smapi_model.v1.skill.interaction_model.type_version.slot_type_version_data import SlotTypeVersionDataV1 - from ask_smapi_model.v1.skill.interaction_model.catalog.definition_data import DefinitionDataV1 - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_metadata import HostedSkillMetadataV1 - from ask_smapi_model.v1.audit_logs.audit_logs_response import AuditLogsResponseV1 - from ask_smapi_model.v1.skill.nlu.annotation_sets.create_nlu_annotation_set_response import CreateNLUAnnotationSetResponseV1 - from ask_smapi_model.v0.development_events.subscription.update_subscription_request import UpdateSubscriptionRequestV0 - from ask_smapi_model.v0.catalog.upload.complete_upload_request import CompleteUploadRequestV0 - from ask_smapi_model.v1.skill.nlu.evaluations.get_nlu_evaluation_response import GetNLUEvaluationResponseV1 - from ask_smapi_model.v1.skill.publication.publish_skill_request import PublishSkillRequestV1 - from ask_smapi_model.v1.skill.interaction_model.version.catalog_update import CatalogUpdateV1 - from ask_smapi_model.v0.development_events.subscriber.update_subscriber_request import UpdateSubscriberRequestV0 - from ask_smapi_model.v1.skill.validations.validations_api_response import ValidationsApiResponseV1 - from ask_smapi_model.v1.skill.nlu.evaluations.list_nlu_evaluations_response import ListNLUEvaluationsResponseV1 + from ask_smapi_model.v0.development_events.subscription.subscription_info import SubscriptionInfo as SubscriptionInfo_917bdab3 + from ask_smapi_model.v0.development_events.subscriber.list_subscribers_response import ListSubscribersResponse as ListSubscribersResponse_d1d01857 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials_list import HostedSkillRepositoryCredentialsList as HostedSkillRepositoryCredentialsList_d39d5fdf + from ask_smapi_model.v1.skill.experiment.update_exposure_request import UpdateExposureRequest as UpdateExposureRequest_ce52ce53 + from ask_smapi_model.v1.skill.clone_locale_status_response import CloneLocaleStatusResponse as CloneLocaleStatusResponse_8b6e06ed + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_status import CatalogStatus as CatalogStatus_c70ba222 + from ask_smapi_model.v1.skill.invocations.invoke_skill_request import InvokeSkillRequest as InvokeSkillRequest_8cf8aff9 + from ask_smapi_model.v1.skill.invocations.invoke_skill_response import InvokeSkillResponse as InvokeSkillResponse_6f32f451 + from ask_smapi_model.v1.skill.list_skill_versions_response import ListSkillVersionsResponse as ListSkillVersionsResponse_7522147d + from ask_smapi_model.v1.skill.validations.validations_api_response import ValidationsApiResponse as ValidationsApiResponse_aa0c51ca + from ask_smapi_model.v1.skill.publication.skill_publication_response import SkillPublicationResponse as SkillPublicationResponse_8da9d720 + from ask_smapi_model.v2.skill.invocations.invocations_api_response import InvocationsApiResponse as InvocationsApiResponse_3d7e3234 + from ask_smapi_model.v1.skill.interaction_model.jobs.create_job_definition_response import CreateJobDefinitionResponse as CreateJobDefinitionResponse_efaa9a6f + from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_definition_output import SlotTypeDefinitionOutput as SlotTypeDefinitionOutput_20e87f7 + from ask_smapi_model.v1.skill.interaction_model.type_version.list_slot_type_version_response import ListSlotTypeVersionResponse as ListSlotTypeVersionResponse_7d552abf + from ask_smapi_model.v1.skill.interaction_model.version.list_response import ListResponse as ListResponse_cb936759 + from ask_smapi_model.v1.skill.interaction_model.jobs.create_job_definition_request import CreateJobDefinitionRequest as CreateJobDefinitionRequest_e3d4c41 + from ask_smapi_model.v1.skill.upload_response import UploadResponse as UploadResponse_5aa06857 + from ask_smapi_model.v1.skill.interaction_model.version.catalog_version_data import CatalogVersionData as CatalogVersionData_86156352 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_metadata import HostedSkillMetadata as HostedSkillMetadata_b8976dfb + from ask_smapi_model.v1.skill.beta_test.test_body import TestBody as TestBody_65065c26 + from ask_smapi_model.v1.skill.experiment.set_customer_treatment_override_request import SetCustomerTreatmentOverrideRequest as SetCustomerTreatmentOverrideRequest_94022e79 + from ask_smapi_model.v1.skill.manifest.skill_manifest_envelope import SkillManifestEnvelope as SkillManifestEnvelope_fc0e823b + from ask_smapi_model.v0.development_events.subscription.create_subscription_request import CreateSubscriptionRequest as CreateSubscriptionRequest_1931508e + from ask_smapi_model.v1.skill.skill_credentials import SkillCredentials as SkillCredentials_a0f29ab1 + from ask_smapi_model.v1.catalog.create_content_upload_url_response import CreateContentUploadUrlResponse as CreateContentUploadUrlResponse_4a18d03c + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_response import CatalogResponse as CatalogResponse_2f6fe800 + from ask_smapi_model.v1.skill.history.intent_confidence_bin import IntentConfidenceBin as IntentConfidenceBin_4f7a62c8 + from ask_smapi_model.v1.skill.publication.publish_skill_request import PublishSkillRequest as PublishSkillRequest_efbc45c8 + from ask_smapi_model.v0.catalog.list_catalogs_response import ListCatalogsResponse as ListCatalogsResponse_3dd2a983 + from ask_smapi_model.v0.catalog.upload.list_uploads_response import ListUploadsResponse as ListUploadsResponse_59fc7728 + from ask_smapi_model.v1.skill.interaction_model.model_type.definition_data import DefinitionData as DefinitionData_dad4effb + from ask_smapi_model.v1.skill.create_skill_with_package_request import CreateSkillWithPackageRequest as CreateSkillWithPackageRequest_cd7f22be + from ask_smapi_model.v1.skill.interaction_model.type_version.slot_type_update import SlotTypeUpdate as SlotTypeUpdate_ae01835f + from ask_smapi_model.v2.skill.invocations.invocations_api_request import InvocationsApiRequest as InvocationsApiRequest_a422fa08 + from ask_smapi_model.v1.skill.experiment.list_experiments_response import ListExperimentsResponse as ListExperimentsResponse_c5b07ecb + from ask_smapi_model.v1.smart_home_evaluation.list_sh_capability_evaluations_response import ListSHCapabilityEvaluationsResponse as ListSHCapabilityEvaluationsResponse_e6fe49d5 + from ask_smapi_model.v2.error import Error as Error_ea6c1a5a + from ask_smapi_model.v1.isp.in_skill_product_summary_response import InSkillProductSummaryResponse as InSkillProductSummaryResponse_32ba64d7 + from ask_smapi_model.v0.bad_request_error import BadRequestError as BadRequestError_a8ac8b44 + from ask_smapi_model.v0.catalog.upload.create_content_upload_response import CreateContentUploadResponse as CreateContentUploadResponse_75cd6715 + from ask_smapi_model.v1.skill.simulations.simulations_api_request import SimulationsApiRequest as SimulationsApiRequest_606eed02 + from ask_smapi_model.v1.skill.experiment.get_customer_treatment_override_response import GetCustomerTreatmentOverrideResponse as GetCustomerTreatmentOverrideResponse_f64f689f + from ask_smapi_model.v1.skill.history.dialog_act_name import DialogActName as DialogActName_df8326d6 + from ask_smapi_model.v1.skill.ssl_certificate_payload import SSLCertificatePayload as SSLCertificatePayload_97891902 + from ask_smapi_model.v1.skill.withdraw_request import WithdrawRequest as WithdrawRequest_d09390b7 + from ask_smapi_model.v1.isp.associated_skill_response import AssociatedSkillResponse as AssociatedSkillResponse_12067635 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission import HostedSkillPermission as HostedSkillPermission_eb71ebfb + from ask_smapi_model.v1.skill.interaction_model.catalog.definition_data import DefinitionData as DefinitionData_ccdbb3c2 + from ask_smapi_model.v1.skill.interaction_model.model_type.update_request import UpdateRequest as UpdateRequest_43de537 + from ask_smapi_model.v1.skill.certification.list_certifications_response import ListCertificationsResponse as ListCertificationsResponse_f2a417c6 + from ask_smapi_model.v1.skill.import_response import ImportResponse as ImportResponse_364fa39f + from ask_smapi_model.v1.skill.nlu.evaluations.list_nlu_evaluations_response import ListNLUEvaluationsResponse as ListNLUEvaluationsResponse_7ef8d08f + from ask_smapi_model.v1.isp.create_in_skill_product_request import CreateInSkillProductRequest as CreateInSkillProductRequest_816cf44b + from ask_smapi_model.v1.skill.interaction_model.type_version.slot_type_version_data import SlotTypeVersionData as SlotTypeVersionData_1f3ee474 + from ask_smapi_model.v1.skill.interaction_model.interaction_model_data import InteractionModelData as InteractionModelData_487fc9ea + from ask_smapi_model.v1.skill.resource_schema.get_resource_schema_response import GetResourceSchemaResponse as GetResourceSchemaResponse_9df87651 + from ask_smapi_model.v1.skill.interaction_model.version.catalog_update import CatalogUpdate as CatalogUpdate_ef887f31 + from ask_smapi_model.v1.vendor_management.vendors import Vendors as Vendors_f5f1b90b + from ask_smapi_model.v1.skill.beta_test.testers.list_testers_response import ListTestersResponse as ListTestersResponse_991ec8e9 + from ask_smapi_model.v1.skill.interaction_model.version.version_data import VersionData as VersionData_af79e8d3 + from ask_smapi_model.v1.skill.beta_test.testers.testers_list import TestersList as TestersList_f8c0feda + from ask_smapi_model.v1.skill.evaluations.profile_nlu_response import ProfileNluResponse as ProfileNluResponse_d24b74c1 + from ask_smapi_model.v1.smart_home_evaluation.get_sh_capability_evaluation_response import GetSHCapabilityEvaluationResponse as GetSHCapabilityEvaluationResponse_d484531f + from ask_smapi_model.v1.skill.create_rollback_response import CreateRollbackResponse as CreateRollbackResponse_5a2e8250 + from ask_smapi_model.v1.smart_home_evaluation.get_sh_capability_evaluation_results_response import GetSHCapabilityEvaluationResultsResponse as GetSHCapabilityEvaluationResultsResponse_9a1d4db0 + from ask_smapi_model.v1.skill.history.publication_status import PublicationStatus as PublicationStatus_af1ce535 + from ask_smapi_model.v2.bad_request_error import BadRequestError as BadRequestError_765e0ac6 + from ask_smapi_model.v0.development_events.subscription.list_subscriptions_response import ListSubscriptionsResponse as ListSubscriptionsResponse_c033036c + from ask_smapi_model.v1.smart_home_evaluation.list_sh_capability_test_plans_response import ListSHCapabilityTestPlansResponse as ListSHCapabilityTestPlansResponse_cb289d6 + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 + from ask_smapi_model.v1.skill.submit_skill_for_certification_request import SubmitSkillForCertificationRequest as SubmitSkillForCertificationRequest_1d77b7ee + from ask_smapi_model.v2.skill.simulations.simulations_api_request import SimulationsApiRequest as SimulationsApiRequest_ae2e6503 + from ask_smapi_model.v1.skill.nlu.evaluations.evaluate_response import EvaluateResponse as EvaluateResponse_640ae5b5 + from ask_smapi_model.v0.development_events.subscription.update_subscription_request import UpdateSubscriptionRequest as UpdateSubscriptionRequest_71462c34 + from ask_smapi_model.v1.smart_home_evaluation.evaluate_sh_capability_request import EvaluateSHCapabilityRequest as EvaluateSHCapabilityRequest_2d391178 + from ask_smapi_model.v1.skill.create_skill_response import CreateSkillResponse as CreateSkillResponse_2bad1094 + from ask_smapi_model.v1.audit_logs.audit_logs_request import AuditLogsRequest as AuditLogsRequest_13316e3e + from ask_smapi_model.v1.error import Error as Error_fbe913d9 + from ask_smapi_model.v1.skill.history.intent_requests import IntentRequests as IntentRequests_35db15c7 + from ask_smapi_model.v1.isp.update_in_skill_product_request import UpdateInSkillProductRequest as UpdateInSkillProductRequest_ee975cf1 + from ask_smapi_model.v1.skill.interaction_model.version.list_catalog_entity_versions_response import ListCatalogEntityVersionsResponse as ListCatalogEntityVersionsResponse_aa31060e + from ask_smapi_model.v0.catalog.upload.get_content_upload_response import GetContentUploadResponse as GetContentUploadResponse_c8068011 + from ask_smapi_model.v1.smart_home_evaluation.evaluate_sh_capability_response import EvaluateSHCapabilityResponse as EvaluateSHCapabilityResponse_38ae7f22 + from ask_smapi_model.v1.catalog.upload.get_content_upload_response import GetContentUploadResponse as GetContentUploadResponse_b9580f92 + from ask_smapi_model.v1.skill.simulations.simulations_api_response import SimulationsApiResponse as SimulationsApiResponse_328955bc + from ask_smapi_model.v1.skill.clone_locale_request import CloneLocaleRequest as CloneLocaleRequest_2e00cdf4 + from ask_smapi_model.v1.skill.metrics.get_metric_data_response import GetMetricDataResponse as GetMetricDataResponse_722e44c4 + from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_status import SlotTypeStatus as SlotTypeStatus_a293ebfc + from ask_smapi_model.v1.skill.interaction_model.type_version.version_data import VersionData as VersionData_faa770c8 + from ask_smapi_model.v1.skill.experiment.update_experiment_request import UpdateExperimentRequest as UpdateExperimentRequest_d8449813 + from ask_smapi_model.v1.isp.product_response import ProductResponse as ProductResponse_b388eec4 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials_request import HostedSkillRepositoryCredentialsRequest as HostedSkillRepositoryCredentialsRequest_79a1c791 + from ask_smapi_model.v1.skill.nlu.annotation_sets.get_nlu_annotation_set_properties_response import GetNLUAnnotationSetPropertiesResponse as GetNLUAnnotationSetPropertiesResponse_731f20d3 + from ask_smapi_model.v1.skill.nlu.annotation_sets.list_nlu_annotation_sets_response import ListNLUAnnotationSetsResponse as ListNLUAnnotationSetsResponse_5b1b0b6a + from ask_smapi_model.v1.skill.account_linking.account_linking_response import AccountLinkingResponse as AccountLinkingResponse_b1f92882 + from ask_smapi_model.v1.skill.experiment.manage_experiment_state_request import ManageExperimentStateRequest as ManageExperimentStateRequest_c31e7ea0 + from ask_smapi_model.v1.skill.interaction_model.model_type.list_slot_type_response import ListSlotTypeResponse as ListSlotTypeResponse_b426c805 + from ask_smapi_model.v1.skill.evaluations.profile_nlu_request import ProfileNluRequest as ProfileNluRequest_501c0d87 + from ask_smapi_model.v1.skill.interaction_model.catalog.list_catalog_response import ListCatalogResponse as ListCatalogResponse_bc059ec9 + from ask_smapi_model.v1.skill.validations.validations_api_request import ValidationsApiRequest as ValidationsApiRequest_6f6e9aec import str - from ask_smapi_model.v1.skill.nlu.annotation_sets.update_nlu_annotation_set_properties_request import UpdateNLUAnnotationSetPropertiesRequestV1 - from ask_smapi_model.v1.skill.interaction_model.model_type.update_request import UpdateRequestV1 - from ask_smapi_model.v1.skill.export_response import ExportResponseV1 - from ask_smapi_model.v1.skill.evaluations.profile_nlu_request import ProfileNluRequestV1 - from ask_smapi_model.v1.skill.withdraw_request import WithdrawRequestV1 - from ask_smapi_model.v1.skill.nlu.evaluations.get_nlu_evaluation_results_response import GetNLUEvaluationResultsResponseV1 - from ask_smapi_model.v1.skill.list_skill_versions_response import ListSkillVersionsResponseV1 - from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_definition_output import SlotTypeDefinitionOutputV1 - from ask_smapi_model.v0.development_events.subscriber.subscriber_info import SubscriberInfoV0 - from ask_smapi_model.v0.development_events.subscription.create_subscription_request import CreateSubscriptionRequestV0 - from ask_smapi_model.v0.development_events.subscription.list_subscriptions_response import ListSubscriptionsResponseV0 - from ask_smapi_model.v1.skill.asr.evaluations.get_asr_evaluations_results_response import GetAsrEvaluationsResultsResponseV1 - from ask_smapi_model.v1.skill.simulations.simulations_api_request import SimulationsApiRequestV1 - from ask_smapi_model.v1.skill.skill_credentials import SkillCredentialsV1 - from ask_smapi_model.v1.skill.interaction_model.conflict_detection.get_conflicts_response import GetConflictsResponseV1 - from ask_smapi_model.v1.audit_logs.audit_logs_request import AuditLogsRequestV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 - from ask_smapi_model.v1.isp.in_skill_product_definition_response import InSkillProductDefinitionResponseV1 - from ask_smapi_model.v1.skill.asr.annotation_sets.update_asr_annotation_set_properties_request_object import UpdateAsrAnnotationSetPropertiesRequestObjectV1 - from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_status import SlotTypeStatusV1 - from ask_smapi_model.v1.skill.interaction_model.model_type.definition_data import DefinitionDataV1 - from ask_smapi_model.v1.skill.manifest.skill_manifest_envelope import SkillManifestEnvelopeV1 - from ask_smapi_model.v1.skill.interaction_model.version.list_catalog_entity_versions_response import ListCatalogEntityVersionsResponseV1 - from ask_smapi_model.v2.error import ErrorV2 - from ask_smapi_model.v1.skill.list_skill_response import ListSkillResponseV1 - from ask_smapi_model.v0.catalog.list_catalogs_response import ListCatalogsResponseV0 - from ask_smapi_model.v1.skill.create_rollback_response import CreateRollbackResponseV1 - from ask_smapi_model.v1.skill.validations.validations_api_request import ValidationsApiRequestV1 - from ask_smapi_model.v1.skill.submit_skill_for_certification_request import SubmitSkillForCertificationRequestV1 - from ask_smapi_model.v0.catalog.upload.list_uploads_response import ListUploadsResponseV0 - from ask_smapi_model.v1.catalog.upload.get_content_upload_response import GetContentUploadResponseV1 - from ask_smapi_model.v1.skill.history.dialog_act_name import DialogActNameV1 - from ask_smapi_model.v1.skill.import_response import ImportResponseV1 - from ask_smapi_model.v1.skill.skill_status import SkillStatusV1 - from ask_smapi_model.v1.skill.history.publication_status import PublicationStatusV1 - from ask_smapi_model.v1.skill.asr.annotation_sets.create_asr_annotation_set_request_object import CreateAsrAnnotationSetRequestObjectV1 - from ask_smapi_model.v2.skill.invocations.invocations_api_request import InvocationsApiRequestV2 - from ask_smapi_model.v1.skill.interaction_model.catalog.list_catalog_response import ListCatalogResponseV1 - from ask_smapi_model.v1.skill.invocations.invoke_skill_request import InvokeSkillRequestV1 - from ask_smapi_model.v1.skill.history.intent_confidence_bin import IntentConfidenceBinV1 - from ask_smapi_model.v1.skill.beta_test.testers.testers_list import TestersListV1 - from ask_smapi_model.v1.bad_request_error import BadRequestErrorV1 - from ask_smapi_model.v1.isp.product_response import ProductResponseV1 - from ask_smapi_model.v1.skill.create_skill_request import CreateSkillRequestV1 - from ask_smapi_model.v1.vendor_management.vendors import VendorsV1 - from ask_smapi_model.v1.skill.nlu.evaluations.evaluate_response import EvaluateResponseV1 - from ask_smapi_model.v1.skill.asr.annotation_sets.update_asr_annotation_set_contents_payload import UpdateAsrAnnotationSetContentsPayloadV1 - from ask_smapi_model.v1.skill.interaction_model.version.catalog_version_data import CatalogVersionDataV1 - from ask_smapi_model.v1.skill.create_skill_with_package_request import CreateSkillWithPackageRequestV1 - from ask_smapi_model.v1.skill.interaction_model.version.list_response import ListResponseV1 + from ask_smapi_model.v1.skill.interaction_model.jobs.validation_errors import ValidationErrors as ValidationErrors_d42055a1 + from ask_smapi_model.v1.skill.update_skill_with_package_request import UpdateSkillWithPackageRequest as UpdateSkillWithPackageRequest_d74ee124 + from ask_smapi_model.v1.skill.nlu.annotation_sets.create_nlu_annotation_set_response import CreateNLUAnnotationSetResponse as CreateNLUAnnotationSetResponse_b069cada + from ask_smapi_model.v1.skill.interaction_model.jobs.list_job_definitions_response import ListJobDefinitionsResponse as ListJobDefinitionsResponse_72319c0d + from ask_smapi_model.v1.isp.in_skill_product_definition_response import InSkillProductDefinitionResponse as InSkillProductDefinitionResponse_4aa468ff + from ask_smapi_model.v2.skill.simulations.simulations_api_response import SimulationsApiResponse as SimulationsApiResponse_e4ad17d + from ask_smapi_model.v1.skill.nlu.annotation_sets.update_nlu_annotation_set_properties_request import UpdateNLUAnnotationSetPropertiesRequest as UpdateNLUAnnotationSetPropertiesRequest_b569f485 + from ask_smapi_model.v0.development_events.subscriber.subscriber_info import SubscriberInfo as SubscriberInfo_854c325e + from ask_smapi_model.v0.development_events.subscriber.update_subscriber_request import UpdateSubscriberRequest as UpdateSubscriberRequest_d5e3199f + from ask_smapi_model.v1.skill.interaction_model.version.catalog_values import CatalogValues as CatalogValues_ef5c3823 + from ask_smapi_model.v1.skill.history.interaction_type import InteractionType as InteractionType_80494a05 + from ask_smapi_model.v1.skill.nlu.evaluations.evaluate_nlu_request import EvaluateNLURequest as EvaluateNLURequest_7a358f6a + from ask_smapi_model.v1.isp.list_in_skill_product_response import ListInSkillProductResponse as ListInSkillProductResponse_505e7307 + from ask_smapi_model.v1.skill.experiment.get_experiment_state_response import GetExperimentStateResponse as GetExperimentStateResponse_5152b250 + from ask_smapi_model.v1.skill.interaction_model.jobs.update_job_status_request import UpdateJobStatusRequest as UpdateJobStatusRequest_f2d8379d + from ask_smapi_model.v1.skill.account_linking.account_linking_request import AccountLinkingRequest as AccountLinkingRequest_cac174e + from ask_smapi_model.v1.skill.beta_test.beta_test import BetaTest as BetaTest_e826b162 + from ask_smapi_model.v1.catalog.create_content_upload_url_request import CreateContentUploadUrlRequest as CreateContentUploadUrlRequest_4999fa1c + from ask_smapi_model.v1.skill.skill_status import SkillStatus as SkillStatus_4fdd647b + from ask_smapi_model.v0.development_events.subscriber.create_subscriber_request import CreateSubscriberRequest as CreateSubscriberRequest_a96d53b9 + from ask_smapi_model.v1.skill.rollback_request_status import RollbackRequestStatus as RollbackRequestStatus_71665366 + from ask_smapi_model.v0.catalog.create_catalog_request import CreateCatalogRequest as CreateCatalogRequest_f3cdf8bb + from ask_smapi_model.v1.skill.interaction_model.catalog.update_request import UpdateRequest as UpdateRequest_12e0eebe + from ask_smapi_model.v1.skill.experiment.get_experiment_metric_snapshot_response import GetExperimentMetricSnapshotResponse as GetExperimentMetricSnapshotResponse_b6905a35 + from ask_smapi_model.v0.catalog.catalog_details import CatalogDetails as CatalogDetails_912693fa + from ask_smapi_model.v1.skill.nlu.annotation_sets.create_nlu_annotation_set_request import CreateNLUAnnotationSetRequest as CreateNLUAnnotationSetRequest_16b1430c + from ask_smapi_model.v1.skill.create_rollback_request import CreateRollbackRequest as CreateRollbackRequest_e7747a32 + from ask_smapi_model.v1.catalog.upload.catalog_upload_base import CatalogUploadBase as CatalogUploadBase_d7febd7 + from ask_smapi_model.v1.skill.certification.certification_response import CertificationResponse as CertificationResponse_97fdaad + from ask_smapi_model.v1.skill.experiment.get_experiment_response import GetExperimentResponse as GetExperimentResponse_fcd92c35 + from ask_smapi_model.v1.skill.export_response import ExportResponse as ExportResponse_b235e7bd + from ask_smapi_model.v0.catalog.upload.create_content_upload_request import CreateContentUploadRequest as CreateContentUploadRequest_bf7790d3 + from ask_smapi_model.v0.error import Error as Error_d660d58 + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_definition_output import CatalogDefinitionOutput as CatalogDefinitionOutput_21703cd9 + from ask_smapi_model.v0.catalog.upload.complete_upload_request import CompleteUploadRequest as CompleteUploadRequest_7b413950 + from ask_smapi_model.v1.skill.list_skill_response import ListSkillResponse as ListSkillResponse_527462d0 + from ask_smapi_model.v1.skill.nlu.annotation_sets.update_nlu_annotation_set_annotations_request import UpdateNLUAnnotationSetAnnotationsRequest as UpdateNLUAnnotationSetAnnotationsRequest_b336fe43 + from ask_smapi_model.v1.skill.interaction_model.jobs.job_definition import JobDefinition as JobDefinition_ee5db797 + from ask_smapi_model.v1.skill.nlu.evaluations.get_nlu_evaluation_response import GetNLUEvaluationResponse as GetNLUEvaluationResponse_2fb5e6ed + from ask_smapi_model.v1.audit_logs.audit_logs_response import AuditLogsResponse as AuditLogsResponse_bbbe1918 + from ask_smapi_model.v1.skill.create_skill_request import CreateSkillRequest as CreateSkillRequest_92e74e84 + from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_response import SlotTypeResponse as SlotTypeResponse_1ca513dc + from ask_smapi_model.v1.skill.nlu.evaluations.get_nlu_evaluation_results_response import GetNLUEvaluationResultsResponse as GetNLUEvaluationResultsResponse_5ca1fa54 + from ask_smapi_model.v1.skill.history.locale_in_query import LocaleInQuery as LocaleInQuery_6526a92e + from ask_smapi_model.v1.skill.interaction_model.jobs.get_executions_response import GetExecutionsResponse as GetExecutionsResponse_1b1a1680 + from ask_smapi_model.v1.skill.experiment.list_experiment_metric_snapshots_response import ListExperimentMetricSnapshotsResponse as ListExperimentMetricSnapshotsResponse_bb18308b + from ask_smapi_model.v1.skill.experiment.create_experiment_request import CreateExperimentRequest as CreateExperimentRequest_abced22d + from ask_smapi_model.v1.bad_request_error import BadRequestError as BadRequestError_f854b05 class SkillManagementServiceClient(BaseServiceClient): @@ -209,16 +218,16 @@ def __init__(self, api_configuration, authentication_configuration, lwa_client=N self._lwa_service_client = lwa_client def get_catalog_v0(self, catalog_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV0, CatalogDetailsV0, BadRequestErrorV0] + # type: (str, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, CatalogDetails_912693fa, Error_d660d58] """ Returns information about a particular catalog. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, CatalogDetailsV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, CatalogDetails_912693fa, Error_d660d58] """ operation_name = "get_catalog_v0" params = locals() @@ -279,22 +288,23 @@ def get_catalog_v0(self, catalog_id, **kwargs): if full_response: return api_response return api_response.body + def list_uploads_for_catalog_v0(self, catalog_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ListUploadsResponseV0, ErrorV0, BadRequestErrorV0] + # type: (str, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, ListUploadsResponse_59fc7728, Error_d660d58] """ Lists all the uploads for a particular catalog. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ListUploadsResponseV0, ErrorV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, ListUploadsResponse_59fc7728, Error_d660d58] """ operation_name = "list_uploads_for_catalog_v0" params = locals() @@ -359,20 +369,21 @@ def list_uploads_for_catalog_v0(self, catalog_id, **kwargs): if full_response: return api_response return api_response.body + def create_content_upload_v0(self, catalog_id, create_content_upload_request, **kwargs): - # type: (str, CreateContentUploadRequestV0, **Any) -> Union[ApiResponse, ErrorV0, CreateContentUploadResponseV0, BadRequestErrorV0] + # type: (str, CreateContentUploadRequest_bf7790d3, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, CreateContentUploadResponse_75cd6715, Error_d660d58] """ Creates a new upload for a catalog and returns presigned upload parts for uploading the file. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param create_content_upload_request: (required) Defines the request body for updateCatalog API. :type create_content_upload_request: ask_smapi_model.v0.catalog.upload.create_content_upload_request.CreateContentUploadRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, CreateContentUploadResponseV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, CreateContentUploadResponse_75cd6715, Error_d660d58] """ operation_name = "create_content_upload_v0" params = locals() @@ -439,20 +450,21 @@ def create_content_upload_v0(self, catalog_id, create_content_upload_request, ** if full_response: return api_response return api_response.body + def get_content_upload_by_id_v0(self, catalog_id, upload_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV0, GetContentUploadResponseV0, BadRequestErrorV0] + # type: (str, str, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58, GetContentUploadResponse_c8068011] """ Gets detailed information about an upload which was created for a specific catalog. Includes the upload's ingestion steps and a presigned url for downloading the file. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str - :param upload_id: (required) Unique identifier of the upload + :param upload_id: (required) Unique identifier of the upload. :type upload_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, GetContentUploadResponseV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58, GetContentUploadResponse_c8068011] """ operation_name = "get_content_upload_by_id_v0" params = locals() @@ -519,22 +531,23 @@ def get_content_upload_by_id_v0(self, catalog_id, upload_id, **kwargs): if full_response: return api_response return api_response.body + def complete_catalog_upload_v0(self, catalog_id, upload_id, complete_upload_request_payload, **kwargs): - # type: (str, str, CompleteUploadRequestV0, **Any) -> Union[ApiResponse, ErrorV0, BadRequestErrorV0] + # type: (str, str, CompleteUploadRequest_7b413950, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ Completes an upload. To be called after the file is uploaded to the backend data store using presigned url(s). - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str - :param upload_id: (required) Unique identifier of the upload + :param upload_id: (required) Unique identifier of the upload. :type upload_id: str :param complete_upload_request_payload: (required) Request payload to complete an upload. :type complete_upload_request_payload: ask_smapi_model.v0.catalog.upload.complete_upload_request.CompleteUploadRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "complete_catalog_upload_v0" params = locals() @@ -589,6 +602,7 @@ def complete_catalog_upload_v0(self, catalog_id, upload_id, complete_upload_requ error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v0.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v0.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v0.error.Error", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v0.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v0.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v0.error.Error", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v0.error.Error", status_code=503, message="Service Unavailable.")) @@ -607,9 +621,10 @@ def complete_catalog_upload_v0(self, catalog_id, upload_id, complete_upload_requ if full_response: return api_response + return None def list_catalogs_for_vendor_v0(self, vendor_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV0, ListCatalogsResponseV0, BadRequestErrorV0] + # type: (str, **Any) -> Union[ApiResponse, object, ListCatalogsResponse_3dd2a983, BadRequestError_a8ac8b44, Error_d660d58] """ Lists catalogs associated with a vendor. @@ -617,12 +632,12 @@ def list_catalogs_for_vendor_v0(self, vendor_id, **kwargs): :type vendor_id: str :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str - :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :param max_results: + :type max_results: int :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, ListCatalogsResponseV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, ListCatalogsResponse_3dd2a983, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "list_catalogs_for_vendor_v0" params = locals() @@ -687,9 +702,10 @@ def list_catalogs_for_vendor_v0(self, vendor_id, **kwargs): if full_response: return api_response return api_response.body + def create_catalog_v0(self, create_catalog_request, **kwargs): - # type: (CreateCatalogRequestV0, **Any) -> Union[ApiResponse, ErrorV0, CatalogDetailsV0, BadRequestErrorV0] + # type: (CreateCatalogRequest_f3cdf8bb, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, CatalogDetails_912693fa, Error_d660d58] """ Creates a new catalog based on information provided in the request. @@ -698,7 +714,7 @@ def create_catalog_v0(self, create_catalog_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, CatalogDetailsV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, CatalogDetails_912693fa, Error_d660d58] """ operation_name = "create_catalog_v0" params = locals() @@ -759,9 +775,10 @@ def create_catalog_v0(self, create_catalog_request, **kwargs): if full_response: return api_response return api_response.body + def list_subscribers_for_development_events_v0(self, vendor_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV0, BadRequestErrorV0, ListSubscribersResponseV0] + # type: (str, **Any) -> Union[ApiResponse, object, ListSubscribersResponse_d1d01857, BadRequestError_a8ac8b44, Error_d660d58] """ Lists the subscribers for a particular vendor. @@ -770,11 +787,11 @@ def list_subscribers_for_development_events_v0(self, vendor_id, **kwargs): :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, BadRequestErrorV0, ListSubscribersResponseV0] + :rtype: Union[ApiResponse, object, ListSubscribersResponse_d1d01857, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "list_subscribers_for_development_events_v0" params = locals() @@ -839,9 +856,10 @@ def list_subscribers_for_development_events_v0(self, vendor_id, **kwargs): if full_response: return api_response return api_response.body + def create_subscriber_for_development_events_v0(self, create_subscriber_request, **kwargs): - # type: (CreateSubscriberRequestV0, **Any) -> Union[ApiResponse, ErrorV0, BadRequestErrorV0] + # type: (CreateSubscriberRequest_a96d53b9, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ Creates a new subscriber resource for a vendor. @@ -850,7 +868,7 @@ def create_subscriber_for_development_events_v0(self, create_subscriber_request, :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "create_subscriber_for_development_events_v0" params = locals() @@ -909,9 +927,10 @@ def create_subscriber_for_development_events_v0(self, create_subscriber_request, if full_response: return api_response + return None def delete_subscriber_for_development_events_v0(self, subscriber_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV0, BadRequestErrorV0] + # type: (str, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ Deletes a specified subscriber. @@ -920,7 +939,7 @@ def delete_subscriber_for_development_events_v0(self, subscriber_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "delete_subscriber_for_development_events_v0" params = locals() @@ -981,9 +1000,10 @@ def delete_subscriber_for_development_events_v0(self, subscriber_id, **kwargs): if full_response: return api_response + return None def get_subscriber_for_development_events_v0(self, subscriber_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV0, BadRequestErrorV0, SubscriberInfoV0] + # type: (str, **Any) -> Union[ApiResponse, object, SubscriberInfo_854c325e, BadRequestError_a8ac8b44, Error_d660d58] """ Returns information about specified subscriber. @@ -992,7 +1012,7 @@ def get_subscriber_for_development_events_v0(self, subscriber_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, BadRequestErrorV0, SubscriberInfoV0] + :rtype: Union[ApiResponse, object, SubscriberInfo_854c325e, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "get_subscriber_for_development_events_v0" params = locals() @@ -1053,9 +1073,10 @@ def get_subscriber_for_development_events_v0(self, subscriber_id, **kwargs): if full_response: return api_response return api_response.body + def set_subscriber_for_development_events_v0(self, subscriber_id, update_subscriber_request, **kwargs): - # type: (str, UpdateSubscriberRequestV0, **Any) -> Union[ApiResponse, ErrorV0, BadRequestErrorV0] + # type: (str, UpdateSubscriberRequest_d5e3199f, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ Updates the properties of a subscriber. @@ -1066,7 +1087,7 @@ def set_subscriber_for_development_events_v0(self, subscriber_id, update_subscri :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "set_subscriber_for_development_events_v0" params = locals() @@ -1133,9 +1154,10 @@ def set_subscriber_for_development_events_v0(self, subscriber_id, update_subscri if full_response: return api_response + return None def list_subscriptions_for_development_events_v0(self, vendor_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ListSubscriptionsResponseV0, ErrorV0, BadRequestErrorV0] + # type: (str, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, ListSubscriptionsResponse_c033036c, Error_d660d58] """ Lists all the subscriptions for a vendor/subscriber depending on the query parameter. @@ -1144,13 +1166,13 @@ def list_subscriptions_for_development_events_v0(self, vendor_id, **kwargs): :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param subscriber_id: Unique identifier of the subscriber. If this query parameter is provided, the list would be filtered by the owning subscriberId. :type subscriber_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ListSubscriptionsResponseV0, ErrorV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, ListSubscriptionsResponse_c033036c, Error_d660d58] """ operation_name = "list_subscriptions_for_development_events_v0" params = locals() @@ -1217,9 +1239,10 @@ def list_subscriptions_for_development_events_v0(self, vendor_id, **kwargs): if full_response: return api_response return api_response.body + def create_subscription_for_development_events_v0(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, ErrorV0, BadRequestErrorV0] + # type: (**Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ Creates a new subscription for a subscriber. This needs to be authorized by the client/vendor who created the subscriber and the vendor who publishes the event. @@ -1228,7 +1251,7 @@ def create_subscription_for_development_events_v0(self, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "create_subscription_for_development_events_v0" params = locals() @@ -1285,9 +1308,10 @@ def create_subscription_for_development_events_v0(self, **kwargs): if full_response: return api_response + return None def delete_subscription_for_development_events_v0(self, subscription_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV0, BadRequestErrorV0] + # type: (str, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ Deletes a particular subscription. Both, the vendor who created the subscriber and the vendor who publishes the event can delete this resource with appropriate authorization. @@ -1296,7 +1320,7 @@ def delete_subscription_for_development_events_v0(self, subscription_id, **kwarg :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "delete_subscription_for_development_events_v0" params = locals() @@ -1357,9 +1381,10 @@ def delete_subscription_for_development_events_v0(self, subscription_id, **kwarg if full_response: return api_response + return None def get_subscription_for_development_events_v0(self, subscription_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, SubscriptionInfoV0, ErrorV0, BadRequestErrorV0] + # type: (str, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, SubscriptionInfo_917bdab3, Error_d660d58] """ Returns information about a particular subscription. Both, the vendor who created the subscriber and the vendor who publishes the event can retrieve this resource with appropriate authorization. @@ -1368,7 +1393,7 @@ def get_subscription_for_development_events_v0(self, subscription_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, SubscriptionInfoV0, ErrorV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, SubscriptionInfo_917bdab3, Error_d660d58] """ operation_name = "get_subscription_for_development_events_v0" params = locals() @@ -1429,9 +1454,10 @@ def get_subscription_for_development_events_v0(self, subscription_id, **kwargs): if full_response: return api_response return api_response.body + def set_subscription_for_development_events_v0(self, subscription_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV0, BadRequestErrorV0] + # type: (str, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ Updates the mutable properties of a subscription. This needs to be authorized by the client/vendor who created the subscriber and the vendor who publishes the event. The subscriberId cannot be updated. @@ -1442,7 +1468,7 @@ def set_subscription_for_development_events_v0(self, subscription_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "set_subscription_for_development_events_v0" params = locals() @@ -1505,20 +1531,21 @@ def set_subscription_for_development_events_v0(self, subscription_id, **kwargs): if full_response: return api_response + return None def associate_catalog_with_skill_v0(self, skill_id, catalog_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV0, BadRequestErrorV0] + # type: (str, str, **Any) -> Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ Associate skill with catalog. :param skill_id: (required) The skill ID. :type skill_id: str - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "associate_catalog_with_skill_v0" params = locals() @@ -1585,9 +1612,10 @@ def associate_catalog_with_skill_v0(self, skill_id, catalog_id, **kwargs): if full_response: return api_response + return None def list_catalogs_for_skill_v0(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV0, ListCatalogsResponseV0, BadRequestErrorV0] + # type: (str, **Any) -> Union[ApiResponse, object, ListCatalogsResponse_3dd2a983, BadRequestError_a8ac8b44, Error_d660d58] """ Lists all the catalogs associated with a skill. @@ -1595,12 +1623,12 @@ def list_catalogs_for_skill_v0(self, skill_id, **kwargs): :type skill_id: str :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str - :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :param max_results: + :type max_results: int :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV0, ListCatalogsResponseV0, BadRequestErrorV0] + :rtype: Union[ApiResponse, object, ListCatalogsResponse_3dd2a983, BadRequestError_a8ac8b44, Error_d660d58] """ operation_name = "list_catalogs_for_skill_v0" params = locals() @@ -1665,21 +1693,22 @@ def list_catalogs_for_skill_v0(self, skill_id, **kwargs): if full_response: return api_response return api_response.body + def create_catalog_upload_v1(self, catalog_id, catalog_upload_request_body, **kwargs): - # type: (str, CatalogUploadBaseV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + # type: (str, CatalogUploadBase_d7febd7, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ Create new upload Creates a new upload for a catalog and returns location to track the upload process. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param catalog_upload_request_body: (required) Provides the request body for create content upload :type catalog_upload_request_body: ask_smapi_model.v1.catalog.upload.catalog_upload_base.CatalogUploadBase :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "create_catalog_upload_v1" params = locals() @@ -1746,21 +1775,22 @@ def create_catalog_upload_v1(self, catalog_id, catalog_upload_request_body, **kw if full_response: return api_response + return None def get_content_upload_by_id_v1(self, catalog_id, upload_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, GetContentUploadResponseV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, GetContentUploadResponse_b9580f92] """ Get upload Gets detailed information about an upload which was created for a specific catalog. Includes the upload's ingestion steps and a url for downloading the file. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str - :param upload_id: (required) Unique identifier of the upload + :param upload_id: (required) Unique identifier of the upload. :type upload_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, GetContentUploadResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, GetContentUploadResponse_b9580f92] """ operation_name = "get_content_upload_by_id_v1" params = locals() @@ -1826,20 +1856,21 @@ def get_content_upload_by_id_v1(self, catalog_id, upload_id, **kwargs): if full_response: return api_response return api_response.body + def generate_catalog_upload_url_v1(self, catalog_id, generate_catalog_upload_url_request_body, **kwargs): - # type: (str, CreateContentUploadUrlRequestV1, **Any) -> Union[ApiResponse, ErrorV1, CreateContentUploadUrlResponseV1, BadRequestErrorV1] + # type: (str, CreateContentUploadUrlRequest_4999fa1c, **Any) -> Union[ApiResponse, object, Error_fbe913d9, CreateContentUploadUrlResponse_4a18d03c, BadRequestError_f854b05] """ Generates preSigned urls to upload data - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param generate_catalog_upload_url_request_body: (required) Request body to generate catalog upload url :type generate_catalog_upload_url_request_body: ask_smapi_model.v1.catalog.create_content_upload_url_request.CreateContentUploadUrlRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, CreateContentUploadUrlResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, CreateContentUploadUrlResponse_4a18d03c, BadRequestError_f854b05] """ operation_name = "generate_catalog_upload_url_v1" params = locals() @@ -1906,9 +1937,10 @@ def generate_catalog_upload_url_v1(self, catalog_id, generate_catalog_upload_url if full_response: return api_response return api_response.body + def query_development_audit_logs_v1(self, get_audit_logs_request, **kwargs): - # type: (AuditLogsRequestV1, **Any) -> Union[ApiResponse, ErrorV1, AuditLogsResponseV1, BadRequestErrorV1] + # type: (AuditLogsRequest_13316e3e, **Any) -> Union[ApiResponse, object, Error_fbe913d9, AuditLogsResponse_bbbe1918, BadRequestError_f854b05] """ The SMAPI Audit Logs API provides customers with an audit history of all SMAPI calls made by a developer or developers with permissions on that account. @@ -1917,7 +1949,7 @@ def query_development_audit_logs_v1(self, get_audit_logs_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, AuditLogsResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, AuditLogsResponse_bbbe1918, BadRequestError_f854b05] """ operation_name = "query_development_audit_logs_v1" params = locals() @@ -1978,9 +2010,10 @@ def query_development_audit_logs_v1(self, get_audit_logs_request, **kwargs): if full_response: return api_response return api_response.body + def get_isp_list_for_vendor_v1(self, vendor_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV1, ListInSkillProductResponseV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ListInSkillProductResponse_505e7307] """ Get the list of in-skill products for the vendor. @@ -1989,7 +2022,7 @@ def get_isp_list_for_vendor_v1(self, vendor_id, **kwargs): :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param product_id: The list of in-skill product IDs that you wish to get the summary for. A maximum of 50 in-skill product IDs can be specified in a single listInSkillProducts call. Please note that this parameter must not be used with 'nextToken' and/or 'maxResults' parameter. :type product_id: list[str] :param stage: Filter in-skill products by specified stage. @@ -2005,7 +2038,7 @@ def get_isp_list_for_vendor_v1(self, vendor_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, ListInSkillProductResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ListInSkillProductResponse_505e7307] """ operation_name = "get_isp_list_for_vendor_v1" params = locals() @@ -2079,9 +2112,10 @@ def get_isp_list_for_vendor_v1(self, vendor_id, **kwargs): if full_response: return api_response return api_response.body + def create_isp_for_vendor_v1(self, create_in_skill_product_request, **kwargs): - # type: (CreateInSkillProductRequestV1, **Any) -> Union[ApiResponse, ProductResponseV1, ErrorV1, BadRequestErrorV1] + # type: (CreateInSkillProductRequest_816cf44b, **Any) -> Union[ApiResponse, object, Error_fbe913d9, ProductResponse_b388eec4, BadRequestError_f854b05] """ Creates a new in-skill product for given vendorId. @@ -2090,7 +2124,7 @@ def create_isp_for_vendor_v1(self, create_in_skill_product_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ProductResponseV1, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, ProductResponse_b388eec4, BadRequestError_f854b05] """ operation_name = "create_isp_for_vendor_v1" params = locals() @@ -2148,9 +2182,10 @@ def create_isp_for_vendor_v1(self, create_in_skill_product_request, **kwargs): if full_response: return api_response return api_response.body + def disassociate_isp_with_skill_v1(self, product_id, skill_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ Disassociates an in-skill product from a skill. @@ -2161,7 +2196,7 @@ def disassociate_isp_with_skill_v1(self, product_id, skill_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "disassociate_isp_with_skill_v1" params = locals() @@ -2227,9 +2262,10 @@ def disassociate_isp_with_skill_v1(self, product_id, skill_id, **kwargs): if full_response: return api_response + return None def associate_isp_with_skill_v1(self, product_id, skill_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ Associates an in-skill product with a skill. @@ -2240,7 +2276,7 @@ def associate_isp_with_skill_v1(self, product_id, skill_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "associate_isp_with_skill_v1" params = locals() @@ -2306,9 +2342,10 @@ def associate_isp_with_skill_v1(self, product_id, skill_id, **kwargs): if full_response: return api_response + return None def delete_isp_for_product_v1(self, product_id, stage, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ Deletes the in-skill product for given productId. Only development stage supported. Live in-skill products or in-skill products associated with a skill cannot be deleted by this API. @@ -2321,7 +2358,7 @@ def delete_isp_for_product_v1(self, product_id, stage, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "delete_isp_for_product_v1" params = locals() @@ -2390,9 +2427,10 @@ def delete_isp_for_product_v1(self, product_id, stage, **kwargs): if full_response: return api_response + return None def reset_entitlement_for_product_v1(self, product_id, stage, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ Resets the entitlement(s) of the Product for the current user. @@ -2403,7 +2441,7 @@ def reset_entitlement_for_product_v1(self, product_id, stage, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "reset_entitlement_for_product_v1" params = locals() @@ -2470,9 +2508,10 @@ def reset_entitlement_for_product_v1(self, product_id, stage, **kwargs): if full_response: return api_response + return None def get_isp_definition_v1(self, product_id, stage, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1, InSkillProductDefinitionResponseV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, InSkillProductDefinitionResponse_4aa468ff, Error_fbe913d9, BadRequestError_f854b05] """ Returns the in-skill product definition for given productId. @@ -2483,7 +2522,7 @@ def get_isp_definition_v1(self, product_id, stage, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1, InSkillProductDefinitionResponseV1] + :rtype: Union[ApiResponse, object, InSkillProductDefinitionResponse_4aa468ff, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "get_isp_definition_v1" params = locals() @@ -2548,9 +2587,10 @@ def get_isp_definition_v1(self, product_id, stage, **kwargs): if full_response: return api_response return api_response.body + def update_isp_for_product_v1(self, product_id, stage, update_in_skill_product_request, **kwargs): - # type: (str, str, UpdateInSkillProductRequestV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + # type: (str, str, UpdateInSkillProductRequest_ee975cf1, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ Updates in-skill product definition for given productId. Only development stage supported. @@ -2565,7 +2605,7 @@ def update_isp_for_product_v1(self, product_id, stage, update_in_skill_product_r :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "update_isp_for_product_v1" params = locals() @@ -2640,9 +2680,10 @@ def update_isp_for_product_v1(self, product_id, stage, update_in_skill_product_r if full_response: return api_response + return None def get_isp_associated_skills_v1(self, product_id, stage, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, AssociatedSkillResponseV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, AssociatedSkillResponse_12067635, Error_fbe913d9, BadRequestError_f854b05] """ Get the associated skills for the in-skill product. @@ -2653,11 +2694,11 @@ def get_isp_associated_skills_v1(self, product_id, stage, **kwargs): :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, AssociatedSkillResponseV1] + :rtype: Union[ApiResponse, object, AssociatedSkillResponse_12067635, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "get_isp_associated_skills_v1" params = locals() @@ -2706,6 +2747,7 @@ def get_isp_associated_skills_v1(self, product_id, stage, **kwargs): error_definitions = [] # type: List error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.isp.associated_skill_response.AssociatedSkillResponse", status_code=200, message="Returns skills associated with the in-skill product.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad request. Returned when a required parameter is not present, badly formatted. ")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="Requested resource not found.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Too many requests received.")) @@ -2725,9 +2767,10 @@ def get_isp_associated_skills_v1(self, product_id, stage, **kwargs): if full_response: return api_response return api_response.body + def get_isp_summary_v1(self, product_id, stage, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, InSkillProductSummaryResponseV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, InSkillProductSummaryResponse_32ba64d7] """ Get the summary information for an in-skill product. @@ -2738,7 +2781,7 @@ def get_isp_summary_v1(self, product_id, stage, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, InSkillProductSummaryResponseV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, InSkillProductSummaryResponse_32ba64d7] """ operation_name = "get_isp_summary_v1" params = locals() @@ -2802,18 +2845,19 @@ def get_isp_summary_v1(self, product_id, stage, **kwargs): if full_response: return api_response return api_response.body + def delete_interaction_model_catalog_v1(self, catalog_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Delete the catalog. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "delete_interaction_model_catalog_v1" params = locals() @@ -2874,18 +2918,19 @@ def delete_interaction_model_catalog_v1(self, catalog_id, **kwargs): if full_response: return api_response + return None def get_interaction_model_catalog_definition_v1(self, catalog_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, CatalogDefinitionOutputV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CatalogDefinitionOutput_21703cd9] """ get the catalog definition - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, CatalogDefinitionOutputV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CatalogDefinitionOutput_21703cd9] """ operation_name = "get_interaction_model_catalog_definition_v1" params = locals() @@ -2946,20 +2991,21 @@ def get_interaction_model_catalog_definition_v1(self, catalog_id, **kwargs): if full_response: return api_response return api_response.body + def update_interaction_model_catalog_v1(self, catalog_id, update_request, **kwargs): - # type: (str, UpdateRequestV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, UpdateRequest_12e0eebe, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ update description and vendorGuidance string for certain version of a catalog. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param update_request: (required) :type update_request: ask_smapi_model.v1.skill.interaction_model.catalog.update_request.UpdateRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "update_interaction_model_catalog_v1" params = locals() @@ -3026,20 +3072,21 @@ def update_interaction_model_catalog_v1(self, catalog_id, update_request, **kwar if full_response: return api_response + return None def get_interaction_model_catalog_update_status_v1(self, catalog_id, update_request_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, CatalogStatusV1, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CatalogStatus_c70ba222] """ Get the status of catalog resource and its sub-resources for a given catalogId. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param update_request_id: (required) The identifier for slotType version creation process :type update_request_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, CatalogStatusV1, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CatalogStatus_c70ba222] """ operation_name = "get_interaction_model_catalog_update_status_v1" params = locals() @@ -3106,16 +3153,17 @@ def get_interaction_model_catalog_update_status_v1(self, catalog_id, update_requ if full_response: return api_response return api_response.body + def list_interaction_model_catalog_versions_v1(self, catalog_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, ListCatalogEntityVersionsResponseV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, ListCatalogEntityVersionsResponse_aa31060e, StandardizedError_f5106a89, BadRequestError_f854b05] """ List all the historical versions of the given catalogId. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param sort_direction: Sets the sorting direction of the result items. When set to 'asc' these items are returned in ascending order of sortField value and when set to 'desc' these items are returned in descending order of sortField value. @@ -3125,7 +3173,7 @@ def list_interaction_model_catalog_versions_v1(self, catalog_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, ListCatalogEntityVersionsResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, ListCatalogEntityVersionsResponse_aa31060e, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "list_interaction_model_catalog_versions_v1" params = locals() @@ -3194,20 +3242,21 @@ def list_interaction_model_catalog_versions_v1(self, catalog_id, **kwargs): if full_response: return api_response return api_response.body + def create_interaction_model_catalog_version_v1(self, catalog_id, catalog, **kwargs): - # type: (str, VersionDataV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, VersionData_af79e8d3, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Create a new version of catalog entity for the given catalogId. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param catalog: (required) :type catalog: ask_smapi_model.v1.skill.interaction_model.version.version_data.VersionData :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "create_interaction_model_catalog_version_v1" params = locals() @@ -3274,20 +3323,21 @@ def create_interaction_model_catalog_version_v1(self, catalog_id, catalog, **kwa if full_response: return api_response + return None def delete_interaction_model_catalog_version_v1(self, catalog_id, version, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Delete catalog version. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param version: (required) Version for interaction model. :type version: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "delete_interaction_model_catalog_version_v1" params = locals() @@ -3354,20 +3404,21 @@ def delete_interaction_model_catalog_version_v1(self, catalog_id, version, **kwa if full_response: return api_response + return None def get_interaction_model_catalog_version_v1(self, catalog_id, version, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, CatalogVersionDataV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CatalogVersionData_86156352] """ Get catalog version data of given catalog version. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param version: (required) Version for interaction model. :type version: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, CatalogVersionDataV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CatalogVersionData_86156352] """ operation_name = "get_interaction_model_catalog_version_v1" params = locals() @@ -3434,13 +3485,14 @@ def get_interaction_model_catalog_version_v1(self, catalog_id, version, **kwargs if full_response: return api_response return api_response.body + def update_interaction_model_catalog_version_v1(self, catalog_id, version, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Update description and vendorGuidance string for certain version of a catalog. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param version: (required) Version for interaction model. :type version: str @@ -3449,7 +3501,7 @@ def update_interaction_model_catalog_version_v1(self, catalog_id, version, **kwa :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "update_interaction_model_catalog_version_v1" params = locals() @@ -3518,24 +3570,25 @@ def update_interaction_model_catalog_version_v1(self, catalog_id, version, **kwa if full_response: return api_response + return None def get_interaction_model_catalog_values_v1(self, catalog_id, version, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, CatalogValuesV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, CatalogValues_ef5c3823, StandardizedError_f5106a89, BadRequestError_f854b05] """ Get catalog values from the given catalogId & version. - :param catalog_id: (required) Provides a unique identifier of the catalog + :param catalog_id: (required) Provides a unique identifier of the catalog. :type catalog_id: str :param version: (required) Version for interaction model. :type version: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, CatalogValuesV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, CatalogValues_ef5c3823, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "get_interaction_model_catalog_values_v1" params = locals() @@ -3606,16 +3659,17 @@ def get_interaction_model_catalog_values_v1(self, catalog_id, version, **kwargs) if full_response: return api_response return api_response.body + def list_interaction_model_catalogs_v1(self, vendor_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ListCatalogResponseV1, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ListCatalogResponse_bc059ec9] """ List all catalogs for the vendor. :param vendor_id: (required) The vendor ID. :type vendor_id: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param sort_direction: Sets the sorting direction of the result items. When set to 'asc' these items are returned in ascending order of sortField value and when set to 'desc' these items are returned in descending order of sortField value. @@ -3623,7 +3677,7 @@ def list_interaction_model_catalogs_v1(self, vendor_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ListCatalogResponseV1, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ListCatalogResponse_bc059ec9] """ operation_name = "list_interaction_model_catalogs_v1" params = locals() @@ -3690,9 +3744,10 @@ def list_interaction_model_catalogs_v1(self, vendor_id, **kwargs): if full_response: return api_response return api_response.body + def create_interaction_model_catalog_v1(self, catalog, **kwargs): - # type: (DefinitionDataV1, **Any) -> Union[ApiResponse, CatalogResponseV1, StandardizedErrorV1, BadRequestErrorV1] + # type: (DefinitionData_ccdbb3c2, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CatalogResponse_2f6fe800] """ Create a new version of catalog within the given catalogId. @@ -3701,7 +3756,7 @@ def create_interaction_model_catalog_v1(self, catalog, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, CatalogResponseV1, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CatalogResponse_2f6fe800] """ operation_name = "create_interaction_model_catalog_v1" params = locals() @@ -3762,26 +3817,25 @@ def create_interaction_model_catalog_v1(self, catalog, **kwargs): if full_response: return api_response return api_response.body + - def list_interaction_model_slot_types_v1(self, vendor_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, ListSlotTypeResponseV1, BadRequestErrorV1] + def list_job_definitions_for_interaction_model_v1(self, vendor_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ListJobDefinitionsResponse_72319c0d] """ - List all slot types for the vendor. + Retrieve a list of jobs associated with the vendor. :param vendor_id: (required) The vendor ID. :type vendor_id: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str - :param sort_direction: Sets the sorting direction of the result items. When set to 'asc' these items are returned in ascending order of sortField value and when set to 'desc' these items are returned in descending order of sortField value. - :type sort_direction: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, ListSlotTypeResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ListJobDefinitionsResponse_72319c0d] """ - operation_name = "list_interaction_model_slot_types_v1" + operation_name = "list_job_definitions_for_interaction_model_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -3791,7 +3845,7 @@ def list_interaction_model_slot_types_v1(self, vendor_id, **kwargs): raise ValueError( "Missing the required parameter `vendor_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/api/custom/interactionModel/slotTypes' + resource_path = '/v1/skills/api/custom/interactionModel/jobs' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -3803,8 +3857,6 @@ def list_interaction_model_slot_types_v1(self, vendor_id, **kwargs): query_params.append(('maxResults', params['max_results'])) if 'next_token' in params: query_params.append(('nextToken', params['next_token'])) - if 'sort_direction' in params: - query_params.append(('sortDirection', params['sort_direction'])) header_params = [] # type: List @@ -3823,10 +3875,10 @@ def list_interaction_model_slot_types_v1(self, vendor_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.model_type.list_slot_type_response.ListSlotTypeResponse", status_code=200, message="Returns list of slot types for the vendor.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.jobs.list_job_definitions_response.ListJobDefinitionsResponse", status_code=200, message="List of all jobs associated with the vendor.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) @@ -3840,46 +3892,47 @@ def list_interaction_model_slot_types_v1(self, vendor_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.interaction_model.model_type.list_slot_type_response.ListSlotTypeResponse") + response_type="ask_smapi_model.v1.skill.interaction_model.jobs.list_job_definitions_response.ListJobDefinitionsResponse") if full_response: return api_response return api_response.body + - def create_interaction_model_slot_type_v1(self, slot_type, **kwargs): - # type: (DefinitionDataV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, SlotTypeResponseV1, BadRequestErrorV1] + def delete_job_definition_for_interaction_model_v1(self, job_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ValidationErrors_d42055a1] """ - Create a new version of slot type within the given slotTypeId. + Delete the job definition for a given jobId. - :param slot_type: (required) - :type slot_type: ask_smapi_model.v1.skill.interaction_model.model_type.definition_data.DefinitionData + :param job_id: (required) The identifier for dynamic jobs. + :type job_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, SlotTypeResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ValidationErrors_d42055a1] """ - operation_name = "create_interaction_model_slot_type_v1" + operation_name = "delete_job_definition_for_interaction_model_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val del params['kwargs'] - # verify the required parameter 'slot_type' is set - if ('slot_type' not in params) or (params['slot_type'] is None): + # verify the required parameter 'job_id' is set + if ('job_id' not in params) or (params['job_id'] is None): raise ValueError( - "Missing the required parameter `slot_type` when calling `" + operation_name + "`") + "Missing the required parameter `job_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/api/custom/interactionModel/slotTypes' + resource_path = '/v1/skills/api/custom/interactionModel/jobs/{jobId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict + if 'job_id' in params: + path_params['jobId'] = params['job_id'] query_params = [] # type: List header_params = [] # type: List body_params = None - if 'slot_type' in params: - body_params = params['slot_type'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -3894,15 +3947,17 @@ def create_interaction_model_slot_type_v1(self, slot_type, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_response.SlotTypeResponse", status_code=200, message="Returns the generated slotTypeId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error e.g. the slot type definition is invalid.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No content, confirms the resource is updated.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.jobs.validation_errors.ValidationErrors", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="POST", + method="DELETE", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -3910,40 +3965,49 @@ def create_interaction_model_slot_type_v1(self, slot_type, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_response.SlotTypeResponse") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def delete_interaction_model_slot_type_v1(self, slot_type_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + def cancel_next_job_execution_for_interaction_model_v1(self, job_id, execution_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ValidationErrors_d42055a1] """ - Delete the slot type. + Cancel the next execution for the given job. - :param slot_type_id: (required) The identifier for a slot type. - :type slot_type_id: str + :param job_id: (required) The identifier for dynamic jobs. + :type job_id: str + :param execution_id: (required) The identifier for dynamic job executions. Currently only allowed for scheduled executions. + :type execution_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ValidationErrors_d42055a1] """ - operation_name = "delete_interaction_model_slot_type_v1" + operation_name = "cancel_next_job_execution_for_interaction_model_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val del params['kwargs'] - # verify the required parameter 'slot_type_id' is set - if ('slot_type_id' not in params) or (params['slot_type_id'] is None): + # verify the required parameter 'job_id' is set + if ('job_id' not in params) or (params['job_id'] is None): raise ValueError( - "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") + "Missing the required parameter `job_id` when calling `" + operation_name + "`") + # verify the required parameter 'execution_id' is set + if ('execution_id' not in params) or (params['execution_id'] is None): + raise ValueError( + "Missing the required parameter `execution_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}' + resource_path = '/v1/skills/api/custom/interactionModel/jobs/{jobId}/executions/{executionId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict - if 'slot_type_id' in params: - path_params['slotTypeId'] = params['slot_type_id'] + if 'job_id' in params: + path_params['jobId'] = params['job_id'] + if 'execution_id' in params: + path_params['executionId'] = params['execution_id'] query_params = [] # type: List @@ -3964,11 +4028,11 @@ def delete_interaction_model_slot_type_v1(self, slot_type_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No content; just confirm the slot type is deleted.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="The slot type cannot be deleted from reasons due to in-use by other entities.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No Content; Confirms that the next execution is canceled.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.jobs.validation_errors.ValidationErrors", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="There is no slot type defined for the slotTypeId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) @@ -3987,37 +4051,50 @@ def delete_interaction_model_slot_type_v1(self, slot_type_id, **kwargs): if full_response: return api_response + return None - def get_interaction_model_slot_type_definition_v1(self, slot_type_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, SlotTypeDefinitionOutputV1, BadRequestErrorV1] + def list_job_executions_for_interaction_model_v1(self, job_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, GetExecutionsResponse_1b1a1680, BadRequestError_f854b05] """ - Get the slot type definition. + List the execution history associated with the job definition, with default sortField to be the executions' timestamp. - :param slot_type_id: (required) The identifier for a slot type. - :type slot_type_id: str + :param job_id: (required) The identifier for dynamic jobs. + :type job_id: str + :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. + :type max_results: int + :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. + :type next_token: str + :param sort_direction: Sets the sorting direction of the result items. When set to 'asc' these items are returned in ascending order of sortField value and when set to 'desc' these items are returned in descending order of sortField value. + :type sort_direction: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, SlotTypeDefinitionOutputV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, GetExecutionsResponse_1b1a1680, BadRequestError_f854b05] """ - operation_name = "get_interaction_model_slot_type_definition_v1" + operation_name = "list_job_executions_for_interaction_model_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val del params['kwargs'] - # verify the required parameter 'slot_type_id' is set - if ('slot_type_id' not in params) or (params['slot_type_id'] is None): + # verify the required parameter 'job_id' is set + if ('job_id' not in params) or (params['job_id'] is None): raise ValueError( - "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") + "Missing the required parameter `job_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}' + resource_path = '/v1/skills/api/custom/interactionModel/jobs/{jobId}/executions' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict - if 'slot_type_id' in params: - path_params['slotTypeId'] = params['slot_type_id'] + if 'job_id' in params: + path_params['jobId'] = params['job_id'] query_params = [] # type: List + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) + if 'sort_direction' in params: + query_params.append(('sortDirection', params['sort_direction'])) header_params = [] # type: List @@ -4036,11 +4113,10 @@ def get_interaction_model_slot_type_definition_v1(self, slot_type_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_definition_output.SlotTypeDefinitionOutput", status_code=200, message="The slot type definition.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="The slot type cannot be retrieved due to errors listed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.jobs.get_executions_response.GetExecutionsResponse", status_code=200, message="Retrun list of executions associated with the job definition.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="There is no slot type defined for the slotTypeId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) @@ -4054,54 +4130,47 @@ def get_interaction_model_slot_type_definition_v1(self, slot_type_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_definition_output.SlotTypeDefinitionOutput") + response_type="ask_smapi_model.v1.skill.interaction_model.jobs.get_executions_response.GetExecutionsResponse") if full_response: return api_response return api_response.body + - def update_interaction_model_slot_type_v1(self, slot_type_id, update_request, **kwargs): - # type: (str, UpdateRequestV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + def get_job_definition_for_interaction_model_v1(self, job_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, JobDefinition_ee5db797, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Update description and vendorGuidance string for certain version of a slot type. + Get the job definition for a given jobId. - :param slot_type_id: (required) The identifier for a slot type. - :type slot_type_id: str - :param update_request: (required) - :type update_request: ask_smapi_model.v1.skill.interaction_model.model_type.update_request.UpdateRequest + :param job_id: (required) The identifier for dynamic jobs. + :type job_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, JobDefinition_ee5db797, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "update_interaction_model_slot_type_v1" + operation_name = "get_job_definition_for_interaction_model_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val del params['kwargs'] - # verify the required parameter 'slot_type_id' is set - if ('slot_type_id' not in params) or (params['slot_type_id'] is None): - raise ValueError( - "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") - # verify the required parameter 'update_request' is set - if ('update_request' not in params) or (params['update_request'] is None): + # verify the required parameter 'job_id' is set + if ('job_id' not in params) or (params['job_id'] is None): raise ValueError( - "Missing the required parameter `update_request` when calling `" + operation_name + "`") + "Missing the required parameter `job_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}/update' + resource_path = '/v1/skills/api/custom/interactionModel/jobs/{jobId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict - if 'slot_type_id' in params: - path_params['slotTypeId'] = params['slot_type_id'] + if 'job_id' in params: + path_params['jobId'] = params['job_id'] query_params = [] # type: List header_params = [] # type: List body_params = None - if 'update_request' in params: - body_params = params['update_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -4116,17 +4185,16 @@ def update_interaction_model_slot_type_v1(self, slot_type_id, update_request, ** header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No content, indicates the fields were successfully updated.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.jobs.job_definition.JobDefinition", status_code=200, message="The job definition for a given jobId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="There is no slot type defined for the slotTypeId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="POST", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -4134,54 +4202,55 @@ def update_interaction_model_slot_type_v1(self, slot_type_id, update_request, ** header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.skill.interaction_model.jobs.job_definition.JobDefinition") if full_response: return api_response + return api_response.body - def get_interaction_model_slot_type_build_status_v1(self, slot_type_id, update_request_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, SlotTypeStatusV1, BadRequestErrorV1] + def set_job_status_for_interaction_model_v1(self, job_id, update_job_status_request, **kwargs): + # type: (str, UpdateJobStatusRequest_f2d8379d, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ValidationErrors_d42055a1] """ - Get the status of slot type resource and its sub-resources for a given slotTypeId. + Update the JobStatus to Enable or Disable a job. - :param slot_type_id: (required) The identifier for a slot type. - :type slot_type_id: str - :param update_request_id: (required) The identifier for slotType version creation process - :type update_request_id: str + :param job_id: (required) The identifier for dynamic jobs. + :type job_id: str + :param update_job_status_request: (required) Request to update Job Definition status. + :type update_job_status_request: ask_smapi_model.v1.skill.interaction_model.jobs.update_job_status_request.UpdateJobStatusRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, SlotTypeStatusV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ValidationErrors_d42055a1] """ - operation_name = "get_interaction_model_slot_type_build_status_v1" + operation_name = "set_job_status_for_interaction_model_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val del params['kwargs'] - # verify the required parameter 'slot_type_id' is set - if ('slot_type_id' not in params) or (params['slot_type_id'] is None): + # verify the required parameter 'job_id' is set + if ('job_id' not in params) or (params['job_id'] is None): raise ValueError( - "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") - # verify the required parameter 'update_request_id' is set - if ('update_request_id' not in params) or (params['update_request_id'] is None): + "Missing the required parameter `job_id` when calling `" + operation_name + "`") + # verify the required parameter 'update_job_status_request' is set + if ('update_job_status_request' not in params) or (params['update_job_status_request'] is None): raise ValueError( - "Missing the required parameter `update_request_id` when calling `" + operation_name + "`") + "Missing the required parameter `update_job_status_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}/updateRequest/{updateRequestId}' + resource_path = '/v1/skills/api/custom/interactionModel/jobs/{jobId}/status' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict - if 'slot_type_id' in params: - path_params['slotTypeId'] = params['slot_type_id'] - if 'update_request_id' in params: - path_params['updateRequestId'] = params['update_request_id'] + if 'job_id' in params: + path_params['jobId'] = params['job_id'] query_params = [] # type: List header_params = [] # type: List body_params = None + if 'update_job_status_request' in params: + body_params = params['update_job_status_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -4196,17 +4265,17 @@ def get_interaction_model_slot_type_build_status_v1(self, slot_type_id, update_r header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_status.SlotTypeStatus", status_code=200, message="Returns the build status and error codes for the given slotTypeId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No content; Confirms that the fields are updated.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.jobs.validation_errors.ValidationErrors", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="There is no slot type defined for the slotTypeId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="GET", + method="PUT", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -4214,58 +4283,47 @@ def get_interaction_model_slot_type_build_status_v1(self, slot_type_id, update_r header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_status.SlotTypeStatus") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def list_interaction_model_slot_type_versions_v1(self, slot_type_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ListSlotTypeVersionResponseV1, StandardizedErrorV1, BadRequestErrorV1] + def create_job_definition_for_interaction_model_v1(self, create_job_definition_request, **kwargs): + # type: (CreateJobDefinitionRequest_e3d4c41, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CreateJobDefinitionResponse_efaa9a6f, ValidationErrors_d42055a1] """ - List all slot type versions for the slot type id. + Creates a new Job Definition from the Job Definition request provided. This can be either a CatalogAutoRefresh, which supports time-based configurations for catalogs, or a ReferencedResourceVersionUpdate, which is used for slotTypes and Interaction models to be automatically updated on the dynamic update of their referenced catalog. - :param slot_type_id: (required) The identifier for a slot type. - :type slot_type_id: str - :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float - :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. - :type next_token: str - :param sort_direction: Sets the sorting direction of the result items. When set to 'asc' these items are returned in ascending order of sortField value and when set to 'desc' these items are returned in descending order of sortField value. - :type sort_direction: str + :param create_job_definition_request: (required) Request to create a new Job Definition. + :type create_job_definition_request: ask_smapi_model.v1.skill.interaction_model.jobs.create_job_definition_request.CreateJobDefinitionRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ListSlotTypeVersionResponseV1, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CreateJobDefinitionResponse_efaa9a6f, ValidationErrors_d42055a1] """ - operation_name = "list_interaction_model_slot_type_versions_v1" + operation_name = "create_job_definition_for_interaction_model_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val del params['kwargs'] - # verify the required parameter 'slot_type_id' is set - if ('slot_type_id' not in params) or (params['slot_type_id'] is None): + # verify the required parameter 'create_job_definition_request' is set + if ('create_job_definition_request' not in params) or (params['create_job_definition_request'] is None): raise ValueError( - "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") + "Missing the required parameter `create_job_definition_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}/versions' + resource_path = '/v1/skills/api/custom/interactionModel/jobs' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict - if 'slot_type_id' in params: - path_params['slotTypeId'] = params['slot_type_id'] query_params = [] # type: List - if 'max_results' in params: - query_params.append(('maxResults', params['max_results'])) - if 'next_token' in params: - query_params.append(('nextToken', params['next_token'])) - if 'sort_direction' in params: - query_params.append(('sortDirection', params['sort_direction'])) header_params = [] # type: List body_params = None + if 'create_job_definition_request' in params: + body_params = params['create_job_definition_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -4280,8 +4338,8 @@ def list_interaction_model_slot_type_versions_v1(self, slot_type_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.type_version.list_slot_type_version_response.ListSlotTypeVersionResponse", status_code=200, message="Returns list of slot type version for the slot type id.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.jobs.create_job_definition_response.CreateJobDefinitionResponse", status_code=201, message="Returns the generated jobId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.jobs.validation_errors.ValidationErrors", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) @@ -4289,7 +4347,7 @@ def list_interaction_model_slot_type_versions_v1(self, slot_type_id, **kwargs): error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="GET", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -4297,54 +4355,59 @@ def list_interaction_model_slot_type_versions_v1(self, slot_type_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.interaction_model.type_version.list_slot_type_version_response.ListSlotTypeVersionResponse") + response_type="ask_smapi_model.v1.skill.interaction_model.jobs.create_job_definition_response.CreateJobDefinitionResponse") if full_response: return api_response return api_response.body + - def create_interaction_model_slot_type_version_v1(self, slot_type_id, slot_type, **kwargs): - # type: (str, VersionDataV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + def list_interaction_model_slot_types_v1(self, vendor_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, ListSlotTypeResponse_b426c805, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Create a new version of slot type entity for the given slotTypeId. + List all slot types for the vendor. - :param slot_type_id: (required) The identifier for a slot type. - :type slot_type_id: str - :param slot_type: (required) - :type slot_type: ask_smapi_model.v1.skill.interaction_model.type_version.version_data.VersionData + :param vendor_id: (required) The vendor ID. + :type vendor_id: str + :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. + :type max_results: int + :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. + :type next_token: str + :param sort_direction: Sets the sorting direction of the result items. When set to 'asc' these items are returned in ascending order of sortField value and when set to 'desc' these items are returned in descending order of sortField value. + :type sort_direction: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, ListSlotTypeResponse_b426c805, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "create_interaction_model_slot_type_version_v1" + operation_name = "list_interaction_model_slot_types_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val del params['kwargs'] - # verify the required parameter 'slot_type_id' is set - if ('slot_type_id' not in params) or (params['slot_type_id'] is None): - raise ValueError( - "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") - # verify the required parameter 'slot_type' is set - if ('slot_type' not in params) or (params['slot_type'] is None): + # verify the required parameter 'vendor_id' is set + if ('vendor_id' not in params) or (params['vendor_id'] is None): raise ValueError( - "Missing the required parameter `slot_type` when calling `" + operation_name + "`") + "Missing the required parameter `vendor_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}/versions' + resource_path = '/v1/skills/api/custom/interactionModel/slotTypes' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict - if 'slot_type_id' in params: - path_params['slotTypeId'] = params['slot_type_id'] query_params = [] # type: List + if 'vendor_id' in params: + query_params.append(('vendorId', params['vendor_id'])) + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) + if 'sort_direction' in params: + query_params.append(('sortDirection', params['sort_direction'])) header_params = [] # type: List body_params = None - if 'slot_type' in params: - body_params = params['slot_type'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -4359,17 +4422,16 @@ def create_interaction_model_slot_type_version_v1(self, slot_type_id, slot_type, header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=202, message="Returns update status location link on success.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error e.g. the slot type definition is invalid.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.model_type.list_slot_type_response.ListSlotTypeResponse", status_code=200, message="Returns list of slot types for the vendor.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The specified slot type does not exist.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="POST", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -4377,14 +4439,559 @@ def create_interaction_model_slot_type_version_v1(self, slot_type_id, slot_type, header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.skill.interaction_model.model_type.list_slot_type_response.ListSlotTypeResponse") if full_response: return api_response + return api_response.body - def delete_interaction_model_slot_type_version_v1(self, slot_type_id, version, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + def create_interaction_model_slot_type_v1(self, slot_type, **kwargs): + # type: (DefinitionData_dad4effb, **Any) -> Union[ApiResponse, object, SlotTypeResponse_1ca513dc, StandardizedError_f5106a89, BadRequestError_f854b05] + """ + Create a new version of slot type within the given slotTypeId. + + :param slot_type: (required) + :type slot_type: ask_smapi_model.v1.skill.interaction_model.model_type.definition_data.DefinitionData + :param full_response: Boolean value to check if response should contain headers and status code information. + This value had to be passed through keyword arguments, by default the parameter value is set to False. + :type full_response: boolean + :rtype: Union[ApiResponse, object, SlotTypeResponse_1ca513dc, StandardizedError_f5106a89, BadRequestError_f854b05] + """ + operation_name = "create_interaction_model_slot_type_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'slot_type' is set + if ('slot_type' not in params) or (params['slot_type'] is None): + raise ValueError( + "Missing the required parameter `slot_type` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/api/custom/interactionModel/slotTypes' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'slot_type' in params: + body_params = params['slot_type'] + header_params.append(('Content-type', 'application/json')) + header_params.append(('User-Agent', self.user_agent)) + + # Response Type + full_response = False + if 'full_response' in params: + full_response = params['full_response'] + + # Authentication setting + access_token = self._lwa_service_client.get_access_token_from_refresh_token() + authorization_value = "Bearer " + access_token + header_params.append(('Authorization', authorization_value)) + + error_definitions = [] # type: List + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_response.SlotTypeResponse", status_code=200, message="Returns the generated slotTypeId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error e.g. the slot type definition is invalid.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + + api_response = self.invoke( + method="POST", + endpoint=self._api_endpoint, + path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + response_definitions=error_definitions, + response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_response.SlotTypeResponse") + + if full_response: + return api_response + return api_response.body + + + def delete_interaction_model_slot_type_v1(self, slot_type_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] + """ + Delete the slot type. + + :param slot_type_id: (required) The identifier for a slot type. + :type slot_type_id: str + :param full_response: Boolean value to check if response should contain headers and status code information. + This value had to be passed through keyword arguments, by default the parameter value is set to False. + :type full_response: boolean + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] + """ + operation_name = "delete_interaction_model_slot_type_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'slot_type_id' is set + if ('slot_type_id' not in params) or (params['slot_type_id'] is None): + raise ValueError( + "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'slot_type_id' in params: + path_params['slotTypeId'] = params['slot_type_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + header_params.append(('User-Agent', self.user_agent)) + + # Response Type + full_response = False + if 'full_response' in params: + full_response = params['full_response'] + + # Authentication setting + access_token = self._lwa_service_client.get_access_token_from_refresh_token() + authorization_value = "Bearer " + access_token + header_params.append(('Authorization', authorization_value)) + + error_definitions = [] # type: List + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No content; just confirm the slot type is deleted.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="The slot type cannot be deleted from reasons due to in-use by other entities.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="There is no slot type defined for the slotTypeId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + + api_response = self.invoke( + method="DELETE", + endpoint=self._api_endpoint, + path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + response_definitions=error_definitions, + response_type=None) + + if full_response: + return api_response + + return None + + def get_interaction_model_slot_type_definition_v1(self, slot_type_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, SlotTypeDefinitionOutput_20e87f7, BadRequestError_f854b05] + """ + Get the slot type definition. + + :param slot_type_id: (required) The identifier for a slot type. + :type slot_type_id: str + :param full_response: Boolean value to check if response should contain headers and status code information. + This value had to be passed through keyword arguments, by default the parameter value is set to False. + :type full_response: boolean + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, SlotTypeDefinitionOutput_20e87f7, BadRequestError_f854b05] + """ + operation_name = "get_interaction_model_slot_type_definition_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'slot_type_id' is set + if ('slot_type_id' not in params) or (params['slot_type_id'] is None): + raise ValueError( + "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'slot_type_id' in params: + path_params['slotTypeId'] = params['slot_type_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + header_params.append(('User-Agent', self.user_agent)) + + # Response Type + full_response = False + if 'full_response' in params: + full_response = params['full_response'] + + # Authentication setting + access_token = self._lwa_service_client.get_access_token_from_refresh_token() + authorization_value = "Bearer " + access_token + header_params.append(('Authorization', authorization_value)) + + error_definitions = [] # type: List + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_definition_output.SlotTypeDefinitionOutput", status_code=200, message="The slot type definition.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="The slot type cannot be retrieved due to errors listed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="There is no slot type defined for the slotTypeId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + + api_response = self.invoke( + method="GET", + endpoint=self._api_endpoint, + path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + response_definitions=error_definitions, + response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_definition_output.SlotTypeDefinitionOutput") + + if full_response: + return api_response + return api_response.body + + + def update_interaction_model_slot_type_v1(self, slot_type_id, update_request, **kwargs): + # type: (str, UpdateRequest_43de537, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] + """ + Update description and vendorGuidance string for certain version of a slot type. + + :param slot_type_id: (required) The identifier for a slot type. + :type slot_type_id: str + :param update_request: (required) + :type update_request: ask_smapi_model.v1.skill.interaction_model.model_type.update_request.UpdateRequest + :param full_response: Boolean value to check if response should contain headers and status code information. + This value had to be passed through keyword arguments, by default the parameter value is set to False. + :type full_response: boolean + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] + """ + operation_name = "update_interaction_model_slot_type_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'slot_type_id' is set + if ('slot_type_id' not in params) or (params['slot_type_id'] is None): + raise ValueError( + "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") + # verify the required parameter 'update_request' is set + if ('update_request' not in params) or (params['update_request'] is None): + raise ValueError( + "Missing the required parameter `update_request` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}/update' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'slot_type_id' in params: + path_params['slotTypeId'] = params['slot_type_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'update_request' in params: + body_params = params['update_request'] + header_params.append(('Content-type', 'application/json')) + header_params.append(('User-Agent', self.user_agent)) + + # Response Type + full_response = False + if 'full_response' in params: + full_response = params['full_response'] + + # Authentication setting + access_token = self._lwa_service_client.get_access_token_from_refresh_token() + authorization_value = "Bearer " + access_token + header_params.append(('Authorization', authorization_value)) + + error_definitions = [] # type: List + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No content, indicates the fields were successfully updated.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="There is no slot type defined for the slotTypeId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + + api_response = self.invoke( + method="POST", + endpoint=self._api_endpoint, + path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + response_definitions=error_definitions, + response_type=None) + + if full_response: + return api_response + + return None + + def get_interaction_model_slot_type_build_status_v1(self, slot_type_id, update_request_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, SlotTypeStatus_a293ebfc, StandardizedError_f5106a89, BadRequestError_f854b05] + """ + Get the status of slot type resource and its sub-resources for a given slotTypeId. + + :param slot_type_id: (required) The identifier for a slot type. + :type slot_type_id: str + :param update_request_id: (required) The identifier for slotType version creation process + :type update_request_id: str + :param full_response: Boolean value to check if response should contain headers and status code information. + This value had to be passed through keyword arguments, by default the parameter value is set to False. + :type full_response: boolean + :rtype: Union[ApiResponse, object, SlotTypeStatus_a293ebfc, StandardizedError_f5106a89, BadRequestError_f854b05] + """ + operation_name = "get_interaction_model_slot_type_build_status_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'slot_type_id' is set + if ('slot_type_id' not in params) or (params['slot_type_id'] is None): + raise ValueError( + "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") + # verify the required parameter 'update_request_id' is set + if ('update_request_id' not in params) or (params['update_request_id'] is None): + raise ValueError( + "Missing the required parameter `update_request_id` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}/updateRequest/{updateRequestId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'slot_type_id' in params: + path_params['slotTypeId'] = params['slot_type_id'] + if 'update_request_id' in params: + path_params['updateRequestId'] = params['update_request_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + header_params.append(('User-Agent', self.user_agent)) + + # Response Type + full_response = False + if 'full_response' in params: + full_response = params['full_response'] + + # Authentication setting + access_token = self._lwa_service_client.get_access_token_from_refresh_token() + authorization_value = "Bearer " + access_token + header_params.append(('Authorization', authorization_value)) + + error_definitions = [] # type: List + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_status.SlotTypeStatus", status_code=200, message="Returns the build status and error codes for the given slotTypeId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="There is no slot type defined for the slotTypeId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + + api_response = self.invoke( + method="GET", + endpoint=self._api_endpoint, + path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + response_definitions=error_definitions, + response_type="ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_status.SlotTypeStatus") + + if full_response: + return api_response + return api_response.body + + + def list_interaction_model_slot_type_versions_v1(self, slot_type_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, ListSlotTypeVersionResponse_7d552abf, BadRequestError_f854b05] + """ + List all slot type versions for the slot type id. + + :param slot_type_id: (required) The identifier for a slot type. + :type slot_type_id: str + :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. + :type max_results: int + :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. + :type next_token: str + :param sort_direction: Sets the sorting direction of the result items. When set to 'asc' these items are returned in ascending order of sortField value and when set to 'desc' these items are returned in descending order of sortField value. + :type sort_direction: str + :param full_response: Boolean value to check if response should contain headers and status code information. + This value had to be passed through keyword arguments, by default the parameter value is set to False. + :type full_response: boolean + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, ListSlotTypeVersionResponse_7d552abf, BadRequestError_f854b05] + """ + operation_name = "list_interaction_model_slot_type_versions_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'slot_type_id' is set + if ('slot_type_id' not in params) or (params['slot_type_id'] is None): + raise ValueError( + "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}/versions' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'slot_type_id' in params: + path_params['slotTypeId'] = params['slot_type_id'] + + query_params = [] # type: List + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) + if 'sort_direction' in params: + query_params.append(('sortDirection', params['sort_direction'])) + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + header_params.append(('User-Agent', self.user_agent)) + + # Response Type + full_response = False + if 'full_response' in params: + full_response = params['full_response'] + + # Authentication setting + access_token = self._lwa_service_client.get_access_token_from_refresh_token() + authorization_value = "Bearer " + access_token + header_params.append(('Authorization', authorization_value)) + + error_definitions = [] # type: List + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.type_version.list_slot_type_version_response.ListSlotTypeVersionResponse", status_code=200, message="Returns list of slot type version for the slot type id.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + + api_response = self.invoke( + method="GET", + endpoint=self._api_endpoint, + path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + response_definitions=error_definitions, + response_type="ask_smapi_model.v1.skill.interaction_model.type_version.list_slot_type_version_response.ListSlotTypeVersionResponse") + + if full_response: + return api_response + return api_response.body + + + def create_interaction_model_slot_type_version_v1(self, slot_type_id, slot_type, **kwargs): + # type: (str, VersionData_faa770c8, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] + """ + Create a new version of slot type entity for the given slotTypeId. + + :param slot_type_id: (required) The identifier for a slot type. + :type slot_type_id: str + :param slot_type: (required) + :type slot_type: ask_smapi_model.v1.skill.interaction_model.type_version.version_data.VersionData + :param full_response: Boolean value to check if response should contain headers and status code information. + This value had to be passed through keyword arguments, by default the parameter value is set to False. + :type full_response: boolean + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] + """ + operation_name = "create_interaction_model_slot_type_version_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'slot_type_id' is set + if ('slot_type_id' not in params) or (params['slot_type_id'] is None): + raise ValueError( + "Missing the required parameter `slot_type_id` when calling `" + operation_name + "`") + # verify the required parameter 'slot_type' is set + if ('slot_type' not in params) or (params['slot_type'] is None): + raise ValueError( + "Missing the required parameter `slot_type` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/api/custom/interactionModel/slotTypes/{slotTypeId}/versions' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'slot_type_id' in params: + path_params['slotTypeId'] = params['slot_type_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'slot_type' in params: + body_params = params['slot_type'] + header_params.append(('Content-type', 'application/json')) + header_params.append(('User-Agent', self.user_agent)) + + # Response Type + full_response = False + if 'full_response' in params: + full_response = params['full_response'] + + # Authentication setting + access_token = self._lwa_service_client.get_access_token_from_refresh_token() + authorization_value = "Bearer " + access_token + header_params.append(('Authorization', authorization_value)) + + error_definitions = [] # type: List + error_definitions.append(ServiceClientResponse(response_type=None, status_code=202, message="Returns update status location link on success.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error e.g. the slot type definition is invalid.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The specified slot type does not exist.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + + api_response = self.invoke( + method="POST", + endpoint=self._api_endpoint, + path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + response_definitions=error_definitions, + response_type=None) + + if full_response: + return api_response + + return None + + def delete_interaction_model_slot_type_version_v1(self, slot_type_id, version, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Delete slot type version. @@ -4395,7 +5002,7 @@ def delete_interaction_model_slot_type_version_v1(self, slot_type_id, version, * :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "delete_interaction_model_slot_type_version_v1" params = locals() @@ -4462,9 +5069,10 @@ def delete_interaction_model_slot_type_version_v1(self, slot_type_id, version, * if full_response: return api_response + return None def get_interaction_model_slot_type_version_v1(self, slot_type_id, version, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, SlotTypeVersionDataV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, SlotTypeVersionData_1f3ee474] """ Get slot type version data of given slot type version. @@ -4475,7 +5083,7 @@ def get_interaction_model_slot_type_version_v1(self, slot_type_id, version, **kw :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, SlotTypeVersionDataV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, SlotTypeVersionData_1f3ee474] """ operation_name = "get_interaction_model_slot_type_version_v1" params = locals() @@ -4542,9 +5150,10 @@ def get_interaction_model_slot_type_version_v1(self, slot_type_id, version, **kw if full_response: return api_response return api_response.body + def update_interaction_model_slot_type_version_v1(self, slot_type_id, version, slot_type_update, **kwargs): - # type: (str, str, SlotTypeUpdateV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, str, SlotTypeUpdate_ae01835f, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Update description and vendorGuidance string for certain version of a slot type. @@ -4557,7 +5166,7 @@ def update_interaction_model_slot_type_version_v1(self, slot_type_id, version, s :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "update_interaction_model_slot_type_version_v1" params = locals() @@ -4630,9 +5239,10 @@ def update_interaction_model_slot_type_version_v1(self, slot_type_id, version, s if full_response: return api_response + return None def get_status_of_export_request_v1(self, export_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ExportResponseV1, StandardizedErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, ExportResponse_b235e7bd, BadRequestError_f854b05] """ Get status for given exportId @@ -4641,7 +5251,7 @@ def get_status_of_export_request_v1(self, export_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ExportResponseV1, StandardizedErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, ExportResponse_b235e7bd, BadRequestError_f854b05] """ operation_name = "get_status_of_export_request_v1" params = locals() @@ -4680,6 +5290,7 @@ def get_status_of_export_request_v1(self, export_id, **kwargs): error_definitions = [] # type: List error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.export_response.ExportResponse", status_code=200, message="OK.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) @@ -4700,9 +5311,10 @@ def get_status_of_export_request_v1(self, export_id, **kwargs): if full_response: return api_response return api_response.body + def list_skills_for_vendor_v1(self, vendor_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, ListSkillResponseV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, ListSkillResponse_527462d0, StandardizedError_f5106a89, BadRequestError_f854b05] """ Get the list of skills for the vendor. @@ -4711,13 +5323,13 @@ def list_skills_for_vendor_v1(self, vendor_id, **kwargs): :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param skill_id: The list of skillIds that you wish to get the summary for. A maximum of 10 skillIds can be specified to get the skill summary in single listSkills call. Please note that this parameter must not be used with 'nextToken' or/and 'maxResults' parameter. :type skill_id: list[str] :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, ListSkillResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, ListSkillResponse_527462d0, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "list_skills_for_vendor_v1" params = locals() @@ -4782,9 +5394,10 @@ def list_skills_for_vendor_v1(self, vendor_id, **kwargs): if full_response: return api_response return api_response.body + def get_import_status_v1(self, import_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, ImportResponseV1] + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, ImportResponse_364fa39f] """ Get status for given importId. @@ -4793,7 +5406,7 @@ def get_import_status_v1(self, import_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, ImportResponseV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, ImportResponse_364fa39f] """ operation_name = "get_import_status_v1" params = locals() @@ -4852,9 +5465,10 @@ def get_import_status_v1(self, import_id, **kwargs): if full_response: return api_response return api_response.body + def create_skill_package_v1(self, create_skill_with_package_request, **kwargs): - # type: (CreateSkillWithPackageRequestV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (CreateSkillWithPackageRequest_cd7f22be, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Creates a new import for a skill. @@ -4863,7 +5477,7 @@ def create_skill_package_v1(self, create_skill_with_package_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "create_skill_package_v1" params = locals() @@ -4904,6 +5518,7 @@ def create_skill_package_v1(self, create_skill_with_package_request, **kwargs): error_definitions.append(ServiceClientResponse(response_type=None, status_code=202, message="Accepted.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=413, message="Payload too large.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) @@ -4923,9 +5538,10 @@ def create_skill_package_v1(self, create_skill_with_package_request, **kwargs): if full_response: return api_response + return None def create_skill_for_vendor_v1(self, create_skill_request, **kwargs): - # type: (CreateSkillRequestV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, CreateSkillResponseV1, BadRequestErrorV1] + # type: (CreateSkillRequest_92e74e84, **Any) -> Union[ApiResponse, object, CreateSkillResponse_2bad1094, StandardizedError_f5106a89, BadRequestError_f854b05] """ Creates a new skill for given vendorId. @@ -4934,7 +5550,7 @@ def create_skill_for_vendor_v1(self, create_skill_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, CreateSkillResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, CreateSkillResponse_2bad1094, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "create_skill_for_vendor_v1" params = locals() @@ -4994,9 +5610,94 @@ def create_skill_for_vendor_v1(self, create_skill_request, **kwargs): if full_response: return api_response return api_response.body + + + def get_resource_schema_v1(self, resource, vendor_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, GetResourceSchemaResponse_9df87651, BadRequestError_f854b05] + """ + GetResourceSchema API provides schema for skill related resources. The schema returned by this API will be specific to vendor because it considers public beta features allowed for the vendor. + + :param resource: (required) Name of the ASK resource for which schema is requested. + :type resource: str + :param vendor_id: (required) The vendor ID. + :type vendor_id: str + :param operation: This parameter is required when resource is manifest because skill manifest schema differs based on operation. For example, submit for certification schema has more validations than create skill schema. + :type operation: str + :param full_response: Boolean value to check if response should contain headers and status code information. + This value had to be passed through keyword arguments, by default the parameter value is set to False. + :type full_response: boolean + :rtype: Union[ApiResponse, object, Error_fbe913d9, GetResourceSchemaResponse_9df87651, BadRequestError_f854b05] + """ + operation_name = "get_resource_schema_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'resource' is set + if ('resource' not in params) or (params['resource'] is None): + raise ValueError( + "Missing the required parameter `resource` when calling `" + operation_name + "`") + # verify the required parameter 'vendor_id' is set + if ('vendor_id' not in params) or (params['vendor_id'] is None): + raise ValueError( + "Missing the required parameter `vendor_id` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/resourceSchema/{resource}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'resource' in params: + path_params['resource'] = params['resource'] + + query_params = [] # type: List + if 'vendor_id' in params: + query_params.append(('vendorId', params['vendor_id'])) + if 'operation' in params: + query_params.append(('operation', params['operation'])) + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + header_params.append(('User-Agent', self.user_agent)) + + # Response Type + full_response = False + if 'full_response' in params: + full_response = params['full_response'] + + # Authentication setting + access_token = self._lwa_service_client.get_access_token_from_refresh_token() + authorization_value = "Bearer " + access_token + header_params.append(('Authorization', authorization_value)) + + error_definitions = [] # type: List + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.resource_schema.get_resource_schema_response.GetResourceSchemaResponse", status_code=200, message="Returns a S3 presigned URL to location of schema")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Invalid request")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="Unauthorized")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=403, message="Forbidden")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Too Many Requests")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) + + api_response = self.invoke( + method="GET", + endpoint=self._api_endpoint, + path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + response_definitions=error_definitions, + response_type="ask_smapi_model.v1.skill.resource_schema.get_resource_schema_response.GetResourceSchemaResponse") + + if full_response: + return api_response + return api_response.body + def get_alexa_hosted_skill_metadata_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, HostedSkillMetadataV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, HostedSkillMetadata_b8976dfb, StandardizedError_f5106a89, BadRequestError_f854b05] """ Get Alexa hosted skill's metadata @@ -5005,7 +5706,7 @@ def get_alexa_hosted_skill_metadata_v1(self, skill_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, HostedSkillMetadataV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, HostedSkillMetadata_b8976dfb, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "get_alexa_hosted_skill_metadata_v1" params = locals() @@ -5065,9 +5766,10 @@ def get_alexa_hosted_skill_metadata_v1(self, skill_id, **kwargs): if full_response: return api_response return api_response.body + def generate_credentials_for_alexa_hosted_skill_v1(self, skill_id, hosted_skill_repository_credentials_request, **kwargs): - # type: (str, HostedSkillRepositoryCredentialsRequestV1, **Any) -> Union[ApiResponse, HostedSkillRepositoryCredentialsListV1, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, HostedSkillRepositoryCredentialsRequest_79a1c791, **Any) -> Union[ApiResponse, object, HostedSkillRepositoryCredentialsList_d39d5fdf, StandardizedError_f5106a89, BadRequestError_f854b05] """ Generates hosted skill repository credentials to access the hosted skill repository. @@ -5078,7 +5780,7 @@ def generate_credentials_for_alexa_hosted_skill_v1(self, skill_id, hosted_skill_ :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, HostedSkillRepositoryCredentialsListV1, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, HostedSkillRepositoryCredentialsList_d39d5fdf, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "generate_credentials_for_alexa_hosted_skill_v1" params = locals() @@ -5144,28 +5846,22 @@ def generate_credentials_for_alexa_hosted_skill_v1(self, skill_id, hosted_skill_ if full_response: return api_response return api_response.body + - def get_annotations_for_asr_annotation_set_v1(self, skill_id, annotation_set_id, accept, **kwargs): - # type: (str, str, str, **Any) -> Union[ApiResponse, GetAsrAnnotationSetAnnotationsResponseV1, ErrorV1, BadRequestErrorV1] + def end_beta_test_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - Download the annotation set contents. + End beta test. + End a beta test for a given Alexa skill. System will revoke the entitlement of each tester and send access-end notification email to them. :param skill_id: (required) The skill ID. :type skill_id: str - :param annotation_set_id: (required) Identifier of the ASR annotation set. - :type annotation_set_id: str - :param accept: (required) - `application/json`: indicate to download annotation set contents in JSON format - `text/csv`: indicate to download annotation set contents in CSV format - :type accept: str - :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. - :type next_token: str - :param max_results: Sets the maximum number of results returned in the response body. Defaults to 1000. If more results are present, the response will contain a paginationContext. - :type max_results: float :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, GetAsrAnnotationSetAnnotationsResponseV1, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - operation_name = "get_annotations_for_asr_annotation_set_v1" + operation_name = "end_beta_test_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -5174,33 +5870,17 @@ def get_annotations_for_asr_annotation_set_v1(self, skill_id, annotation_set_id, if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'annotation_set_id' is set - if ('annotation_set_id' not in params) or (params['annotation_set_id'] is None): - raise ValueError( - "Missing the required parameter `annotation_set_id` when calling `" + operation_name + "`") - # verify the required parameter 'accept' is set - if ('accept' not in params) or (params['accept'] is None): - raise ValueError( - "Missing the required parameter `accept` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrAnnotationSets/{annotationSetId}/annotations' + resource_path = '/v1/skills/{skillId}/betaTest/end' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'annotation_set_id' in params: - path_params['annotationSetId'] = params['annotation_set_id'] query_params = [] # type: List - if 'next_token' in params: - query_params.append(('nextToken', params['next_token'])) - if 'max_results' in params: - query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List - if 'accept' in params: - header_params.append(('Accept', params['accept'])) body_params = None header_params.append(('Content-type', 'application/json')) @@ -5217,17 +5897,16 @@ def get_annotations_for_asr_annotation_set_v1(self, skill_id, annotation_set_id, header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.asr.annotation_sets.get_asr_annotation_set_annotations_response.GetAsrAnnotationSetAnnotationsResponse", status_code=200, message="The annotation set contents payload in specified format. This API also supports pagination for annotation set contents requested in `application/json` content type. Paginaiton for requested content type `text/csv` is not supported. In this case, the nextToken and maxResults query parameters would be ignored even if they are specified as query parameters. ")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=202, message="Accept. Return a URL to track the resource in 'Location' header.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( - method="GET", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -5235,30 +5914,27 @@ def get_annotations_for_asr_annotation_set_v1(self, skill_id, annotation_set_id, header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.asr.annotation_sets.get_asr_annotation_set_annotations_response.GetAsrAnnotationSetAnnotationsResponse") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def set_annotations_for_asr_annotation_set_v1(self, skill_id, annotation_set_id, update_asr_annotation_set_contents_request, **kwargs): - # type: (str, str, UpdateAsrAnnotationSetContentsPayloadV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def get_beta_test_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BetaTest_e826b162, BadRequestError_f854b05] """ - Update the annotations in the annotation set - API that updates the annotaions in the annotation set + Get beta test. + Get beta test for a given Alexa skill. :param skill_id: (required) The skill ID. :type skill_id: str - :param annotation_set_id: (required) Identifier of the ASR annotation set. - :type annotation_set_id: str - :param update_asr_annotation_set_contents_request: (required) Payload containing annotation set contents. Two formats are accepted here: - `application/json`: Annotation set payload in JSON format. - `text/csv`: Annotation set payload in CSV format. Note that for CSV format, the first row should describe the column attributes. Columns should be delimited by comma. The subsequent rows should describe annotation data and each annotation attributes has to follow the strict ordering defined in the first row. Each annotation fields should be delimited by comma. - :type update_asr_annotation_set_contents_request: ask_smapi_model.v1.skill.asr.annotation_sets.update_asr_annotation_set_contents_payload.UpdateAsrAnnotationSetContentsPayload :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BetaTest_e826b162, BadRequestError_f854b05] """ - operation_name = "set_annotations_for_asr_annotation_set_v1" + operation_name = "get_beta_test_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -5267,31 +5943,19 @@ def set_annotations_for_asr_annotation_set_v1(self, skill_id, annotation_set_id, if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'annotation_set_id' is set - if ('annotation_set_id' not in params) or (params['annotation_set_id'] is None): - raise ValueError( - "Missing the required parameter `annotation_set_id` when calling `" + operation_name + "`") - # verify the required parameter 'update_asr_annotation_set_contents_request' is set - if ('update_asr_annotation_set_contents_request' not in params) or (params['update_asr_annotation_set_contents_request'] is None): - raise ValueError( - "Missing the required parameter `update_asr_annotation_set_contents_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrAnnotationSets/{annotationSetId}/annotations' + resource_path = '/v1/skills/{skillId}/betaTest' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'annotation_set_id' in params: - path_params['annotationSetId'] = params['annotation_set_id'] query_params = [] # type: List header_params = [] # type: List body_params = None - if 'update_asr_annotation_set_contents_request' in params: - body_params = params['update_asr_annotation_set_contents_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -5306,17 +5970,16 @@ def set_annotations_for_asr_annotation_set_v1(self, skill_id, annotation_set_id, header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="ASR annotation set contents have been updated successfully.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.beta_test.beta_test.BetaTest", status_code=200, message="Success.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="Thrown if user tries to request a new simulation while the old simulation is in progress.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( - method="PUT", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -5324,28 +5987,29 @@ def set_annotations_for_asr_annotation_set_v1(self, skill_id, annotation_set_id, header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.skill.beta_test.beta_test.BetaTest") if full_response: return api_response + return api_response.body - def delete_asr_annotation_set_v1(self, skill_id, annotation_set_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def create_beta_test_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - Delete the ASR annotation set - API which deletes the ASR annotation set. Developers cannot get/list the deleted annotation set. + Create beta test. + Create a beta test for a given Alexa skill. :param skill_id: (required) The skill ID. :type skill_id: str - :param annotation_set_id: (required) Identifier of the ASR annotation set. - :type annotation_set_id: str + :param create_test_body: JSON object containing the details of a beta test used to create the test. + :type create_test_body: ask_smapi_model.v1.skill.beta_test.test_body.TestBody :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - operation_name = "delete_asr_annotation_set_v1" + operation_name = "create_beta_test_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -5354,25 +6018,21 @@ def delete_asr_annotation_set_v1(self, skill_id, annotation_set_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'annotation_set_id' is set - if ('annotation_set_id' not in params) or (params['annotation_set_id'] is None): - raise ValueError( - "Missing the required parameter `annotation_set_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrAnnotationSets/{annotationSetId}' + resource_path = '/v1/skills/{skillId}/betaTest' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'annotation_set_id' in params: - path_params['annotationSetId'] = params['annotation_set_id'] query_params = [] # type: List header_params = [] # type: List body_params = None + if 'create_test_body' in params: + body_params = params['create_test_body'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -5387,18 +6047,16 @@ def delete_asr_annotation_set_v1(self, skill_id, annotation_set_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="ASR annotation set exists and is deleted successfully.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=201, message="Success. Return a URL to track the resource in 'Location' header.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( - method="DELETE", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -5411,23 +6069,24 @@ def delete_asr_annotation_set_v1(self, skill_id, annotation_set_id, **kwargs): if full_response: return api_response + return None - def get_asr_annotation_set_v1(self, skill_id, annotation_set_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, GetASRAnnotationSetsPropertiesResponseV1, ErrorV1, BadRequestErrorV1] + def update_beta_test_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - Get the metadata of an ASR annotation set - Return the metadata for an ASR annotation set. + Update beta test. + Update a beta test for a given Alexa skill. :param skill_id: (required) The skill ID. :type skill_id: str - :param annotation_set_id: (required) Identifier of the ASR annotation set. - :type annotation_set_id: str + :param create_test_body: JSON object containing the details of a beta test used to create the test. + :type create_test_body: ask_smapi_model.v1.skill.beta_test.test_body.TestBody :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, GetASRAnnotationSetsPropertiesResponseV1, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - operation_name = "get_asr_annotation_set_v1" + operation_name = "update_beta_test_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -5436,25 +6095,21 @@ def get_asr_annotation_set_v1(self, skill_id, annotation_set_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'annotation_set_id' is set - if ('annotation_set_id' not in params) or (params['annotation_set_id'] is None): - raise ValueError( - "Missing the required parameter `annotation_set_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrAnnotationSets/{annotationSetId}' + resource_path = '/v1/skills/{skillId}/betaTest' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'annotation_set_id' in params: - path_params['annotationSetId'] = params['annotation_set_id'] query_params = [] # type: List header_params = [] # type: List body_params = None + if 'create_test_body' in params: + body_params = params['create_test_body'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -5469,17 +6124,16 @@ def get_asr_annotation_set_v1(self, skill_id, annotation_set_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.asr.annotation_sets.get_asr_annotation_sets_properties_response.GetASRAnnotationSetsPropertiesResponse", status_code=200, message="The ASR annotation set exists.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="Thrown if user tries to request a new simulation while the old simulation is in progress.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( - method="GET", + method="PUT", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -5487,30 +6141,27 @@ def get_asr_annotation_set_v1(self, skill_id, annotation_set_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.asr.annotation_sets.get_asr_annotation_sets_properties_response.GetASRAnnotationSetsPropertiesResponse") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def set_asr_annotation_set_v1(self, skill_id, annotation_set_id, update_asr_annotation_set_properties_request_v1, **kwargs): - # type: (str, str, UpdateAsrAnnotationSetPropertiesRequestObjectV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def start_beta_test_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - update the ASR annotation set properties. - API which updates the ASR annotation set properties. Currently, the only data can be updated is annotation set name. + Start beta test + Start a beta test for a given Alexa skill. System will send invitation emails to each tester in the test, and add entitlement on the acceptance. :param skill_id: (required) The skill ID. :type skill_id: str - :param annotation_set_id: (required) Identifier of the ASR annotation set. - :type annotation_set_id: str - :param update_asr_annotation_set_properties_request_v1: (required) Payload sent to the update ASR annotation set properties API. - :type update_asr_annotation_set_properties_request_v1: ask_smapi_model.v1.skill.asr.annotation_sets.update_asr_annotation_set_properties_request_object.UpdateAsrAnnotationSetPropertiesRequestObject :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - operation_name = "set_asr_annotation_set_v1" + operation_name = "start_beta_test_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -5519,31 +6170,19 @@ def set_asr_annotation_set_v1(self, skill_id, annotation_set_id, update_asr_anno if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'annotation_set_id' is set - if ('annotation_set_id' not in params) or (params['annotation_set_id'] is None): - raise ValueError( - "Missing the required parameter `annotation_set_id` when calling `" + operation_name + "`") - # verify the required parameter 'update_asr_annotation_set_properties_request_v1' is set - if ('update_asr_annotation_set_properties_request_v1' not in params) or (params['update_asr_annotation_set_properties_request_v1'] is None): - raise ValueError( - "Missing the required parameter `update_asr_annotation_set_properties_request_v1` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrAnnotationSets/{annotationSetId}' + resource_path = '/v1/skills/{skillId}/betaTest/start' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'annotation_set_id' in params: - path_params['annotationSetId'] = params['annotation_set_id'] query_params = [] # type: List header_params = [] # type: List body_params = None - if 'update_asr_annotation_set_properties_request_v1' in params: - body_params = params['update_asr_annotation_set_properties_request_v1'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -5558,17 +6197,16 @@ def set_asr_annotation_set_v1(self, skill_id, annotation_set_id, update_asr_anno header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="ASR annotation set exists and properties are updated successfully.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=202, message="Accept. Return a URL to track the resource in 'Location' header.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( - method="PUT", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -5581,25 +6219,24 @@ def set_asr_annotation_set_v1(self, skill_id, annotation_set_id, update_asr_anno if full_response: return api_response + return None - def list_asr_annotation_sets_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV1, ListASRAnnotationSetsResponseV1, BadRequestErrorV1] + def add_testers_to_beta_test_v1(self, skill_id, testers_request, **kwargs): + # type: (str, TestersList_f8c0feda, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - List ASR annotation sets metadata for a given skill. - API which requests all the ASR annotation sets for a skill. Returns the annotation set id and properties for each ASR annotation set. Supports paging of results. + Add testers to an existing beta test. + Add testers to a beta test for the given Alexa skill. System will send invitation email to each tester and add entitlement on the acceptance. :param skill_id: (required) The skill ID. :type skill_id: str - :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. - :type next_token: str - :param max_results: Sets the maximum number of results returned in the response body. Defaults to 1000. If more results are present, the response will contain a paginationContext. - :type max_results: float + :param testers_request: (required) JSON object containing the email address of beta testers. + :type testers_request: ask_smapi_model.v1.skill.beta_test.testers.testers_list.TestersList :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, ListASRAnnotationSetsResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - operation_name = "list_asr_annotation_sets_v1" + operation_name = "add_testers_to_beta_test_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -5608,8 +6245,12 @@ def list_asr_annotation_sets_v1(self, skill_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") + # verify the required parameter 'testers_request' is set + if ('testers_request' not in params) or (params['testers_request'] is None): + raise ValueError( + "Missing the required parameter `testers_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrAnnotationSets' + resource_path = '/v1/skills/{skillId}/betaTest/testers/add' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -5617,14 +6258,12 @@ def list_asr_annotation_sets_v1(self, skill_id, **kwargs): path_params['skillId'] = params['skill_id'] query_params = [] # type: List - if 'next_token' in params: - query_params.append(('nextToken', params['next_token'])) - if 'max_results' in params: - query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List body_params = None + if 'testers_request' in params: + body_params = params['testers_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -5639,17 +6278,16 @@ def list_asr_annotation_sets_v1(self, skill_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.asr.annotation_sets.list_asr_annotation_sets_response.ListASRAnnotationSetsResponse", status_code=200, message="ASR annotation sets metadata are returned.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( - method="GET", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -5657,28 +6295,31 @@ def list_asr_annotation_sets_v1(self, skill_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.asr.annotation_sets.list_asr_annotation_sets_response.ListASRAnnotationSetsResponse") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def create_asr_annotation_set_v1(self, skill_id, create_asr_annotation_set_request, **kwargs): - # type: (str, CreateAsrAnnotationSetRequestObjectV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1, CreateAsrAnnotationSetResponseV1] + def get_list_of_testers_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ListTestersResponse_991ec8e9] """ - Create a new ASR annotation set for a skill - This is an API that creates a new ASR annotation set with a name and returns the annotationSetId which can later be used to retrieve or reference the annotation set + List testers. + List all testers in a beta test for the given Alexa skill. :param skill_id: (required) The skill ID. :type skill_id: str - :param create_asr_annotation_set_request: (required) Payload sent to the create ASR annotation set API. - :type create_asr_annotation_set_request: ask_smapi_model.v1.skill.asr.annotation_sets.create_asr_annotation_set_request_object.CreateAsrAnnotationSetRequestObject + :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. + :type next_token: str + :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 500 results, you can add this parameter to your request. The response might contain fewer results than maxResults, but it will never contain more. + :type max_results: int :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1, CreateAsrAnnotationSetResponseV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ListTestersResponse_991ec8e9] """ - operation_name = "create_asr_annotation_set_v1" + operation_name = "get_list_of_testers_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -5687,12 +6328,8 @@ def create_asr_annotation_set_v1(self, skill_id, create_asr_annotation_set_reque if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'create_asr_annotation_set_request' is set - if ('create_asr_annotation_set_request' not in params) or (params['create_asr_annotation_set_request'] is None): - raise ValueError( - "Missing the required parameter `create_asr_annotation_set_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrAnnotationSets' + resource_path = '/v1/skills/{skillId}/betaTest/testers' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -5700,12 +6337,14 @@ def create_asr_annotation_set_v1(self, skill_id, create_asr_annotation_set_reque path_params['skillId'] = params['skill_id'] query_params = [] # type: List + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List body_params = None - if 'create_asr_annotation_set_request' in params: - body_params = params['create_asr_annotation_set_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -5720,17 +6359,16 @@ def create_asr_annotation_set_v1(self, skill_id, create_asr_annotation_set_reque header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.asr.annotation_sets.create_asr_annotation_set_response.CreateAsrAnnotationSetResponse", status_code=200, message="ASR annotation set created successfully.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.beta_test.testers.list_testers_response.ListTestersResponse", status_code=200, message="Success.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad request.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( - method="POST", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -5738,28 +6376,29 @@ def create_asr_annotation_set_v1(self, skill_id, create_asr_annotation_set_reque header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.asr.annotation_sets.create_asr_annotation_set_response.CreateAsrAnnotationSetResponse") + response_type="ask_smapi_model.v1.skill.beta_test.testers.list_testers_response.ListTestersResponse") if full_response: return api_response return api_response.body + - def delete_asr_evaluation_v1(self, skill_id, evaluation_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def remove_testers_from_beta_test_v1(self, skill_id, testers_request, **kwargs): + # type: (str, TestersList_f8c0feda, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - Delete an evaluation. - API which enables the deletion of an evaluation. + Remove testers from an existing beta test. + Remove testers from a beta test for the given Alexa skill. System will send access end email to each tester and remove entitlement for them. :param skill_id: (required) The skill ID. :type skill_id: str - :param evaluation_id: (required) Identifier of the evaluation. - :type evaluation_id: str + :param testers_request: (required) JSON object containing the email address of beta testers. + :type testers_request: ask_smapi_model.v1.skill.beta_test.testers.testers_list.TestersList :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - operation_name = "delete_asr_evaluation_v1" + operation_name = "remove_testers_from_beta_test_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -5768,25 +6407,25 @@ def delete_asr_evaluation_v1(self, skill_id, evaluation_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'evaluation_id' is set - if ('evaluation_id' not in params) or (params['evaluation_id'] is None): + # verify the required parameter 'testers_request' is set + if ('testers_request' not in params) or (params['testers_request'] is None): raise ValueError( - "Missing the required parameter `evaluation_id` when calling `" + operation_name + "`") + "Missing the required parameter `testers_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrEvaluations/{evaluationId}' + resource_path = '/v1/skills/{skillId}/betaTest/testers/remove' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'evaluation_id' in params: - path_params['evaluationId'] = params['evaluation_id'] query_params = [] # type: List header_params = [] # type: List body_params = None + if 'testers_request' in params: + body_params = params['testers_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -5801,17 +6440,16 @@ def delete_asr_evaluation_v1(self, skill_id, evaluation_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="ASR evaluation exists and is deleted successfully.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( - method="DELETE", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -5824,29 +6462,24 @@ def delete_asr_evaluation_v1(self, skill_id, evaluation_id, **kwargs): if full_response: return api_response + return None - def list_asr_evaluations_results_v1(self, skill_id, evaluation_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, GetAsrEvaluationsResultsResponseV1, BadRequestErrorV1] + def request_feedback_from_testers_v1(self, skill_id, testers_request, **kwargs): + # type: (str, TestersList_f8c0feda, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - List results for a completed Evaluation. - Paginated API which returns the test case results of an evaluation. This should be considered the \"expensive\" operation while GetAsrEvaluationsStatus is \"cheap\". + Request feedback from testers. + Request feedback from the testers in a beta test for the given Alexa skill. System will send notification emails to testers to request feedback. :param skill_id: (required) The skill ID. :type skill_id: str - :param evaluation_id: (required) Identifier of the evaluation. - :type evaluation_id: str - :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. - :type next_token: str - :param max_results: Sets the maximum number of results returned in the response body. Defaults to 1000. If more results are present, the response will contain a nextToken. - :type max_results: float - :param status: query parameter used to filter evaluation result status. * `PASSED` - filter evaluation result status of `PASSED` * `FAILED` - filter evaluation result status of `FAILED` - :type status: str + :param testers_request: (required) JSON object containing the email address of beta testers. + :type testers_request: ask_smapi_model.v1.skill.beta_test.testers.testers_list.TestersList :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, GetAsrEvaluationsResultsResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - operation_name = "list_asr_evaluations_results_v1" + operation_name = "request_feedback_from_testers_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -5855,31 +6488,25 @@ def list_asr_evaluations_results_v1(self, skill_id, evaluation_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'evaluation_id' is set - if ('evaluation_id' not in params) or (params['evaluation_id'] is None): + # verify the required parameter 'testers_request' is set + if ('testers_request' not in params) or (params['testers_request'] is None): raise ValueError( - "Missing the required parameter `evaluation_id` when calling `" + operation_name + "`") + "Missing the required parameter `testers_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrEvaluations/{evaluationId}/results' + resource_path = '/v1/skills/{skillId}/betaTest/testers/requestFeedback' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'evaluation_id' in params: - path_params['evaluationId'] = params['evaluation_id'] query_params = [] # type: List - if 'next_token' in params: - query_params.append(('nextToken', params['next_token'])) - if 'max_results' in params: - query_params.append(('maxResults', params['max_results'])) - if 'status' in params: - query_params.append(('status', params['status'])) header_params = [] # type: List body_params = None + if 'testers_request' in params: + body_params = params['testers_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -5894,17 +6521,16 @@ def list_asr_evaluations_results_v1(self, skill_id, evaluation_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.asr.evaluations.get_asr_evaluations_results_response.GetAsrEvaluationsResultsResponse", status_code=200, message="Evaluation exists and its status is queryable.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( - method="GET", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -5912,28 +6538,29 @@ def list_asr_evaluations_results_v1(self, skill_id, evaluation_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.asr.evaluations.get_asr_evaluations_results_response.GetAsrEvaluationsResultsResponse") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def get_asr_evaluation_status_v1(self, skill_id, evaluation_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1, GetAsrEvaluationStatusResponseObjectV1] + def send_reminder_to_testers_v1(self, skill_id, testers_request, **kwargs): + # type: (str, TestersList_f8c0feda, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - Get high level information and status of a asr evaluation. - API which requests high level information about the evaluation like the current state of the job, status of the evaluation (if complete). Also returns the request used to start the job, like the number of total evaluations, number of completed evaluations, and start time. This should be considered the \"cheap\" operation while GetAsrEvaluationsResults is \"expensive\". + Send reminder to testers in a beta test. + Send reminder to the testers in a beta test for the given Alexa skill. System will send invitation email to each tester and add entitlement on the acceptance. :param skill_id: (required) The skill ID. :type skill_id: str - :param evaluation_id: (required) Identifier of the evaluation. - :type evaluation_id: str + :param testers_request: (required) JSON object containing the email address of beta testers. + :type testers_request: ask_smapi_model.v1.skill.beta_test.testers.testers_list.TestersList :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1, GetAsrEvaluationStatusResponseObjectV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ - operation_name = "get_asr_evaluation_status_v1" + operation_name = "send_reminder_to_testers_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -5942,25 +6569,25 @@ def get_asr_evaluation_status_v1(self, skill_id, evaluation_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'evaluation_id' is set - if ('evaluation_id' not in params) or (params['evaluation_id'] is None): + # verify the required parameter 'testers_request' is set + if ('testers_request' not in params) or (params['testers_request'] is None): raise ValueError( - "Missing the required parameter `evaluation_id` when calling `" + operation_name + "`") + "Missing the required parameter `testers_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrEvaluations/{evaluationId}/status' + resource_path = '/v1/skills/{skillId}/betaTest/testers/sendReminder' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'evaluation_id' in params: - path_params['evaluationId'] = params['evaluation_id'] query_params = [] # type: List header_params = [] # type: List body_params = None + if 'testers_request' in params: + body_params = params['testers_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -5975,17 +6602,16 @@ def get_asr_evaluation_status_v1(self, skill_id, evaluation_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.asr.evaluations.get_asr_evaluation_status_response_object.GetAsrEvaluationStatusResponseObject", status_code=200, message="Evaluation exists and its status is queryable.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( - method="GET", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -5993,36 +6619,30 @@ def get_asr_evaluation_status_v1(self, skill_id, evaluation_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.asr.evaluations.get_asr_evaluation_status_response_object.GetAsrEvaluationStatusResponseObject") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def list_asr_evaluations_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV1, ListAsrEvaluationsResponseV1, BadRequestErrorV1] + def get_certification_review_v1(self, skill_id, certification_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, CertificationResponse_97fdaad, BadRequestError_f854b05] """ - List asr evaluations run for a skill. - API that allows developers to get historical ASR evaluations they run before. + Gets a specific certification resource. The response contains the review tracking information for a skill to show how much time the skill is expected to remain under review by Amazon. Once the review is complete, the response also contains the outcome of the review. Old certifications may not be available, however any ongoing certification would always give a response. If the certification is unavailable the result will return a 404 HTTP status code. :param skill_id: (required) The skill ID. :type skill_id: str - :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. - :type next_token: str - :param locale: locale in bcp 47 format. Used to filter results with the specified locale. If omitted, the response would include all evaluations regardless of what locale was used in the evaluation - :type locale: str - :param stage: Query parameter used to filter evaluations with specified skill stage. * `development` - skill in `development` stage * `live` - skill in `live` stage - :type stage: str - :param annotation_set_id: filter to evaluations started using this annotationSetId - :type annotation_set_id: str - :param max_results: Sets the maximum number of results returned in the response body. Defaults to 1000. If more results are present, the response will contain a nextToken. - :type max_results: float + :param certification_id: (required) Id of the certification. Reserved word identifier of mostRecent can be used to get the most recent certification for the skill. Note that the behavior of the API in this case would be the same as when the actual certification id of the most recent certification is used in the request. + :type certification_id: str + :param accept_language: User's locale/language in context. + :type accept_language: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, ListAsrEvaluationsResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, CertificationResponse_97fdaad, BadRequestError_f854b05] """ - operation_name = "list_asr_evaluations_v1" + operation_name = "get_certification_review_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6031,27 +6651,25 @@ def list_asr_evaluations_v1(self, skill_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") + # verify the required parameter 'certification_id' is set + if ('certification_id' not in params) or (params['certification_id'] is None): + raise ValueError( + "Missing the required parameter `certification_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrEvaluations' + resource_path = '/v1/skills/{skillId}/certifications/{certificationId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] + if 'certification_id' in params: + path_params['certificationId'] = params['certification_id'] query_params = [] # type: List - if 'next_token' in params: - query_params.append(('nextToken', params['next_token'])) - if 'locale' in params: - query_params.append(('locale', params['locale'])) - if 'stage' in params: - query_params.append(('stage', params['stage'])) - if 'annotation_set_id' in params: - query_params.append(('annotationSetId', params['annotation_set_id'])) - if 'max_results' in params: - query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List + if 'accept_language' in params: + header_params.append(('Accept-Language', params['accept_language'])) body_params = None header_params.append(('Content-type', 'application/json')) @@ -6068,14 +6686,12 @@ def list_asr_evaluations_v1(self, skill_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.asr.evaluations.list_asr_evaluations_response.ListAsrEvaluationsResponse", status_code=200, message="Evaluations are returned.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.certification.certification_response.CertificationResponse", status_code=200, message="Successfully retrieved skill certification information.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error e.g. if any request parameter is invalid like certification Id or pagination token etc. If the maxResults is not in the range of 1 to 50, it also qualifies for this error. ")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeded the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( method="GET", @@ -6086,42 +6702,40 @@ def list_asr_evaluations_v1(self, skill_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.asr.evaluations.list_asr_evaluations_response.ListAsrEvaluationsResponse") + response_type="ask_smapi_model.v1.skill.certification.certification_response.CertificationResponse") if full_response: return api_response return api_response.body + - def create_asr_evaluation_v1(self, post_asr_evaluations_request, skill_id, **kwargs): - # type: (PostAsrEvaluationsRequestObjectV1, str, **Any) -> Union[ApiResponse, ErrorV1, PostAsrEvaluationsResponseObjectV1, BadRequestErrorV1] + def get_certifications_list_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ListCertificationsResponse_f2a417c6] """ - Start an evaluation against the ASR model built by the skill's interaction model. - This is an asynchronous API that starts an evaluation against the ASR model built by the skill's interaction model. The operation outputs an evaluationId which allows the retrieval of the current status of the operation and the results upon completion. This operation is unified, meaning both internal and external skill developers may use it to evaluate ASR models. + Get list of all certifications available for a skill, including information about past certifications and any ongoing certification. The default sort order is descending on skillSubmissionTimestamp for Certifications. - :param post_asr_evaluations_request: (required) Payload sent to trigger evaluation run. - :type post_asr_evaluations_request: ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object.PostAsrEvaluationsRequestObject :param skill_id: (required) The skill ID. :type skill_id: str + :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. + :type next_token: str + :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. + :type max_results: int :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, PostAsrEvaluationsResponseObjectV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ListCertificationsResponse_f2a417c6] """ - operation_name = "create_asr_evaluation_v1" + operation_name = "get_certifications_list_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val del params['kwargs'] - # verify the required parameter 'post_asr_evaluations_request' is set - if ('post_asr_evaluations_request' not in params) or (params['post_asr_evaluations_request'] is None): - raise ValueError( - "Missing the required parameter `post_asr_evaluations_request` when calling `" + operation_name + "`") # verify the required parameter 'skill_id' is set if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/asrEvaluations' + resource_path = '/v1/skills/{skillId}/certifications' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -6129,12 +6743,14 @@ def create_asr_evaluation_v1(self, post_asr_evaluations_request, skill_id, **kwa path_params['skillId'] = params['skill_id'] query_params = [] # type: List + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List body_params = None - if 'post_asr_evaluations_request' in params: - body_params = params['post_asr_evaluations_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -6149,18 +6765,15 @@ def create_asr_evaluation_v1(self, post_asr_evaluations_request, skill_id, **kwa header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_response_object.PostAsrEvaluationsResponseObject", status_code=200, message="Evaluation has successfully begun.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.certification.list_certifications_response.ListCertificationsResponse", status_code=200, message="Returns list of certifications for the skillId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error e.g. if any request parameter is invalid like certification Id or pagination token etc. If the maxResults is not in the range of 1 to 50, it also qualifies for this error. ")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=503, message="Service Unavailable.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeded the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) api_response = self.invoke( - method="POST", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -6168,26 +6781,26 @@ def create_asr_evaluation_v1(self, post_asr_evaluations_request, skill_id, **kwa header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_response_object.PostAsrEvaluationsResponseObject") + response_type="ask_smapi_model.v1.skill.certification.list_certifications_response.ListCertificationsResponse") if full_response: return api_response return api_response.body + - def end_beta_test_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def get_skill_credentials_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, SkillCredentials_a0f29ab1, StandardizedError_f5106a89] """ - End beta test. - End a beta test for a given Alexa skill. System will revoke the entitlement of each tester and send access-end notification email to them. + Get the client credentials for the skill. :param skill_id: (required) The skill ID. :type skill_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, SkillCredentials_a0f29ab1, StandardizedError_f5106a89] """ - operation_name = "end_beta_test_v1" + operation_name = "get_skill_credentials_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6197,7 +6810,7 @@ def end_beta_test_v1(self, skill_id, **kwargs): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/betaTest/end' + resource_path = '/v1/skills/{skillId}/credentials' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -6223,16 +6836,15 @@ def end_beta_test_v1(self, skill_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=202, message="Accept. Return a URL to track the resource in 'Location' header.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.skill_credentials.SkillCredentials", status_code=200, message="Response contains the skill credentials.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="POST", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -6240,26 +6852,26 @@ def end_beta_test_v1(self, skill_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.skill.skill_credentials.SkillCredentials") if full_response: return api_response + return api_response.body - def get_beta_test_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1, BetaTestV1] + def delete_skill_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Get beta test. - Get beta test for a given Alexa skill. + Delete the skill and model for given skillId. :param skill_id: (required) The skill ID. :type skill_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1, BetaTestV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "get_beta_test_v1" + operation_name = "delete_skill_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6269,7 +6881,7 @@ def get_beta_test_v1(self, skill_id, **kwargs): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/betaTest' + resource_path = '/v1/skills/{skillId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -6295,15 +6907,16 @@ def get_beta_test_v1(self, skill_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.beta_test.beta_test.BetaTest", status_code=200, message="Success.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="GET", + method="DELETE", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -6311,28 +6924,28 @@ def get_beta_test_v1(self, skill_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.beta_test.beta_test.BetaTest") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def create_beta_test_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def delete_experiment_v1(self, skill_id, experiment_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Create beta test. - Create a beta test for a given Alexa skill. + Deletes an existing experiment for a skill. :param skill_id: (required) The skill ID. :type skill_id: str - :param create_test_body: JSON object containing the details of a beta test used to create the test. - :type create_test_body: ask_smapi_model.v1.skill.beta_test.test_body.TestBody + :param experiment_id: (required) Identifies the experiment in a skill. + :type experiment_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "create_beta_test_v1" + operation_name = "delete_experiment_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6341,21 +6954,25 @@ def create_beta_test_v1(self, skill_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") + # verify the required parameter 'experiment_id' is set + if ('experiment_id' not in params) or (params['experiment_id'] is None): + raise ValueError( + "Missing the required parameter `experiment_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/betaTest' + resource_path = '/v1/skills/{skillId}/experiments/{experimentId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] + if 'experiment_id' in params: + path_params['experimentId'] = params['experiment_id'] query_params = [] # type: List header_params = [] # type: List body_params = None - if 'create_test_body' in params: - body_params = params['create_test_body'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -6370,16 +6987,17 @@ def create_beta_test_v1(self, skill_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. Return a URL to track the resource in 'Location' header.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="POST", + method="DELETE", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -6392,23 +7010,25 @@ def create_beta_test_v1(self, skill_id, **kwargs): if full_response: return api_response + return None - def update_beta_test_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def update_exposure_v1(self, skill_id, experiment_id, update_exposure_request, **kwargs): + # type: (str, str, UpdateExposureRequest_ce52ce53, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Update beta test. - Update a beta test for a given Alexa skill. + Updates the exposure of an experiment that is in CREATED or RUNNING state. :param skill_id: (required) The skill ID. :type skill_id: str - :param create_test_body: JSON object containing the details of a beta test used to create the test. - :type create_test_body: ask_smapi_model.v1.skill.beta_test.test_body.TestBody + :param experiment_id: (required) Identifies the experiment in a skill. + :type experiment_id: str + :param update_exposure_request: (required) Defines the request body for updating the exposure percentage of a running experiment. + :type update_exposure_request: ask_smapi_model.v1.skill.experiment.update_exposure_request.UpdateExposureRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "update_beta_test_v1" + operation_name = "update_exposure_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6417,21 +7037,31 @@ def update_beta_test_v1(self, skill_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") + # verify the required parameter 'experiment_id' is set + if ('experiment_id' not in params) or (params['experiment_id'] is None): + raise ValueError( + "Missing the required parameter `experiment_id` when calling `" + operation_name + "`") + # verify the required parameter 'update_exposure_request' is set + if ('update_exposure_request' not in params) or (params['update_exposure_request'] is None): + raise ValueError( + "Missing the required parameter `update_exposure_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/betaTest' + resource_path = '/v1/skills/{skillId}/experiments/{experimentId}/exposurePercentage' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] + if 'experiment_id' in params: + path_params['experimentId'] = params['experiment_id'] query_params = [] # type: List header_params = [] # type: List body_params = None - if 'create_test_body' in params: - body_params = params['create_test_body'] + if 'update_exposure_request' in params: + body_params = params['update_exposure_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -6448,13 +7078,16 @@ def update_beta_test_v1(self, skill_id, **kwargs): error_definitions = [] # type: List error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="PUT", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -6467,21 +7100,23 @@ def update_beta_test_v1(self, skill_id, **kwargs): if full_response: return api_response + return None - def start_beta_test_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def get_experiment_v1(self, skill_id, experiment_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, GetExperimentResponse_fcd92c35, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Start beta test - Start a beta test for a given Alexa skill. System will send invitation emails to each tester in the test, and add entitlement on the acceptance. + Retrieves an existing experiment for a skill. :param skill_id: (required) The skill ID. :type skill_id: str + :param experiment_id: (required) Identifies the experiment in a skill. + :type experiment_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, GetExperimentResponse_fcd92c35, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "start_beta_test_v1" + operation_name = "get_experiment_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6490,13 +7125,19 @@ def start_beta_test_v1(self, skill_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") + # verify the required parameter 'experiment_id' is set + if ('experiment_id' not in params) or (params['experiment_id'] is None): + raise ValueError( + "Missing the required parameter `experiment_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/betaTest/start' + resource_path = '/v1/skills/{skillId}/experiments/{experimentId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] + if 'experiment_id' in params: + path_params['experimentId'] = params['experiment_id'] query_params = [] # type: List @@ -6517,16 +7158,16 @@ def start_beta_test_v1(self, skill_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=202, message="Accept. Return a URL to track the resource in 'Location' header.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.experiment.get_experiment_response.GetExperimentResponse", status_code=200, message="Returned skill experiment.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="POST", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -6534,28 +7175,32 @@ def start_beta_test_v1(self, skill_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.skill.experiment.get_experiment_response.GetExperimentResponse") if full_response: return api_response + return api_response.body - def add_testers_to_beta_test_v1(self, skill_id, testers_request, **kwargs): - # type: (str, TestersListV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def list_experiment_metric_snapshots_v1(self, skill_id, experiment_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ListExperimentMetricSnapshotsResponse_bb18308b] """ - Add testers to an existing beta test. - Add testers to a beta test for the given Alexa skill. System will send invitation email to each tester and add entitlement on the acceptance. + Gets a list of all metric snapshots associated with this experiment id. The metric snapshots represent the metric data available for a time range. :param skill_id: (required) The skill ID. :type skill_id: str - :param testers_request: (required) JSON object containing the email address of beta testers. - :type testers_request: ask_smapi_model.v1.skill.beta_test.testers.testers_list.TestersList + :param experiment_id: (required) Identifies the experiment in a skill. + :type experiment_id: str + :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. + :type next_token: str + :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. + :type max_results: int :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ListExperimentMetricSnapshotsResponse_bb18308b] """ - operation_name = "add_testers_to_beta_test_v1" + operation_name = "list_experiment_metric_snapshots_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6564,25 +7209,29 @@ def add_testers_to_beta_test_v1(self, skill_id, testers_request, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'testers_request' is set - if ('testers_request' not in params) or (params['testers_request'] is None): + # verify the required parameter 'experiment_id' is set + if ('experiment_id' not in params) or (params['experiment_id'] is None): raise ValueError( - "Missing the required parameter `testers_request` when calling `" + operation_name + "`") + "Missing the required parameter `experiment_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/betaTest/testers/add' + resource_path = '/v1/skills/{skillId}/experiments/{experimentId}/metricSnapshots' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] + if 'experiment_id' in params: + path_params['experimentId'] = params['experiment_id'] query_params = [] # type: List + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List body_params = None - if 'testers_request' in params: - body_params = params['testers_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -6597,15 +7246,17 @@ def add_testers_to_beta_test_v1(self, skill_id, testers_request, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.experiment.list_experiment_metric_snapshots_response.ListExperimentMetricSnapshotsResponse", status_code=200, message="Returned experiment metric snapshots.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="POST", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -6613,30 +7264,30 @@ def add_testers_to_beta_test_v1(self, skill_id, testers_request, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.skill.experiment.list_experiment_metric_snapshots_response.ListExperimentMetricSnapshotsResponse") if full_response: return api_response + return api_response.body - def get_list_of_testers_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV1, ListTestersResponseV1, BadRequestErrorV1] + def get_experiment_metric_snapshot_v1(self, skill_id, experiment_id, metric_snapshot_id, **kwargs): + # type: (str, str, str, **Any) -> Union[ApiResponse, object, GetExperimentMetricSnapshotResponse_b6905a35, StandardizedError_f5106a89, BadRequestError_f854b05] """ - List testers. - List all testers in a beta test for the given Alexa skill. + Gets a list of all metric data associated with this experiment's metric snapshot. :param skill_id: (required) The skill ID. :type skill_id: str - :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. - :type next_token: str - :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :param experiment_id: (required) Identifies the experiment in a skill. + :type experiment_id: str + :param metric_snapshot_id: (required) Identifies the experiment metric snapshot in a skill experiment. The metric snapshot represents metric data for a date range. + :type metric_snapshot_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, ListTestersResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, GetExperimentMetricSnapshotResponse_b6905a35, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "get_list_of_testers_v1" + operation_name = "get_experiment_metric_snapshot_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6645,19 +7296,27 @@ def get_list_of_testers_v1(self, skill_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") + # verify the required parameter 'experiment_id' is set + if ('experiment_id' not in params) or (params['experiment_id'] is None): + raise ValueError( + "Missing the required parameter `experiment_id` when calling `" + operation_name + "`") + # verify the required parameter 'metric_snapshot_id' is set + if ('metric_snapshot_id' not in params) or (params['metric_snapshot_id'] is None): + raise ValueError( + "Missing the required parameter `metric_snapshot_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/betaTest/testers' + resource_path = '/v1/skills/{skillId}/experiments/{experimentId}/metricSnapshots/{metricSnapshotId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] + if 'experiment_id' in params: + path_params['experimentId'] = params['experiment_id'] + if 'metric_snapshot_id' in params: + path_params['metricSnapshotId'] = params['metric_snapshot_id'] query_params = [] # type: List - if 'next_token' in params: - query_params.append(('nextToken', params['next_token'])) - if 'max_results' in params: - query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List @@ -6676,12 +7335,14 @@ def get_list_of_testers_v1(self, skill_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.beta_test.testers.list_testers_response.ListTestersResponse", status_code=200, message="Success.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad request.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.experiment.get_experiment_metric_snapshot_response.GetExperimentMetricSnapshotResponse", status_code=200, message="Returned experiment metric data.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( method="GET", @@ -6692,28 +7353,30 @@ def get_list_of_testers_v1(self, skill_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.beta_test.testers.list_testers_response.ListTestersResponse") + response_type="ask_smapi_model.v1.skill.experiment.get_experiment_metric_snapshot_response.GetExperimentMetricSnapshotResponse") if full_response: return api_response return api_response.body + - def remove_testers_from_beta_test_v1(self, skill_id, testers_request, **kwargs): - # type: (str, TestersListV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def update_experiment_v1(self, skill_id, experiment_id, update_experiment_request, **kwargs): + # type: (str, str, UpdateExperimentRequest_d8449813, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Remove testers from an existing beta test. - Remove testers from a beta test for the given Alexa skill. System will send access end email to each tester and remove entitlement for them. + Updates an existing experiment for a skill. Can only be called while the experiment is in CREATED state. :param skill_id: (required) The skill ID. :type skill_id: str - :param testers_request: (required) JSON object containing the email address of beta testers. - :type testers_request: ask_smapi_model.v1.skill.beta_test.testers.testers_list.TestersList + :param experiment_id: (required) Identifies the experiment in a skill. + :type experiment_id: str + :param update_experiment_request: (required) Defines the request body for updating an experiment. + :type update_experiment_request: ask_smapi_model.v1.skill.experiment.update_experiment_request.UpdateExperimentRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "remove_testers_from_beta_test_v1" + operation_name = "update_experiment_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6722,25 +7385,31 @@ def remove_testers_from_beta_test_v1(self, skill_id, testers_request, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'testers_request' is set - if ('testers_request' not in params) or (params['testers_request'] is None): + # verify the required parameter 'experiment_id' is set + if ('experiment_id' not in params) or (params['experiment_id'] is None): raise ValueError( - "Missing the required parameter `testers_request` when calling `" + operation_name + "`") + "Missing the required parameter `experiment_id` when calling `" + operation_name + "`") + # verify the required parameter 'update_experiment_request' is set + if ('update_experiment_request' not in params) or (params['update_experiment_request'] is None): + raise ValueError( + "Missing the required parameter `update_experiment_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/betaTest/testers/remove' + resource_path = '/v1/skills/{skillId}/experiments/{experimentId}/properties' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] + if 'experiment_id' in params: + path_params['experimentId'] = params['experiment_id'] query_params = [] # type: List header_params = [] # type: List body_params = None - if 'testers_request' in params: - body_params = params['testers_request'] + if 'update_experiment_request' in params: + body_params = params['update_experiment_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -6757,10 +7426,13 @@ def remove_testers_from_beta_test_v1(self, skill_id, testers_request, **kwargs): error_definitions = [] # type: List error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( method="POST", @@ -6776,23 +7448,23 @@ def remove_testers_from_beta_test_v1(self, skill_id, testers_request, **kwargs): if full_response: return api_response + return None - def request_feedback_from_testers_v1(self, skill_id, testers_request, **kwargs): - # type: (str, TestersListV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def get_experiment_state_v1(self, skill_id, experiment_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, GetExperimentStateResponse_5152b250, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Request feedback from testers. - Request feedback from the testers in a beta test for the given Alexa skill. System will send notification emails to testers to request feedback. + Retrieves the current state of the experiment. :param skill_id: (required) The skill ID. :type skill_id: str - :param testers_request: (required) JSON object containing the email address of beta testers. - :type testers_request: ask_smapi_model.v1.skill.beta_test.testers.testers_list.TestersList + :param experiment_id: (required) Identifies the experiment in a skill. + :type experiment_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, GetExperimentStateResponse_5152b250, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "request_feedback_from_testers_v1" + operation_name = "get_experiment_state_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6801,25 +7473,25 @@ def request_feedback_from_testers_v1(self, skill_id, testers_request, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'testers_request' is set - if ('testers_request' not in params) or (params['testers_request'] is None): + # verify the required parameter 'experiment_id' is set + if ('experiment_id' not in params) or (params['experiment_id'] is None): raise ValueError( - "Missing the required parameter `testers_request` when calling `" + operation_name + "`") + "Missing the required parameter `experiment_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/betaTest/testers/requestFeedback' + resource_path = '/v1/skills/{skillId}/experiments/{experimentId}/state' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] + if 'experiment_id' in params: + path_params['experimentId'] = params['experiment_id'] query_params = [] # type: List header_params = [] # type: List body_params = None - if 'testers_request' in params: - body_params = params['testers_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -6834,16 +7506,16 @@ def request_feedback_from_testers_v1(self, skill_id, testers_request, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.experiment.get_experiment_state_response.GetExperimentStateResponse", status_code=200, message="Returned skill experiment state.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="POST", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -6851,28 +7523,30 @@ def request_feedback_from_testers_v1(self, skill_id, testers_request, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.skill.experiment.get_experiment_state_response.GetExperimentStateResponse") if full_response: return api_response + return api_response.body - def send_reminder_to_testers_v1(self, skill_id, testers_request, **kwargs): - # type: (str, TestersListV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + def manage_experiment_state_v1(self, skill_id, experiment_id, manage_experiment_state_request, **kwargs): + # type: (str, str, ManageExperimentStateRequest_c31e7ea0, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Send reminder to testers in a beta test. - Send reminder to the testers in a beta test for the given Alexa skill. System will send invitation email to each tester and add entitlement on the acceptance. + Requests an action on the experiment to move it to the targetState. Acceptable targetState values are: * `ENABLED`: Experiment configurations are deployed and customer overrides are enabled. Actual experiment has not started yet but customers with overrides set to T1 will see the T1 behavior. Initial state must be CREATED. * `RUNNING`: Starts the experiment with the configured exposure. Skill customers selected to be in the experiment will start contributing to the metric data. Initial state must be CREATED or ENABLED. * `STOPPED`: Stops the experiment by removing the experiment configurations. All customer treatment overrides are removed. Initial state must be ENABLED or RUNNING. Final state for ENDPOINT_BASED experiments, no further action is taken by ASK. It is expected that the skill builder updates their endpoint code to make T1 the default live behavior. :param skill_id: (required) The skill ID. :type skill_id: str - :param testers_request: (required) JSON object containing the email address of beta testers. - :type testers_request: ask_smapi_model.v1.skill.beta_test.testers.testers_list.TestersList + :param experiment_id: (required) Identifies the experiment in a skill. + :type experiment_id: str + :param manage_experiment_state_request: (required) Defines the request body for performing an experiment action to move it to a target state. + :type manage_experiment_state_request: ask_smapi_model.v1.skill.experiment.manage_experiment_state_request.ManageExperimentStateRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "send_reminder_to_testers_v1" + operation_name = "manage_experiment_state_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6881,25 +7555,31 @@ def send_reminder_to_testers_v1(self, skill_id, testers_request, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'testers_request' is set - if ('testers_request' not in params) or (params['testers_request'] is None): + # verify the required parameter 'experiment_id' is set + if ('experiment_id' not in params) or (params['experiment_id'] is None): raise ValueError( - "Missing the required parameter `testers_request` when calling `" + operation_name + "`") + "Missing the required parameter `experiment_id` when calling `" + operation_name + "`") + # verify the required parameter 'manage_experiment_state_request' is set + if ('manage_experiment_state_request' not in params) or (params['manage_experiment_state_request'] is None): + raise ValueError( + "Missing the required parameter `manage_experiment_state_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/betaTest/testers/sendReminder' + resource_path = '/v1/skills/{skillId}/experiments/{experimentId}/state' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] + if 'experiment_id' in params: + path_params['experimentId'] = params['experiment_id'] query_params = [] # type: List header_params = [] # type: List body_params = None - if 'testers_request' in params: - body_params = params['testers_request'] + if 'manage_experiment_state_request' in params: + body_params = params['manage_experiment_state_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -6914,13 +7594,15 @@ def send_reminder_to_testers_v1(self, skill_id, testers_request, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=202, message="Accepted; Returns a URL to track the experiment state in 'Location' header.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( method="POST", @@ -6936,24 +7618,23 @@ def send_reminder_to_testers_v1(self, skill_id, testers_request, **kwargs): if full_response: return api_response + return None - def get_certification_review_v1(self, skill_id, certification_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, CertificationResponseV1, ErrorV1] + def get_customer_treatment_override_v1(self, skill_id, experiment_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, GetCustomerTreatmentOverrideResponse_f64f689f, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Gets a specific certification resource. The response contains the review tracking information for a skill to show how much time the skill is expected to remain under review by Amazon. Once the review is complete, the response also contains the outcome of the review. Old certifications may not be available, however any ongoing certification would always give a response. If the certification is unavailable the result will return a 404 HTTP status code. + Retrieves the current user's customer treatment override for an existing A/B Test experiment. The current user must be under the same skill vendor of the requested skill id to have access to the resource. :param skill_id: (required) The skill ID. :type skill_id: str - :param certification_id: (required) Id of the certification. Reserved word identifier of mostRecent can be used to get the most recent certification for the skill. Note that the behavior of the API in this case would be the same as when the actual certification id of the most recent certification is used in the request. - :type certification_id: str - :param accept_language: User's locale/language in context. - :type accept_language: str + :param experiment_id: (required) Identifies the experiment in a skill. + :type experiment_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, CertificationResponseV1, ErrorV1] + :rtype: Union[ApiResponse, object, GetCustomerTreatmentOverrideResponse_f64f689f, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "get_certification_review_v1" + operation_name = "get_customer_treatment_override_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -6962,25 +7643,23 @@ def get_certification_review_v1(self, skill_id, certification_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'certification_id' is set - if ('certification_id' not in params) or (params['certification_id'] is None): + # verify the required parameter 'experiment_id' is set + if ('experiment_id' not in params) or (params['experiment_id'] is None): raise ValueError( - "Missing the required parameter `certification_id` when calling `" + operation_name + "`") + "Missing the required parameter `experiment_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/certifications/{certificationId}' + resource_path = '/v1/skills/{skillId}/experiments/{experimentId}/treatmentOverrides/~current' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'certification_id' in params: - path_params['certificationId'] = params['certification_id'] + if 'experiment_id' in params: + path_params['experimentId'] = params['experiment_id'] query_params = [] # type: List header_params = [] # type: List - if 'accept_language' in params: - header_params.append(('Accept-Language', params['accept_language'])) body_params = None header_params.append(('Content-type', 'application/json')) @@ -6997,11 +7676,13 @@ def get_certification_review_v1(self, skill_id, certification_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.certification.certification_response.CertificationResponse", status_code=200, message="Successfully retrieved skill certification information.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeded the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId. ")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.experiment.get_customer_treatment_override_response.GetCustomerTreatmentOverrideResponse", status_code=200, message="Returned customer treatment override details.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( method="GET", @@ -7012,29 +7693,30 @@ def get_certification_review_v1(self, skill_id, certification_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.certification.certification_response.CertificationResponse") + response_type="ask_smapi_model.v1.skill.experiment.get_customer_treatment_override_response.GetCustomerTreatmentOverrideResponse") if full_response: return api_response return api_response.body + - def get_certifications_list_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV1, ListCertificationsResponseV1, BadRequestErrorV1] + def set_customer_treatment_override_v1(self, skill_id, experiment_id, set_customer_treatment_override_request, **kwargs): + # type: (str, str, SetCustomerTreatmentOverrideRequest_94022e79, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Get list of all certifications available for a skill, including information about past certifications and any ongoing certification. The default sort order is descending on skillSubmissionTimestamp for Certifications. + Adds the requesting user's customer treatment override to an existing experiment. The current user must be under the same skill vendor of the requested skill id to have access to the resource. Only the current user can attempt to add the override of their own customer account to an experiment. Can only be called before the experiment is enabled. :param skill_id: (required) The skill ID. :type skill_id: str - :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. - :type next_token: str - :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :param experiment_id: (required) Identifies the experiment in a skill. + :type experiment_id: str + :param set_customer_treatment_override_request: (required) Defines the request body for adding this customer's treatment override to an experiment. + :type set_customer_treatment_override_request: ask_smapi_model.v1.skill.experiment.set_customer_treatment_override_request.SetCustomerTreatmentOverrideRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, ListCertificationsResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "get_certifications_list_v1" + operation_name = "set_customer_treatment_override_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -7043,23 +7725,31 @@ def get_certifications_list_v1(self, skill_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") + # verify the required parameter 'experiment_id' is set + if ('experiment_id' not in params) or (params['experiment_id'] is None): + raise ValueError( + "Missing the required parameter `experiment_id` when calling `" + operation_name + "`") + # verify the required parameter 'set_customer_treatment_override_request' is set + if ('set_customer_treatment_override_request' not in params) or (params['set_customer_treatment_override_request'] is None): + raise ValueError( + "Missing the required parameter `set_customer_treatment_override_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/certifications' + resource_path = '/v1/skills/{skillId}/experiments/{experimentId}/treatmentOverrides/~current' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: - path_params['skillId'] = params['skill_id'] - - query_params = [] # type: List - if 'next_token' in params: - query_params.append(('nextToken', params['next_token'])) - if 'max_results' in params: - query_params.append(('maxResults', params['max_results'])) + path_params['skillId'] = params['skill_id'] + if 'experiment_id' in params: + path_params['experimentId'] = params['experiment_id'] + + query_params = [] # type: List header_params = [] # type: List body_params = None + if 'set_customer_treatment_override_request' in params: + body_params = params['set_customer_treatment_override_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -7074,15 +7764,18 @@ def get_certifications_list_v1(self, skill_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.certification.list_certifications_response.ListCertificationsResponse", status_code=200, message="Returns list of certifications for the skillId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error e.g. if any request parameter is invalid like certification Id or pagination token etc. If the maxResults is not in the range of 1 to 50, it also qualifies for this error. ")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Exceeded the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId. ")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="GET", + method="PUT", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -7090,25 +7783,30 @@ def get_certifications_list_v1(self, skill_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.certification.list_certifications_response.ListCertificationsResponse") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def get_skill_credentials_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, SkillCredentialsV1] + def list_experiments_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ListExperimentsResponse_c5b07ecb] """ - Get the client credentials for the skill. + Gets a list of all experiments associated with this skill id. :param skill_id: (required) The skill ID. :type skill_id: str + :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. + :type next_token: str + :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. + :type max_results: int :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, SkillCredentialsV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ListExperimentsResponse_c5b07ecb] """ - operation_name = "get_skill_credentials_v1" + operation_name = "list_experiments_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -7118,7 +7816,7 @@ def get_skill_credentials_v1(self, skill_id, **kwargs): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/credentials' + resource_path = '/v1/skills/{skillId}/experiments' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -7126,6 +7824,10 @@ def get_skill_credentials_v1(self, skill_id, **kwargs): path_params['skillId'] = params['skill_id'] query_params = [] # type: List + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List @@ -7144,10 +7846,12 @@ def get_skill_credentials_v1(self, skill_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.skill_credentials.SkillCredentials", status_code=200, message="Response contains the skill credentials.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.experiment.list_experiments_response.ListExperimentsResponse", status_code=200, message="Returned skill experiments.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) @@ -7160,25 +7864,28 @@ def get_skill_credentials_v1(self, skill_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.skill_credentials.SkillCredentials") + response_type="ask_smapi_model.v1.skill.experiment.list_experiments_response.ListExperimentsResponse") if full_response: return api_response return api_response.body + - def delete_skill_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + def create_experiment_v1(self, skill_id, create_experiment_request, **kwargs): + # type: (str, CreateExperimentRequest_abced22d, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Delete the skill and model for given skillId. + Create a new experiment for a skill. :param skill_id: (required) The skill ID. :type skill_id: str + :param create_experiment_request: (required) Defines the request body for creating an experiment. + :type create_experiment_request: ask_smapi_model.v1.skill.experiment.create_experiment_request.CreateExperimentRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "delete_skill_v1" + operation_name = "create_experiment_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -7187,8 +7894,12 @@ def delete_skill_v1(self, skill_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") + # verify the required parameter 'create_experiment_request' is set + if ('create_experiment_request' not in params) or (params['create_experiment_request'] is None): + raise ValueError( + "Missing the required parameter `create_experiment_request` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}' + resource_path = '/v1/skills/{skillId}/experiments' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -7200,6 +7911,8 @@ def delete_skill_v1(self, skill_id, **kwargs): header_params = [] # type: List body_params = None + if 'create_experiment_request' in params: + body_params = params['create_experiment_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -7214,7 +7927,8 @@ def delete_skill_v1(self, skill_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success. No content.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=201, message="Experiment created. Returns the generated experiment identifier in 'Location' header.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) @@ -7223,7 +7937,7 @@ def delete_skill_v1(self, skill_id, **kwargs): error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="DELETE", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -7236,24 +7950,25 @@ def delete_skill_v1(self, skill_id, **kwargs): if full_response: return api_response + return None - def get_utterance_data_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, IntentRequestsV1, StandardizedErrorV1, BadRequestErrorV1] + def get_utterance_data_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, IntentRequests_35db15c7] """ The Intent Request History API provides customers with the aggregated and anonymized transcription of user speech data and intent request details for their skills. :param skill_id: (required) The skill ID. :type skill_id: str + :param stage: (required) The stage of the skill to be used for evaluation. An error will be returned if this skill stage is not enabled on the account used for evaluation. + :type stage: str :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param sort_direction: Sets the sorting direction of the result items. When set to 'asc' these items are returned in ascending order of sortField value and when set to 'desc' these items are returned in descending order of sortField value. :type sort_direction: str :param sort_field: Sets the field on which the sorting would be applied. :type sort_field: str - :param stage: A filter used to retrieve items where the stage is equal to the given value. - :type stage: list[ask_smapi_model.v1.stage_type.StageType] :param locale: :type locale: list[ask_smapi_model.v1.skill.history.locale_in_query.LocaleInQuery] :param dialog_act_name: A filter used to retrieve items where the dialogAct name is equal to the given value. * `Dialog.ElicitSlot`: Alexa asked the user for the value of a specific slot. (https://developer.amazon.com/docs/custom-skills/dialog-interface-reference.html#elicitslot) * `Dialog.ConfirmSlot`: Alexa confirmed the value of a specific slot before continuing with the dialog. (https://developer.amazon.com/docs/custom-skills/dialog-interface-reference.html#confirmslot) * `Dialog.ConfirmIntent`: Alexa confirmed the all the information the user has provided for the intent before the skill took action. (https://developer.amazon.com/docs/custom-skills/dialog-interface-reference.html#confirmintent) @@ -7273,7 +7988,7 @@ def get_utterance_data_v1(self, skill_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, IntentRequestsV1, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, IntentRequests_35db15c7] """ operation_name = "get_utterance_data_v1" params = locals() @@ -7284,6 +7999,10 @@ def get_utterance_data_v1(self, skill_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") + # verify the required parameter 'stage' is set + if ('stage' not in params) or (params['stage'] is None): + raise ValueError( + "Missing the required parameter `stage` when calling `" + operation_name + "`") resource_path = '/v1/skills/{skillId}/history/intentRequests' resource_path = resource_path.replace('{format}', 'json') @@ -7359,9 +8078,10 @@ def get_utterance_data_v1(self, skill_id, **kwargs): if full_response: return api_response return api_response.body + def import_skill_package_v1(self, update_skill_with_package_request, skill_id, **kwargs): - # type: (UpdateSkillWithPackageRequestV1, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (UpdateSkillWithPackageRequest_d74ee124, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Creates a new import for a skill with given skillId. @@ -7374,7 +8094,7 @@ def import_skill_package_v1(self, update_skill_with_package_request, skill_id, * :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "import_skill_package_v1" params = locals() @@ -7425,6 +8145,7 @@ def import_skill_package_v1(self, update_skill_with_package_request, skill_id, * error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=412, message="Precondition failed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=413, message="Payload too large.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) @@ -7444,9 +8165,10 @@ def import_skill_package_v1(self, update_skill_with_package_request, skill_id, * if full_response: return api_response + return None def invoke_skill_v1(self, skill_id, invoke_skill_request, **kwargs): - # type: (str, InvokeSkillRequestV1, **Any) -> Union[ApiResponse, InvokeSkillResponseV1, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, InvokeSkillRequest_8cf8aff9, **Any) -> Union[ApiResponse, object, InvokeSkillResponse_6f32f451, StandardizedError_f5106a89, BadRequestError_f854b05] """ This is a synchronous API that invokes the Lambda or third party HTTPS endpoint for a given skill. A successful response will contain information related to what endpoint was called, payload sent to and received from the endpoint. In cases where requests to this API results in an error, the response will contain an error code and a description of the problem. In cases where invoking the skill endpoint specifically fails, the response will contain a status attribute indicating that a failure occurred and details about what was sent to the endpoint. The skill must belong to and be enabled by the user of this API. Also, note that calls to the skill endpoint will timeout after 10 seconds. @@ -7457,7 +8179,7 @@ def invoke_skill_v1(self, skill_id, invoke_skill_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, InvokeSkillResponseV1, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, InvokeSkillResponse_6f32f451, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "invoke_skill_v1" params = locals() @@ -7523,9 +8245,10 @@ def invoke_skill_v1(self, skill_id, invoke_skill_request, **kwargs): if full_response: return api_response return api_response.body + def get_skill_metrics_v1(self, skill_id, start_time, end_time, period, metric, stage, skill_type, **kwargs): - # type: (str, datetime, datetime, str, str, str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1, GetMetricDataResponseV1] + # type: (str, datetime, datetime, str, str, str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, GetMetricDataResponse_722e44c4] """ Get analytic metrics report of skill usage. @@ -7548,13 +8271,13 @@ def get_skill_metrics_v1(self, skill_id, start_time, end_time, period, metric, s :param locale: The locale for the skill. e.g. en-GB, en-US, de-DE and etc. :type locale: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1, GetMetricDataResponseV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, GetMetricDataResponse_722e44c4] """ operation_name = "get_skill_metrics_v1" params = locals() @@ -7659,9 +8382,10 @@ def get_skill_metrics_v1(self, skill_id, start_time, end_time, period, metric, s if full_response: return api_response return api_response.body + def get_annotations_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, accept, **kwargs): - # type: (str, str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + # type: (str, str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ Get the annotations of an NLU annotation set @@ -7674,7 +8398,7 @@ def get_annotations_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, ac :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "get_annotations_for_nlu_annotation_sets_v1" params = locals() @@ -7746,9 +8470,10 @@ def get_annotations_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, ac if full_response: return api_response + return None def update_annotations_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, content_type, update_nlu_annotation_set_annotations_request, **kwargs): - # type: (str, str, str, UpdateNLUAnnotationSetAnnotationsRequestV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + # type: (str, str, str, UpdateNLUAnnotationSetAnnotationsRequest_b336fe43, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ Replace the annotations in NLU annotation set. API which replaces the annotations in NLU annotation set. @@ -7764,7 +8489,7 @@ def update_annotations_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "update_annotations_for_nlu_annotation_sets_v1" params = locals() @@ -7842,9 +8567,10 @@ def update_annotations_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, if full_response: return api_response + return None def delete_properties_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ Delete the NLU annotation set API which deletes the NLU annotation set. Developers cannot get/list the deleted annotation set. @@ -7856,7 +8582,7 @@ def delete_properties_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "delete_properties_for_nlu_annotation_sets_v1" params = locals() @@ -7922,9 +8648,10 @@ def delete_properties_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, if full_response: return api_response + return None def get_properties_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, GetNLUAnnotationSetPropertiesResponseV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, GetNLUAnnotationSetPropertiesResponse_731f20d3, BadRequestError_f854b05] """ Get the properties of an NLU annotation set Return the properties for an NLU annotation set. @@ -7936,7 +8663,7 @@ def get_properties_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, **k :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, GetNLUAnnotationSetPropertiesResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, GetNLUAnnotationSetPropertiesResponse_731f20d3, BadRequestError_f854b05] """ operation_name = "get_properties_for_nlu_annotation_sets_v1" params = locals() @@ -8002,9 +8729,10 @@ def get_properties_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, **k if full_response: return api_response return api_response.body + def update_properties_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, update_nlu_annotation_set_properties_request, **kwargs): - # type: (str, str, UpdateNLUAnnotationSetPropertiesRequestV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1] + # type: (str, str, UpdateNLUAnnotationSetPropertiesRequest_b569f485, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ update the NLU annotation set properties. API which updates the NLU annotation set properties. Currently, the only data can be updated is annotation set name. @@ -8018,7 +8746,7 @@ def update_properties_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05] """ operation_name = "update_properties_for_nlu_annotation_sets_v1" params = locals() @@ -8090,9 +8818,10 @@ def update_properties_for_nlu_annotation_sets_v1(self, skill_id, annotation_id, if full_response: return api_response + return None def list_nlu_annotation_sets_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ErrorV1, ListNLUAnnotationSetsResponseV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, ListNLUAnnotationSetsResponse_5b1b0b6a, BadRequestError_f854b05] """ List NLU annotation sets for a given skill. API which requests all the NLU annotation sets for a skill. Returns the annotationId and properties for each NLU annotation set. Developers can filter the results using locale. Supports paging of results. @@ -8108,7 +8837,7 @@ def list_nlu_annotation_sets_v1(self, skill_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, ListNLUAnnotationSetsResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, ListNLUAnnotationSetsResponse_5b1b0b6a, BadRequestError_f854b05] """ operation_name = "list_nlu_annotation_sets_v1" params = locals() @@ -8174,9 +8903,10 @@ def list_nlu_annotation_sets_v1(self, skill_id, **kwargs): if full_response: return api_response return api_response.body + def create_nlu_annotation_set_v1(self, skill_id, create_nlu_annotation_set_request, **kwargs): - # type: (str, CreateNLUAnnotationSetRequestV1, **Any) -> Union[ApiResponse, CreateNLUAnnotationSetResponseV1, ErrorV1, BadRequestErrorV1] + # type: (str, CreateNLUAnnotationSetRequest_16b1430c, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, CreateNLUAnnotationSetResponse_b069cada] """ Create a new NLU annotation set for a skill which will generate a new annotationId. This is an API that creates a new NLU annotation set with properties and returns the annotationId. @@ -8188,7 +8918,7 @@ def create_nlu_annotation_set_v1(self, skill_id, create_nlu_annotation_set_reque :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, CreateNLUAnnotationSetResponseV1, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, CreateNLUAnnotationSetResponse_b069cada] """ operation_name = "create_nlu_annotation_set_v1" params = locals() @@ -8255,9 +8985,10 @@ def create_nlu_annotation_set_v1(self, skill_id, create_nlu_annotation_set_reque if full_response: return api_response return api_response.body + def get_nlu_evaluation_v1(self, skill_id, evaluation_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1, GetNLUEvaluationResponseV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, GetNLUEvaluationResponse_2fb5e6ed, BadRequestError_f854b05] """ Get top level information and status of a nlu evaluation. API which requests top level information about the evaluation like the current state of the job, status of the evaluation (if complete). Also returns data used to start the job, like the number of test cases, stage, locale, and start time. This should be considered the 'cheap' operation while getResultForNLUEvaluations is 'expensive'. @@ -8269,7 +9000,7 @@ def get_nlu_evaluation_v1(self, skill_id, evaluation_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1, GetNLUEvaluationResponseV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, GetNLUEvaluationResponse_2fb5e6ed, BadRequestError_f854b05] """ operation_name = "get_nlu_evaluation_v1" params = locals() @@ -8335,9 +9066,10 @@ def get_nlu_evaluation_v1(self, skill_id, evaluation_id, **kwargs): if full_response: return api_response return api_response.body + def get_result_for_nlu_evaluations_v1(self, skill_id, evaluation_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, GetNLUEvaluationResultsResponseV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, GetNLUEvaluationResultsResponse_5ca1fa54, BadRequestError_f854b05] """ Get test case results for a completed Evaluation. Paginated API which returns the test case results of an evaluation. This should be considered the 'expensive' operation while getNluEvaluation is 'cheap'. @@ -8361,7 +9093,7 @@ def get_result_for_nlu_evaluations_v1(self, skill_id, evaluation_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, GetNLUEvaluationResultsResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, GetNLUEvaluationResultsResponse_5ca1fa54, BadRequestError_f854b05] """ operation_name = "get_result_for_nlu_evaluations_v1" params = locals() @@ -8439,9 +9171,10 @@ def get_result_for_nlu_evaluations_v1(self, skill_id, evaluation_id, **kwargs): if full_response: return api_response return api_response.body + def list_nlu_evaluations_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, ListNLUEvaluationsResponseV1, ErrorV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, ListNLUEvaluationsResponse_7ef8d08f, BadRequestError_f854b05] """ List nlu evaluations run for a skill. API which requests recently run nlu evaluations started by a vendor for a skill. Returns the evaluation id and some of the parameters used to start the evaluation. Developers can filter the results using locale and stage. Supports paging of results. @@ -8461,7 +9194,7 @@ def list_nlu_evaluations_v1(self, skill_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ListNLUEvaluationsResponseV1, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, ListNLUEvaluationsResponse_7ef8d08f, BadRequestError_f854b05] """ operation_name = "list_nlu_evaluations_v1" params = locals() @@ -8531,9 +9264,10 @@ def list_nlu_evaluations_v1(self, skill_id, **kwargs): if full_response: return api_response return api_response.body + def create_nlu_evaluations_v1(self, evaluate_nlu_request, skill_id, **kwargs): - # type: (EvaluateNLURequestV1, str, **Any) -> Union[ApiResponse, EvaluateResponseV1, ErrorV1, BadRequestErrorV1] + # type: (EvaluateNLURequest_7a358f6a, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, EvaluateResponse_640ae5b5, BadRequestError_f854b05] """ Start an evaluation against the NLU model built by the skill's interaction model. This is an asynchronous API that starts an evaluation against the NLU model built by the skill's interaction model. The operation outputs an evaluationId which allows the retrieval of the current status of the operation and the results upon completion. This operation is unified, meaning both internal and external skill developers may use it evaluate NLU models. @@ -8545,7 +9279,7 @@ def create_nlu_evaluations_v1(self, evaluate_nlu_request, skill_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, EvaluateResponseV1, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, EvaluateResponse_640ae5b5, BadRequestError_f854b05] """ operation_name = "create_nlu_evaluations_v1" params = locals() @@ -8611,9 +9345,10 @@ def create_nlu_evaluations_v1(self, evaluate_nlu_request, skill_id, **kwargs): if full_response: return api_response return api_response.body + def publish_skill_v1(self, skill_id, accept_language, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, SkillPublicationResponseV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, SkillPublicationResponse_8da9d720, StandardizedError_f5106a89, BadRequestError_f854b05] """ If the skill is in certified stage, initiate publishing immediately or set a date at which the skill can publish at. @@ -8626,7 +9361,7 @@ def publish_skill_v1(self, skill_id, accept_language, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, SkillPublicationResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, SkillPublicationResponse_8da9d720, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "publish_skill_v1" params = locals() @@ -8695,9 +9430,10 @@ def publish_skill_v1(self, skill_id, accept_language, **kwargs): if full_response: return api_response return api_response.body + def get_skill_publications_v1(self, skill_id, accept_language, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, SkillPublicationResponseV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, SkillPublicationResponse_8da9d720, StandardizedError_f5106a89, BadRequestError_f854b05] """ Retrieves the latest skill publishing details of the certified stage of the skill. The publishesAtDate and status of skill publishing. @@ -8708,7 +9444,7 @@ def get_skill_publications_v1(self, skill_id, accept_language, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, SkillPublicationResponseV1] + :rtype: Union[ApiResponse, object, SkillPublicationResponse_8da9d720, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "get_skill_publications_v1" params = locals() @@ -8753,6 +9489,7 @@ def get_skill_publications_v1(self, skill_id, accept_language, **kwargs): error_definitions = [] # type: List error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.publication.skill_publication_response.SkillPublicationResponse", status_code=200, message="Successfully retrieved latest skill publication information.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) @@ -8773,9 +9510,10 @@ def get_skill_publications_v1(self, skill_id, accept_language, **kwargs): if full_response: return api_response return api_response.body + def rollback_skill_v1(self, skill_id, create_rollback_request, **kwargs): - # type: (str, CreateRollbackRequestV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, CreateRollbackResponseV1, BadRequestErrorV1] + # type: (str, CreateRollbackRequest_e7747a32, **Any) -> Union[ApiResponse, object, CreateRollbackResponse_5a2e8250, StandardizedError_f5106a89, BadRequestError_f854b05] """ Submit a target skill version to rollback to. Only one rollback or publish operation can be outstanding for a given skillId. @@ -8786,7 +9524,7 @@ def rollback_skill_v1(self, skill_id, create_rollback_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, CreateRollbackResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, CreateRollbackResponse_5a2e8250, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "rollback_skill_v1" params = locals() @@ -8854,9 +9592,10 @@ def rollback_skill_v1(self, skill_id, create_rollback_request, **kwargs): if full_response: return api_response return api_response.body + def get_rollback_for_skill_v1(self, skill_id, rollback_request_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, RollbackRequestStatusV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, RollbackRequestStatus_71665366] """ Get the rollback status of a skill given an associated rollbackRequestId. Use ~latest in place of rollbackRequestId to get the latest rollback status. @@ -8867,7 +9606,7 @@ def get_rollback_for_skill_v1(self, skill_id, rollback_request_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, RollbackRequestStatusV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, RollbackRequestStatus_71665366] """ operation_name = "get_rollback_for_skill_v1" params = locals() @@ -8934,9 +9673,10 @@ def get_rollback_for_skill_v1(self, skill_id, rollback_request_id, **kwargs): if full_response: return api_response return api_response.body + def simulate_skill_v1(self, skill_id, simulations_api_request, **kwargs): - # type: (str, SimulationsApiRequestV1, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1, SimulationsApiResponseV1] + # type: (str, SimulationsApiRequest_606eed02, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, SimulationsApiResponse_328955bc] """ Simulate executing a skill with the given id. This is an asynchronous API that simulates a skill execution in the Alexa eco-system given an utterance text of what a customer would say to Alexa. A successful response will contain a header with the location of the simulation resource. In cases where requests to this API results in an error, the response will contain an error code and a description of the problem. The skill being simulated must be in development stage, and it must also belong to and be enabled by the user of this API. Concurrent requests per user is currently not supported. @@ -8948,7 +9688,7 @@ def simulate_skill_v1(self, skill_id, simulations_api_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1, SimulationsApiResponseV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, SimulationsApiResponse_328955bc] """ operation_name = "simulate_skill_v1" params = locals() @@ -9016,9 +9756,10 @@ def simulate_skill_v1(self, skill_id, simulations_api_request, **kwargs): if full_response: return api_response return api_response.body + def get_skill_simulation_v1(self, skill_id, simulation_id, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, BadRequestErrorV1, SimulationsApiResponseV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, SimulationsApiResponse_328955bc] """ Get the result of a previously executed simulation. This API gets the result of a previously executed simulation. A successful response will contain the status of the executed simulation. If the simulation successfully completed, the response will also contain information related to skill invocation. In cases where requests to this API results in an error, the response will contain an error code and a description of the problem. In cases where the simulation failed, the response will contain a status attribute indicating that a failure occurred and details about what was sent to the skill endpoint. Note that simulation results are stored for 10 minutes. A request for an expired simulation result will return a 404 HTTP status code. @@ -9030,7 +9771,7 @@ def get_skill_simulation_v1(self, skill_id, simulation_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, BadRequestErrorV1, SimulationsApiResponseV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, SimulationsApiResponse_328955bc] """ operation_name = "get_skill_simulation_v1" params = locals() @@ -9096,20 +9837,24 @@ def get_skill_simulation_v1(self, skill_id, simulation_id, **kwargs): if full_response: return api_response return api_response.body + - def get_ssl_certificates_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, SSLCertificatePayloadV1] + def get_smart_home_capability_evaluation_v1(self, skill_id, evaluation_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, GetSHCapabilityEvaluationResponse_d484531f] """ - Returns the ssl certificate sets currently associated with this skill. Sets consist of one ssl certificate blob associated with a region as well as the default certificate for the skill. + Get top level information and status of a Smart Home capability evaluation. + Get top level information and status of a Smart Home capability evaluation. :param skill_id: (required) The skill ID. :type skill_id: str + :param evaluation_id: (required) A unique ID to identify each Smart Home capability evaluation. + :type evaluation_id: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, SSLCertificatePayloadV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, GetSHCapabilityEvaluationResponse_d484531f] """ - operation_name = "get_ssl_certificates_v1" + operation_name = "get_smart_home_capability_evaluation_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -9118,13 +9863,19 @@ def get_ssl_certificates_v1(self, skill_id, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") + # verify the required parameter 'evaluation_id' is set + if ('evaluation_id' not in params) or (params['evaluation_id'] is None): + raise ValueError( + "Missing the required parameter `evaluation_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/sslCertificateSets/~latest' + resource_path = '/v1/skills/{skillId}/smartHome/testing/capabilityEvaluations/{evaluationId}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] + if 'evaluation_id' in params: + path_params['evaluationId'] = params['evaluation_id'] query_params = [] # type: List @@ -9145,12 +9896,13 @@ def get_ssl_certificates_v1(self, skill_id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.ssl_certificate_payload.SSLCertificatePayload", status_code=200, message="Response contains the latest version of the ssl certificates.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.smart_home_evaluation.get_sh_capability_evaluation_response.GetSHCapabilityEvaluationResponse", status_code=200, message="Successfully retrieved the evaluation status.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad Request. Returned when the request payload is malformed or when, at least, one required property is missing or invalid. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="API user does not have permission or is currently in a state that does not allow calls to this API. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=404, message="The specified skill, test plan, or evaluation does not exist. The error response will contain a description that indicates the specific resource type that was not found. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=429, message="Exceeded the permitted request limit. Throttling criteria includes total requests, per API and CustomerId. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal server error. ")) api_response = self.invoke( method="GET", @@ -9161,27 +9913,33 @@ def get_ssl_certificates_v1(self, skill_id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.ssl_certificate_payload.SSLCertificatePayload") + response_type="ask_smapi_model.v1.smart_home_evaluation.get_sh_capability_evaluation_response.GetSHCapabilityEvaluationResponse") if full_response: return api_response return api_response.body + - def set_ssl_certificates_v1(self, skill_id, ssl_certificate_payload, **kwargs): - # type: (str, SSLCertificatePayloadV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + def get_smarthome_capablity_evaluation_results_v1(self, skill_id, evaluation_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, GetSHCapabilityEvaluationResultsResponse_9a1d4db0] """ - Updates the ssl certificates associated with this skill. + Get test case results for an evaluation run. + Get test case results for an evaluation run. :param skill_id: (required) The skill ID. :type skill_id: str - :param ssl_certificate_payload: (required) Defines the input/output of the ssl certificates api for a skill. - :type ssl_certificate_payload: ask_smapi_model.v1.skill.ssl_certificate_payload.SSLCertificatePayload + :param evaluation_id: (required) A unique ID to identify each Smart Home capability evaluation. + :type evaluation_id: str + :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. + :type max_results: int + :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. + :type next_token: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, GetSHCapabilityEvaluationResultsResponse_9a1d4db0] """ - operation_name = "set_ssl_certificates_v1" + operation_name = "get_smarthome_capablity_evaluation_results_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -9190,25 +9948,29 @@ def set_ssl_certificates_v1(self, skill_id, ssl_certificate_payload, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'ssl_certificate_payload' is set - if ('ssl_certificate_payload' not in params) or (params['ssl_certificate_payload'] is None): + # verify the required parameter 'evaluation_id' is set + if ('evaluation_id' not in params) or (params['evaluation_id'] is None): raise ValueError( - "Missing the required parameter `ssl_certificate_payload` when calling `" + operation_name + "`") + "Missing the required parameter `evaluation_id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/sslCertificateSets/~latest' + resource_path = '/v1/skills/{skillId}/smartHome/testing/capabilityEvaluations/{evaluationId}/results' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] + if 'evaluation_id' in params: + path_params['evaluationId'] = params['evaluation_id'] query_params = [] # type: List + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) header_params = [] # type: List body_params = None - if 'ssl_certificate_payload' in params: - body_params = params['ssl_certificate_payload'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -9223,16 +9985,16 @@ def set_ssl_certificates_v1(self, skill_id, ssl_certificate_payload, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Accepted; Request was successful and get will now result in the new values.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.smart_home_evaluation.get_sh_capability_evaluation_results_response.GetSHCapabilityEvaluationResultsResponse", status_code=200, message="Successfully retrieved the evaluation result content.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad Request. Returned when the request payload is malformed or when, at least, one required property is missing or invalid. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="API user does not have permission or is currently in a state that does not allow calls to this API. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=404, message="The specified skill, test plan, or evaluation does not exist. The error response will contain a description that indicates the specific resource type that was not found. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=429, message="Exceeded the permitted request limit. Throttling criteria includes total requests, per API and CustomerId. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal server error. ")) api_response = self.invoke( - method="PUT", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -9240,27 +10002,37 @@ def set_ssl_certificates_v1(self, skill_id, ssl_certificate_payload, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.smart_home_evaluation.get_sh_capability_evaluation_results_response.GetSHCapabilityEvaluationResultsResponse") if full_response: return api_response + return api_response.body - def delete_skill_enablement_v1(self, skill_id, stage, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + def list_smarthome_capability_evaluations_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, ListSHCapabilityEvaluationsResponse_e6fe49d5, BadRequestError_f854b05] """ - Deletes the enablement for given skillId/stage and customerId (retrieved from Auth token). + List Smart Home capability evaluation runs for a skill. + List Smart Home capability evaluation runs for a skill. :param skill_id: (required) The skill ID. :type skill_id: str - :param stage: (required) Stage for skill. + :param stage: (required) The stage of the skill to be used for evaluation. An error will be returned if this skill stage is not enabled on the account used for evaluation. :type stage: str + :param start_timestamp_from: The begnning of the start time to query evaluation result. + :type start_timestamp_from: datetime + :param start_timestamp_to: The end of the start time to query evaluation result. + :type start_timestamp_to: datetime + :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. + :type max_results: int + :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. + :type next_token: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, ListSHCapabilityEvaluationsResponse_e6fe49d5, BadRequestError_f854b05] """ - operation_name = "delete_skill_enablement_v1" + operation_name = "list_smarthome_capability_evaluations_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -9274,16 +10046,24 @@ def delete_skill_enablement_v1(self, skill_id, stage, **kwargs): raise ValueError( "Missing the required parameter `stage` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/stages/{stage}/enablement' + resource_path = '/v1/skills/{skillId}/smartHome/testing/capabilityEvaluations' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'stage' in params: - path_params['stage'] = params['stage'] query_params = [] # type: List + if 'stage' in params: + query_params.append(('stage', params['stage'])) + if 'start_timestamp_from' in params: + query_params.append(('startTimestampFrom', params['start_timestamp_from'])) + if 'start_timestamp_to' in params: + query_params.append(('startTimestampTo', params['start_timestamp_to'])) + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) header_params = [] # type: List @@ -9302,17 +10082,16 @@ def delete_skill_enablement_v1(self, skill_id, stage, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No Content; Confirms that enablement is successfully deleted.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.smart_home_evaluation.list_sh_capability_evaluations_response.ListSHCapabilityEvaluationsResponse", status_code=200, message="Successfully retrieved the evaluation infomation.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad Request. Returned when the request payload is malformed or when, at least, one required property is missing or invalid. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="API user does not have permission or is currently in a state that does not allow calls to this API. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=404, message="The specified skill, test plan, or evaluation does not exist. The error response will contain a description that indicates the specific resource type that was not found. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=429, message="Exceeded the permitted request limit. Throttling criteria includes total requests, per API and CustomerId. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal server error. ")) api_response = self.invoke( - method="DELETE", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -9320,27 +10099,29 @@ def delete_skill_enablement_v1(self, skill_id, stage, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.smart_home_evaluation.list_sh_capability_evaluations_response.ListSHCapabilityEvaluationsResponse") if full_response: return api_response + return api_response.body - def get_skill_enablement_status_v1(self, skill_id, stage, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + def create_smarthome_capability_evaluation_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, EvaluateSHCapabilityResponse_38ae7f22] """ - Checks whether an enablement exist for given skillId/stage and customerId (retrieved from Auth token) + Start a capability evaluation against a Smart Home skill. + Start a capability evaluation against a Smart Home skill. :param skill_id: (required) The skill ID. :type skill_id: str - :param stage: (required) Stage for skill. - :type stage: str + :param evaluate_sh_capability_payload: Payload sent to start a capability evaluation against a Smart Home skill. + :type evaluate_sh_capability_payload: ask_smapi_model.v1.smart_home_evaluation.evaluate_sh_capability_request.EvaluateSHCapabilityRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, EvaluateSHCapabilityResponse_38ae7f22] """ - operation_name = "get_skill_enablement_status_v1" + operation_name = "create_smarthome_capability_evaluation_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -9349,25 +10130,21 @@ def get_skill_enablement_status_v1(self, skill_id, stage, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'stage' is set - if ('stage' not in params) or (params['stage'] is None): - raise ValueError( - "Missing the required parameter `stage` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/stages/{stage}/enablement' + resource_path = '/v1/skills/{skillId}/smartHome/testing/capabilityEvaluations' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'stage' in params: - path_params['stage'] = params['stage'] query_params = [] # type: List header_params = [] # type: List body_params = None + if 'evaluate_sh_capability_payload' in params: + body_params = params['evaluate_sh_capability_payload'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -9382,17 +10159,17 @@ def get_skill_enablement_status_v1(self, skill_id, stage, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No Content; Confirms that enablement resource exists for given skillId & stage.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.smart_home_evaluation.evaluate_sh_capability_response.EvaluateSHCapabilityResponse", status_code=200, message="Evaluation has successfully begun.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad Request. Returned when the request payload is malformed or when, at least, one required property is missing or invalid. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="API user does not have permission or is currently in a state that does not allow calls to this API. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=404, message="The specified skill, test plan, or evaluation does not exist. The error response will contain a description that indicates the specific resource type that was not found. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="A test run is already in progress for the specified endpoint. Please retry after some time. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=429, message="Exceeded the permitted request limit. Throttling criteria includes total requests, per API and CustomerId. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal server error. ")) api_response = self.invoke( - method="GET", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -9400,27 +10177,31 @@ def get_skill_enablement_status_v1(self, skill_id, stage, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.smart_home_evaluation.evaluate_sh_capability_response.EvaluateSHCapabilityResponse") if full_response: return api_response + return api_response.body - def set_skill_enablement_v1(self, skill_id, stage, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + def list_smarthome_capability_test_plans_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, ListSHCapabilityTestPlansResponse_cb289d6, BadRequestError_f854b05] """ - Creates/Updates the enablement for given skillId/stage and customerId (retrieved from Auth token) + List all the test plan names and ids for a given skill ID. + List all the test plan names and ids for a given skill ID. :param skill_id: (required) The skill ID. :type skill_id: str - :param stage: (required) Stage for skill. - :type stage: str + :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. + :type max_results: int + :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. + :type next_token: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, ListSHCapabilityTestPlansResponse_cb289d6, BadRequestError_f854b05] """ - operation_name = "set_skill_enablement_v1" + operation_name = "list_smarthome_capability_test_plans_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -9429,21 +10210,19 @@ def set_skill_enablement_v1(self, skill_id, stage, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'stage' is set - if ('stage' not in params) or (params['stage'] is None): - raise ValueError( - "Missing the required parameter `stage` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/stages/{stage}/enablement' + resource_path = '/v1/skills/{skillId}/smartHome/testing/capabilityTestPlans' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'stage' in params: - path_params['stage'] = params['stage'] query_params = [] # type: List + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) header_params = [] # type: List @@ -9462,18 +10241,16 @@ def set_skill_enablement_v1(self, skill_id, stage, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No Content; Confirms that enablement is successfully created/updated.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.smart_home_evaluation.list_sh_capability_test_plans_response.ListSHCapabilityTestPlansResponse", status_code=200, message="Successfully got the list of test plans.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad Request. Returned when the request payload is malformed or when, at least, one required property is missing or invalid. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="API user does not have permission or is currently in a state that does not allow calls to this API. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=404, message="The specified skill, test plan, or evaluation does not exist. The error response will contain a description that indicates the specific resource type that was not found. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=429, message="Exceeded the permitted request limit. Throttling criteria includes total requests, per API and CustomerId. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=0, message="Internal server error. ")) api_response = self.invoke( - method="PUT", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -9481,27 +10258,26 @@ def set_skill_enablement_v1(self, skill_id, stage, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.smart_home_evaluation.list_sh_capability_test_plans_response.ListSHCapabilityTestPlansResponse") if full_response: return api_response + return api_response.body - def create_export_request_for_skill_v1(self, skill_id, stage, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1] + def get_ssl_certificates_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, SSLCertificatePayload_97891902] """ - Creates a new export for a skill with given skillId and stage. + Returns the ssl certificate sets currently associated with this skill. Sets consist of one ssl certificate blob associated with a region as well as the default certificate for the skill. :param skill_id: (required) The skill ID. :type skill_id: str - :param stage: (required) Stage for skill. - :type stage: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, SSLCertificatePayload_97891902] """ - operation_name = "create_export_request_for_skill_v1" + operation_name = "get_ssl_certificates_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -9510,19 +10286,13 @@ def create_export_request_for_skill_v1(self, skill_id, stage, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'stage' is set - if ('stage' not in params) or (params['stage'] is None): - raise ValueError( - "Missing the required parameter `stage` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/stages/{stage}/exports' + resource_path = '/v1/skills/{skillId}/sslCertificateSets/~latest' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'stage' in params: - path_params['stage'] = params['stage'] query_params = [] # type: List @@ -9543,16 +10313,15 @@ def create_export_request_for_skill_v1(self, skill_id, stage, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=202, message="Accepted.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.ssl_certificate_payload.SSLCertificatePayload", status_code=200, message="Response contains the latest version of the ssl certificates.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="POST", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -9560,31 +10329,28 @@ def create_export_request_for_skill_v1(self, skill_id, stage, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.skill.ssl_certificate_payload.SSLCertificatePayload") if full_response: return api_response + return api_response.body - def get_isp_list_for_skill_id_v1(self, skill_id, stage, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, ErrorV1, ListInSkillProductResponseV1, BadRequestErrorV1] + def set_ssl_certificates_v1(self, skill_id, ssl_certificate_payload, **kwargs): + # type: (str, SSLCertificatePayload_97891902, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Get the list of in-skill products for the skillId. + Updates the ssl certificates associated with this skill. :param skill_id: (required) The skill ID. :type skill_id: str - :param stage: (required) Stage for skill. - :type stage: str - :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. - :type next_token: str - :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :param ssl_certificate_payload: (required) Defines the input/output of the ssl certificates api for a skill. + :type ssl_certificate_payload: ask_smapi_model.v1.skill.ssl_certificate_payload.SSLCertificatePayload :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, ListInSkillProductResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "get_isp_list_for_skill_id_v1" + operation_name = "set_ssl_certificates_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -9593,29 +10359,25 @@ def get_isp_list_for_skill_id_v1(self, skill_id, stage, **kwargs): if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'stage' is set - if ('stage' not in params) or (params['stage'] is None): + # verify the required parameter 'ssl_certificate_payload' is set + if ('ssl_certificate_payload' not in params) or (params['ssl_certificate_payload'] is None): raise ValueError( - "Missing the required parameter `stage` when calling `" + operation_name + "`") + "Missing the required parameter `ssl_certificate_payload` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/stages/{stage}/inSkillProducts' + resource_path = '/v1/skills/{skillId}/sslCertificateSets/~latest' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'stage' in params: - path_params['stage'] = params['stage'] query_params = [] # type: List - if 'next_token' in params: - query_params.append(('nextToken', params['next_token'])) - if 'max_results' in params: - query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List body_params = None + if 'ssl_certificate_payload' in params: + body_params = params['ssl_certificate_payload'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -9630,15 +10392,16 @@ def get_isp_list_for_skill_id_v1(self, skill_id, stage, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.isp.list_in_skill_product_response.ListInSkillProductResponse", status_code=200, message="Response contains list of in-skill products for the specified skillId and stage.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad request. Returned when a required parameter is not present, badly formatted. ")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="Requested resource not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Too many requests received.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Accepted; Request was successful and get will now result in the new values.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="GET", + method="PUT", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -9646,40 +10409,32 @@ def get_isp_list_for_skill_id_v1(self, skill_id, stage, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.isp.list_in_skill_product_response.ListInSkillProductResponse") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def profile_nlu_v1(self, profile_nlu_request, skill_id, stage, locale, **kwargs): - # type: (ProfileNluRequestV1, str, str, str, **Any) -> Union[ApiResponse, ErrorV1, ProfileNluResponseV1, BadRequestErrorV1] + def delete_skill_enablement_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Profile a test utterance. - This is a synchronous API that profiles an utterance against interaction model. + Deletes the enablement for given skillId/stage and customerId (retrieved from Auth token). - :param profile_nlu_request: (required) Payload sent to the profile nlu API. - :type profile_nlu_request: ask_smapi_model.v1.skill.evaluations.profile_nlu_request.ProfileNluRequest :param skill_id: (required) The skill ID. :type skill_id: str :param stage: (required) Stage for skill. :type stage: str - :param locale: (required) The locale for the model requested e.g. en-GB, en-US, de-DE. - :type locale: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV1, ProfileNluResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "profile_nlu_v1" + operation_name = "delete_skill_enablement_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val del params['kwargs'] - # verify the required parameter 'profile_nlu_request' is set - if ('profile_nlu_request' not in params) or (params['profile_nlu_request'] is None): - raise ValueError( - "Missing the required parameter `profile_nlu_request` when calling `" + operation_name + "`") # verify the required parameter 'skill_id' is set if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( @@ -9688,12 +10443,8 @@ def profile_nlu_v1(self, profile_nlu_request, skill_id, stage, locale, **kwargs) if ('stage' not in params) or (params['stage'] is None): raise ValueError( "Missing the required parameter `stage` when calling `" + operation_name + "`") - # verify the required parameter 'locale' is set - if ('locale' not in params) or (params['locale'] is None): - raise ValueError( - "Missing the required parameter `locale` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/stages/{stage}/interactionModel/locales/{locale}/profileNlu' + resource_path = '/v1/skills/{skillId}/stages/{stage}/enablement' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -9701,16 +10452,12 @@ def profile_nlu_v1(self, profile_nlu_request, skill_id, stage, locale, **kwargs) path_params['skillId'] = params['skill_id'] if 'stage' in params: path_params['stage'] = params['stage'] - if 'locale' in params: - path_params['locale'] = params['locale'] query_params = [] # type: List header_params = [] # type: List body_params = None - if 'profile_nlu_request' in params: - body_params = params['profile_nlu_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -9725,16 +10472,17 @@ def profile_nlu_v1(self, profile_nlu_request, skill_id, stage, locale, **kwargs) header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.evaluations.profile_nlu_response.ProfileNluResponse", status_code=200, message="Profiled utterance against interaction model and returned nlu response successfully.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad request due to invalid or missing data.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No Content; Confirms that enablement is successfully deleted.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="This requests conflicts with another one currently being processed. ")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="API user has exceeded the permitted request rate.")) - error_definitions.append(ServiceClientResponse(response_type=None, status_code=500, message="Internal service error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="POST", + method="DELETE", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -9742,32 +10490,28 @@ def profile_nlu_v1(self, profile_nlu_request, skill_id, stage, locale, **kwargs) header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.evaluations.profile_nlu_response.ProfileNluResponse") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def get_conflict_detection_job_status_for_interaction_model_v1(self, skill_id, locale, stage, version, **kwargs): - # type: (str, str, str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, GetConflictDetectionJobStatusResponseV1, BadRequestErrorV1] + def get_skill_enablement_status_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Retrieve conflict detection job status for skill. - This API returns the job status of conflict detection job for a specified interaction model. + Checks whether an enablement exist for given skillId/stage and customerId (retrieved from Auth token) :param skill_id: (required) The skill ID. :type skill_id: str - :param locale: (required) The locale for the model requested e.g. en-GB, en-US, de-DE. - :type locale: str - :param stage: (required) Stage of the interaction model. + :param stage: (required) Stage for skill. :type stage: str - :param version: (required) Version of interaction model. Use \"~current\" to get the model of the current version. - :type version: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, GetConflictDetectionJobStatusResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "get_conflict_detection_job_status_for_interaction_model_v1" + operation_name = "get_skill_enablement_status_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -9776,31 +10520,19 @@ def get_conflict_detection_job_status_for_interaction_model_v1(self, skill_id, l if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'locale' is set - if ('locale' not in params) or (params['locale'] is None): - raise ValueError( - "Missing the required parameter `locale` when calling `" + operation_name + "`") # verify the required parameter 'stage' is set if ('stage' not in params) or (params['stage'] is None): raise ValueError( "Missing the required parameter `stage` when calling `" + operation_name + "`") - # verify the required parameter 'version' is set - if ('version' not in params) or (params['version'] is None): - raise ValueError( - "Missing the required parameter `version` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/stages/{stage}/interactionModel/locales/{locale}/versions/{version}/conflictDetectionJobStatus' + resource_path = '/v1/skills/{skillId}/stages/{stage}/enablement' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'locale' in params: - path_params['locale'] = params['locale'] if 'stage' in params: path_params['stage'] = params['stage'] - if 'version' in params: - path_params['version'] = params['version'] query_params = [] # type: List @@ -9821,12 +10553,12 @@ def get_conflict_detection_job_status_for_interaction_model_v1(self, skill_id, l header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.conflict_detection.get_conflict_detection_job_status_response.GetConflictDetectionJobStatusResponse", status_code=200, message="Get conflict detection results successfully.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No Content; Confirms that enablement resource exists for given skillId & stage.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="There is no catalog defined for the catalogId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) @@ -9839,36 +10571,28 @@ def get_conflict_detection_job_status_for_interaction_model_v1(self, skill_id, l header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.interaction_model.conflict_detection.get_conflict_detection_job_status_response.GetConflictDetectionJobStatusResponse") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def get_conflicts_for_interaction_model_v1(self, skill_id, locale, stage, version, **kwargs): - # type: (str, str, str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, GetConflictsResponseV1, BadRequestErrorV1] + def set_skill_enablement_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - Retrieve conflict detection results for a specified interaction model. - This is a paginated API that retrieves results of conflict detection job for a specified interaction model. + Creates/Updates the enablement for given skillId/stage and customerId (retrieved from Auth token) :param skill_id: (required) The skill ID. :type skill_id: str - :param locale: (required) The locale for the model requested e.g. en-GB, en-US, de-DE. - :type locale: str - :param stage: (required) Stage of the interaction model. + :param stage: (required) Stage for skill. :type stage: str - :param version: (required) Version of interaction model. Use \"~current\" to get the model of the current version. - :type version: str - :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. - :type next_token: str - :param max_results: Sets the maximum number of results returned in the response body. Defaults to 100. If more results are present, the response will contain a nextToken and a _link.next href. - :type max_results: float :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, GetConflictsResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "get_conflicts_for_interaction_model_v1" + operation_name = "set_skill_enablement_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -9877,37 +10601,21 @@ def get_conflicts_for_interaction_model_v1(self, skill_id, locale, stage, versio if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( "Missing the required parameter `skill_id` when calling `" + operation_name + "`") - # verify the required parameter 'locale' is set - if ('locale' not in params) or (params['locale'] is None): - raise ValueError( - "Missing the required parameter `locale` when calling `" + operation_name + "`") # verify the required parameter 'stage' is set if ('stage' not in params) or (params['stage'] is None): raise ValueError( "Missing the required parameter `stage` when calling `" + operation_name + "`") - # verify the required parameter 'version' is set - if ('version' not in params) or (params['version'] is None): - raise ValueError( - "Missing the required parameter `version` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/stages/{stage}/interactionModel/locales/{locale}/versions/{version}/conflicts' + resource_path = '/v1/skills/{skillId}/stages/{stage}/enablement' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'skill_id' in params: path_params['skillId'] = params['skill_id'] - if 'locale' in params: - path_params['locale'] = params['locale'] if 'stage' in params: path_params['stage'] = params['stage'] - if 'version' in params: - path_params['version'] = params['version'] query_params = [] # type: List - if 'next_token' in params: - query_params.append(('nextToken', params['next_token'])) - if 'max_results' in params: - query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List @@ -9926,17 +10634,18 @@ def get_conflicts_for_interaction_model_v1(self, skill_id, locale, stage, versio header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.interaction_model.conflict_detection.get_conflicts_response.GetConflictsResponse", status_code=200, message="Get conflict detection results sucessfully.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="No Content; Confirms that enablement is successfully created/updated.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="There is no catalog defined for the catalogId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="GET", + method="PUT", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -9944,31 +10653,28 @@ def get_conflicts_for_interaction_model_v1(self, skill_id, locale, stage, versio header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.interaction_model.conflict_detection.get_conflicts_response.GetConflictsResponse") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def list_private_distribution_accounts_v1(self, skill_id, stage, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, ListPrivateDistributionAccountsResponseV1, BadRequestErrorV1] + def create_export_request_for_skill_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - List private distribution accounts. + Creates a new export for a skill with given skillId and stage. :param skill_id: (required) The skill ID. :type skill_id: str :param stage: (required) Stage for skill. :type stage: str - :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. - :type next_token: str - :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, ListPrivateDistributionAccountsResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ - operation_name = "list_private_distribution_accounts_v1" + operation_name = "create_export_request_for_skill_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -9982,7 +10688,7 @@ def list_private_distribution_accounts_v1(self, skill_id, stage, **kwargs): raise ValueError( "Missing the required parameter `stage` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/stages/{stage}/privateDistributionAccounts' + resource_path = '/v1/skills/{skillId}/stages/{stage}/exports' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -9992,10 +10698,6 @@ def list_private_distribution_accounts_v1(self, skill_id, stage, **kwargs): path_params['stage'] = params['stage'] query_params = [] # type: List - if 'next_token' in params: - query_params.append(('nextToken', params['next_token'])) - if 'max_results' in params: - query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List @@ -10014,17 +10716,17 @@ def list_private_distribution_accounts_v1(self, skill_id, stage, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.private.list_private_distribution_accounts_response.ListPrivateDistributionAccountsResponse", status_code=200, message="Returns list of private distribution accounts on success.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=202, message="Accepted.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=409, message="The request could not be completed due to a conflict with the current state of the target resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceeds the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) api_response = self.invoke( - method="GET", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -10032,29 +10734,32 @@ def list_private_distribution_accounts_v1(self, skill_id, stage, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type="ask_smapi_model.v1.skill.private.list_private_distribution_accounts_response.ListPrivateDistributionAccountsResponse") + response_type=None) if full_response: return api_response - return api_response.body + + return None - def delete_private_distribution_account_id_v1(self, skill_id, stage, id, **kwargs): - # type: (str, str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + def get_isp_list_for_skill_id_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ListInSkillProductResponse_505e7307] """ - Remove an id from the private distribution accounts. + Get the list of in-skill products for the skillId. :param skill_id: (required) The skill ID. :type skill_id: str :param stage: (required) Stage for skill. :type stage: str - :param id: (required) ARN that a skill can be privately distributed to. - :type id: str + :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. + :type next_token: str + :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. + :type max_results: int :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ListInSkillProductResponse_505e7307] """ - operation_name = "delete_private_distribution_account_id_v1" + operation_name = "get_isp_list_for_skill_id_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val @@ -10067,12 +10772,8 @@ def delete_private_distribution_account_id_v1(self, skill_id, stage, id, **kwarg if ('stage' not in params) or (params['stage'] is None): raise ValueError( "Missing the required parameter `stage` when calling `" + operation_name + "`") - # verify the required parameter 'id' is set - if ('id' not in params) or (params['id'] is None): - raise ValueError( - "Missing the required parameter `id` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/stages/{stage}/privateDistributionAccounts/{id}' + resource_path = '/v1/skills/{skillId}/stages/{stage}/inSkillProducts' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -10080,10 +10781,12 @@ def delete_private_distribution_account_id_v1(self, skill_id, stage, id, **kwarg path_params['skillId'] = params['skill_id'] if 'stage' in params: path_params['stage'] = params['stage'] - if 'id' in params: - path_params['id'] = params['id'] query_params = [] # type: List + if 'next_token' in params: + query_params.append(('nextToken', params['next_token'])) + if 'max_results' in params: + query_params.append(('maxResults', params['max_results'])) header_params = [] # type: List @@ -10102,17 +10805,15 @@ def delete_private_distribution_account_id_v1(self, skill_id, stage, id, **kwarg header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.isp.list_in_skill_product_response.ListInSkillProductResponse", status_code=200, message="Response contains list of in-skill products for the specified skillId and stage.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad request. Returned when a required parameter is not present, badly formatted. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="Requested resource not found.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="Too many requests received.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal Server Error")) api_response = self.invoke( - method="DELETE", + method="GET", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -10120,33 +10821,41 @@ def delete_private_distribution_account_id_v1(self, skill_id, stage, id, **kwarg header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.isp.list_in_skill_product_response.ListInSkillProductResponse") if full_response: return api_response + return api_response.body - def set_private_distribution_account_id_v1(self, skill_id, stage, id, **kwargs): - # type: (str, str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + def profile_nlu_v1(self, profile_nlu_request, skill_id, stage, locale, **kwargs): + # type: (ProfileNluRequest_501c0d87, str, str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ProfileNluResponse_d24b74c1] """ - Add an id to the private distribution accounts. + Profile a test utterance. + This is a synchronous API that profiles an utterance against interaction model. + :param profile_nlu_request: (required) Payload sent to the profile nlu API. + :type profile_nlu_request: ask_smapi_model.v1.skill.evaluations.profile_nlu_request.ProfileNluRequest :param skill_id: (required) The skill ID. :type skill_id: str :param stage: (required) Stage for skill. :type stage: str - :param id: (required) ARN that a skill can be privately distributed to. - :type id: str + :param locale: (required) The locale for the model requested e.g. en-GB, en-US, de-DE. + :type locale: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ProfileNluResponse_d24b74c1] """ - operation_name = "set_private_distribution_account_id_v1" + operation_name = "profile_nlu_v1" params = locals() for key, val in six.iteritems(params['kwargs']): params[key] = val del params['kwargs'] + # verify the required parameter 'profile_nlu_request' is set + if ('profile_nlu_request' not in params) or (params['profile_nlu_request'] is None): + raise ValueError( + "Missing the required parameter `profile_nlu_request` when calling `" + operation_name + "`") # verify the required parameter 'skill_id' is set if ('skill_id' not in params) or (params['skill_id'] is None): raise ValueError( @@ -10155,12 +10864,12 @@ def set_private_distribution_account_id_v1(self, skill_id, stage, id, **kwargs): if ('stage' not in params) or (params['stage'] is None): raise ValueError( "Missing the required parameter `stage` when calling `" + operation_name + "`") - # verify the required parameter 'id' is set - if ('id' not in params) or (params['id'] is None): + # verify the required parameter 'locale' is set + if ('locale' not in params) or (params['locale'] is None): raise ValueError( - "Missing the required parameter `id` when calling `" + operation_name + "`") + "Missing the required parameter `locale` when calling `" + operation_name + "`") - resource_path = '/v1/skills/{skillId}/stages/{stage}/privateDistributionAccounts/{id}' + resource_path = '/v1/skills/{skillId}/stages/{stage}/interactionModel/locales/{locale}/profileNlu' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict @@ -10168,14 +10877,16 @@ def set_private_distribution_account_id_v1(self, skill_id, stage, id, **kwargs): path_params['skillId'] = params['skill_id'] if 'stage' in params: path_params['stage'] = params['stage'] - if 'id' in params: - path_params['id'] = params['id'] + if 'locale' in params: + path_params['locale'] = params['locale'] query_params = [] # type: List header_params = [] # type: List body_params = None + if 'profile_nlu_request' in params: + body_params = params['profile_nlu_request'] header_params.append(('Content-type', 'application/json')) header_params.append(('User-Agent', self.user_agent)) @@ -10190,17 +10901,16 @@ def set_private_distribution_account_id_v1(self, skill_id, stage, id, **kwargs): header_params.append(('Authorization', authorization_value)) error_definitions = [] # type: List - error_definitions.append(ServiceClientResponse(response_type=None, status_code=204, message="Success.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Server cannot process the request due to a client error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.evaluations.profile_nlu_response.ProfileNluResponse", status_code=200, message="Profiled utterance against interaction model and returned nlu response successfully.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="Bad request due to invalid or missing data.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=401, message="The auth token is invalid/expired or doesn't have access to the resource.")) error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=403, message="The operation being requested is not allowed.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="The resource being requested is not found.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=429, message="Exceed the permitted request limit. Throttling criteria includes total requests, per API, ClientId, and CustomerId.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=500, message="Internal Server Error.")) - error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=503, message="Service Unavailable.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=409, message="This requests conflicts with another one currently being processed. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=429, message="API user has exceeded the permitted request rate.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=500, message="Internal service error.")) api_response = self.invoke( - method="PUT", + method="POST", endpoint=self._api_endpoint, path=resource_path, path_params=path_params, @@ -10208,14 +10918,15 @@ def set_private_distribution_account_id_v1(self, skill_id, stage, id, **kwargs): header_params=header_params, body=body_params, response_definitions=error_definitions, - response_type=None) + response_type="ask_smapi_model.v1.skill.evaluations.profile_nlu_response.ProfileNluResponse") if full_response: return api_response + return api_response.body def delete_account_linking_info_v1(self, skill_id, stage_v2, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Delete AccountLinking information of a skill for the given stage. @@ -10226,7 +10937,7 @@ def delete_account_linking_info_v1(self, skill_id, stage_v2, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "delete_account_linking_info_v1" params = locals() @@ -10292,9 +11003,10 @@ def delete_account_linking_info_v1(self, skill_id, stage_v2, **kwargs): if full_response: return api_response + return None def get_account_linking_info_v1(self, skill_id, stage_v2, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, AccountLinkingResponseV1, BadRequestErrorV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, AccountLinkingResponse_b1f92882, StandardizedError_f5106a89, BadRequestError_f854b05] """ Get AccountLinking information for the skill. @@ -10305,7 +11017,7 @@ def get_account_linking_info_v1(self, skill_id, stage_v2, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, AccountLinkingResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, AccountLinkingResponse_b1f92882, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "get_account_linking_info_v1" params = locals() @@ -10371,9 +11083,10 @@ def get_account_linking_info_v1(self, skill_id, stage_v2, **kwargs): if full_response: return api_response return api_response.body + def update_account_linking_info_v1(self, skill_id, stage_v2, account_linking_request, **kwargs): - # type: (str, str, AccountLinkingRequestV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, str, AccountLinkingRequest_cac174e, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Create AccountLinking information for the skill. @@ -10388,7 +11101,7 @@ def update_account_linking_info_v1(self, skill_id, stage_v2, account_linking_req :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "update_account_linking_info_v1" params = locals() @@ -10464,9 +11177,10 @@ def update_account_linking_info_v1(self, skill_id, stage_v2, account_linking_req if full_response: return api_response + return None def clone_locale_v1(self, skill_id, stage_v2, clone_locale_request, **kwargs): - # type: (str, str, CloneLocaleRequestV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, str, CloneLocaleRequest_2e00cdf4, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Creates a new clone locale workflow for a skill with given skillId, source locale, and target locales. In a single workflow, a locale can be cloned to multiple target locales. However, only one such workflow can be started at any time. @@ -10479,7 +11193,7 @@ def clone_locale_v1(self, skill_id, stage_v2, clone_locale_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "clone_locale_v1" params = locals() @@ -10553,9 +11267,10 @@ def clone_locale_v1(self, skill_id, stage_v2, clone_locale_request, **kwargs): if full_response: return api_response + return None def get_clone_locale_status_v1(self, skill_id, stage_v2, clone_locale_request_id, **kwargs): - # type: (str, str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, CloneLocaleStatusResponseV1, BadRequestErrorV1] + # type: (str, str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CloneLocaleStatusResponse_8b6e06ed] """ Returns the status of a clone locale workflow associated with the unique identifier of cloneLocaleRequestId. @@ -10568,7 +11283,7 @@ def get_clone_locale_status_v1(self, skill_id, stage_v2, clone_locale_request_id :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, CloneLocaleStatusResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, CloneLocaleStatusResponse_8b6e06ed] """ operation_name = "get_clone_locale_status_v1" params = locals() @@ -10641,9 +11356,10 @@ def get_clone_locale_status_v1(self, skill_id, stage_v2, clone_locale_request_id if full_response: return api_response return api_response.body + def get_interaction_model_v1(self, skill_id, stage_v2, locale, **kwargs): - # type: (str, str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, InteractionModelDataV1, BadRequestErrorV1] + # type: (str, str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, InteractionModelData_487fc9ea] """ Gets the `InteractionModel` for the skill in the given stage. The path params **skillId**, **stage** and **locale** are required. @@ -10656,7 +11372,7 @@ def get_interaction_model_v1(self, skill_id, stage_v2, locale, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, InteractionModelDataV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, InteractionModelData_487fc9ea] """ operation_name = "get_interaction_model_v1" params = locals() @@ -10729,9 +11445,10 @@ def get_interaction_model_v1(self, skill_id, stage_v2, locale, **kwargs): if full_response: return api_response return api_response.body + def get_interaction_model_metadata_v1(self, skill_id, stage_v2, locale, **kwargs): - # type: (str, str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Get the latest metadata for the interaction model resource for the given stage. @@ -10744,7 +11461,7 @@ def get_interaction_model_metadata_v1(self, skill_id, stage_v2, locale, **kwargs :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "get_interaction_model_metadata_v1" params = locals() @@ -10817,9 +11534,10 @@ def get_interaction_model_metadata_v1(self, skill_id, stage_v2, locale, **kwargs if full_response: return api_response + return None def set_interaction_model_v1(self, skill_id, stage_v2, locale, interaction_model, **kwargs): - # type: (str, str, str, InteractionModelDataV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, str, str, InteractionModelData_487fc9ea, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Creates an `InteractionModel` for the skill. @@ -10836,7 +11554,7 @@ def set_interaction_model_v1(self, skill_id, stage_v2, locale, interaction_model :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "set_interaction_model_v1" params = locals() @@ -10918,9 +11636,10 @@ def set_interaction_model_v1(self, skill_id, stage_v2, locale, interaction_model if full_response: return api_response + return None def list_interaction_model_versions_v1(self, skill_id, stage_v2, locale, **kwargs): - # type: (str, str, str, **Any) -> Union[ApiResponse, ListResponseV1, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ListResponse_cb936759] """ Get the list of interactionModel versions of a skill for the vendor. @@ -10933,7 +11652,7 @@ def list_interaction_model_versions_v1(self, skill_id, stage_v2, locale, **kwarg :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param sort_direction: Sets the sorting direction of the result items. When set to 'asc' these items are returned in ascending order of sortField value and when set to 'desc' these items are returned in descending order of sortField value. :type sort_direction: str :param sort_field: Sets the field on which the sorting would be applied. @@ -10941,7 +11660,7 @@ def list_interaction_model_versions_v1(self, skill_id, stage_v2, locale, **kwarg :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ListResponseV1, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, ListResponse_cb936759] """ operation_name = "list_interaction_model_versions_v1" params = locals() @@ -11022,9 +11741,10 @@ def list_interaction_model_versions_v1(self, skill_id, stage_v2, locale, **kwarg if full_response: return api_response return api_response.body + def get_interaction_model_version_v1(self, skill_id, stage_v2, locale, version, **kwargs): - # type: (str, str, str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, InteractionModelDataV1, BadRequestErrorV1] + # type: (str, str, str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, InteractionModelData_487fc9ea] """ Gets the specified version `InteractionModel` of a skill for the vendor. Use `~current` as version parameter to get the current version model. @@ -11039,7 +11759,7 @@ def get_interaction_model_version_v1(self, skill_id, stage_v2, locale, version, :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, InteractionModelDataV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05, InteractionModelData_487fc9ea] """ operation_name = "get_interaction_model_version_v1" params = locals() @@ -11118,9 +11838,10 @@ def get_interaction_model_version_v1(self, skill_id, stage_v2, locale, version, if full_response: return api_response return api_response.body + def get_skill_manifest_v1(self, skill_id, stage_v2, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1, SkillManifestEnvelopeV1] + # type: (str, str, **Any) -> Union[ApiResponse, object, SkillManifestEnvelope_fc0e823b, StandardizedError_f5106a89, BadRequestError_f854b05] """ Returns the skill manifest for given skillId and stage. @@ -11131,7 +11852,7 @@ def get_skill_manifest_v1(self, skill_id, stage_v2, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1, SkillManifestEnvelopeV1] + :rtype: Union[ApiResponse, object, SkillManifestEnvelope_fc0e823b, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "get_skill_manifest_v1" params = locals() @@ -11199,9 +11920,10 @@ def get_skill_manifest_v1(self, skill_id, stage_v2, **kwargs): if full_response: return api_response return api_response.body + def update_skill_manifest_v1(self, skill_id, stage_v2, update_skill_request, **kwargs): - # type: (str, str, SkillManifestEnvelopeV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, str, SkillManifestEnvelope_fc0e823b, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Updates skill manifest for given skillId and stage. @@ -11216,7 +11938,7 @@ def update_skill_manifest_v1(self, skill_id, stage_v2, update_skill_request, **k :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "update_skill_manifest_v1" params = locals() @@ -11293,9 +12015,10 @@ def update_skill_manifest_v1(self, skill_id, stage_v2, update_skill_request, **k if full_response: return api_response + return None def submit_skill_validation_v1(self, validations_api_request, skill_id, stage, **kwargs): - # type: (ValidationsApiRequestV1, str, str, **Any) -> Union[ApiResponse, ValidationsApiResponseV1, ErrorV1, BadRequestErrorV1] + # type: (ValidationsApiRequest_6f6e9aec, str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ValidationsApiResponse_aa0c51ca] """ Validate a skill. This is an asynchronous API which allows a skill developer to execute various validations against their skill. @@ -11309,7 +12032,7 @@ def submit_skill_validation_v1(self, validations_api_request, skill_id, stage, * :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ValidationsApiResponseV1, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ValidationsApiResponse_aa0c51ca] """ operation_name = "submit_skill_validation_v1" params = locals() @@ -11382,9 +12105,10 @@ def submit_skill_validation_v1(self, validations_api_request, skill_id, stage, * if full_response: return api_response return api_response.body + def get_skill_validations_v1(self, skill_id, validation_id, stage, **kwargs): - # type: (str, str, str, **Any) -> Union[ApiResponse, ValidationsApiResponseV1, ErrorV1, BadRequestErrorV1] + # type: (str, str, str, **Any) -> Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ValidationsApiResponse_aa0c51ca] """ Get the result of a previously executed validation. This API gets the result of a previously executed validation. A successful response will contain the status of the executed validation. If the validation successfully completed, the response will also contain information related to executed validations. In cases where requests to this API results in an error, the response will contain a description of the problem. In cases where the validation failed, the response will contain a status attribute indicating that a failure occurred. Note that validation results are stored for 60 minutes. A request for an expired validation result will return a 404 HTTP status code. @@ -11400,7 +12124,7 @@ def get_skill_validations_v1(self, skill_id, validation_id, stage, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ValidationsApiResponseV1, ErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, BadRequestError_f854b05, ValidationsApiResponse_aa0c51ca] """ operation_name = "get_skill_validations_v1" params = locals() @@ -11473,9 +12197,10 @@ def get_skill_validations_v1(self, skill_id, validation_id, stage, **kwargs): if full_response: return api_response return api_response.body + def get_skill_status_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, SkillStatusV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, SkillStatus_4fdd647b, StandardizedError_f5106a89, BadRequestError_f854b05] """ Get the status of skill resource and its sub-resources for a given skillId. @@ -11486,7 +12211,7 @@ def get_skill_status_v1(self, skill_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, SkillStatusV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, SkillStatus_4fdd647b, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "get_skill_status_v1" params = locals() @@ -11549,9 +12274,10 @@ def get_skill_status_v1(self, skill_id, **kwargs): if full_response: return api_response return api_response.body + def submit_skill_for_certification_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Submit the skill for certification. @@ -11562,7 +12288,7 @@ def submit_skill_for_certification_v1(self, skill_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "submit_skill_for_certification_v1" params = locals() @@ -11625,9 +12351,10 @@ def submit_skill_for_certification_v1(self, skill_id, **kwargs): if full_response: return api_response + return None def list_versions_for_skill_v1(self, skill_id, **kwargs): - # type: (str, **Any) -> Union[ApiResponse, StandardizedErrorV1, ListSkillVersionsResponseV1, BadRequestErrorV1] + # type: (str, **Any) -> Union[ApiResponse, object, ListSkillVersionsResponse_7522147d, StandardizedError_f5106a89, BadRequestError_f854b05] """ Retrieve a list of all skill versions associated with this skill id @@ -11636,11 +12363,11 @@ def list_versions_for_skill_v1(self, skill_id, **kwargs): :param next_token: When response to this API call is truncated (that is, isTruncated response element value is true), the response also includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that Skill Management API understands. Token has expiry of 24 hours. :type next_token: str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 50 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned, the response contains isTruncated = true. - :type max_results: float + :type max_results: int :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, ListSkillVersionsResponseV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, ListSkillVersionsResponse_7522147d, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "list_versions_for_skill_v1" params = locals() @@ -11705,9 +12432,10 @@ def list_versions_for_skill_v1(self, skill_id, **kwargs): if full_response: return api_response return api_response.body + def withdraw_skill_from_certification_v1(self, skill_id, withdraw_request, **kwargs): - # type: (str, WithdrawRequestV1, **Any) -> Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + # type: (str, WithdrawRequest_d09390b7, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ Withdraws the skill from certification. @@ -11718,7 +12446,7 @@ def withdraw_skill_from_certification_v1(self, skill_id, withdraw_request, **kwa :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, BadRequestError_f854b05] """ operation_name = "withdraw_skill_from_certification_v1" params = locals() @@ -11785,16 +12513,17 @@ def withdraw_skill_from_certification_v1(self, skill_id, withdraw_request, **kwa if full_response: return api_response + return None def create_upload_url_v1(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, StandardizedErrorV1, UploadResponseV1] + # type: (**Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, UploadResponse_5aa06857] """ Creates a new uploadUrl. :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, StandardizedErrorV1, UploadResponseV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, UploadResponse_5aa06857] """ operation_name = "create_upload_url_v1" params = locals() @@ -11846,16 +12575,17 @@ def create_upload_url_v1(self, **kwargs): if full_response: return api_response return api_response.body + def get_vendor_list_v1(self, **kwargs): - # type: (**Any) -> Union[ApiResponse, VendorsV1, ErrorV1] + # type: (**Any) -> Union[ApiResponse, object, Error_fbe913d9, Vendors_f5f1b90b] """ Get the list of Vendor information. :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, VendorsV1, ErrorV1] + :rtype: Union[ApiResponse, object, Error_fbe913d9, Vendors_f5f1b90b] """ operation_name = "get_vendor_list_v1" params = locals() @@ -11907,20 +12637,21 @@ def get_vendor_list_v1(self, **kwargs): if full_response: return api_response return api_response.body + - def get_alexa_hosted_skill_user_permissions_v1(self, vendor_id, permission, **kwargs): - # type: (str, str, **Any) -> Union[ApiResponse, HostedSkillPermissionV1, StandardizedErrorV1, BadRequestErrorV1] + def get_alexa_hosted_skill_user_permissions_v1(self, vendor_id, hosted_skill_permission_type, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, StandardizedError_f5106a89, HostedSkillPermission_eb71ebfb, BadRequestError_f854b05] """ Get the current user permissions about Alexa hosted skill features. :param vendor_id: (required) vendorId :type vendor_id: str - :param permission: (required) The permission of a hosted skill feature that customer needs to check. - :type permission: str + :param hosted_skill_permission_type: (required) The permission of a hosted skill feature that customer needs to check. + :type hosted_skill_permission_type: str :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, HostedSkillPermissionV1, StandardizedErrorV1, BadRequestErrorV1] + :rtype: Union[ApiResponse, object, StandardizedError_f5106a89, HostedSkillPermission_eb71ebfb, BadRequestError_f854b05] """ operation_name = "get_alexa_hosted_skill_user_permissions_v1" params = locals() @@ -11931,19 +12662,19 @@ def get_alexa_hosted_skill_user_permissions_v1(self, vendor_id, permission, **kw if ('vendor_id' not in params) or (params['vendor_id'] is None): raise ValueError( "Missing the required parameter `vendor_id` when calling `" + operation_name + "`") - # verify the required parameter 'permission' is set - if ('permission' not in params) or (params['permission'] is None): + # verify the required parameter 'hosted_skill_permission_type' is set + if ('hosted_skill_permission_type' not in params) or (params['hosted_skill_permission_type'] is None): raise ValueError( - "Missing the required parameter `permission` when calling `" + operation_name + "`") + "Missing the required parameter `hosted_skill_permission_type` when calling `" + operation_name + "`") - resource_path = '/v1/vendors/{vendorId}/alexaHosted/permissions/{permission}' + resource_path = '/v1/vendors/{vendorId}/alexaHosted/permissions/{hostedSkillPermissionType}' resource_path = resource_path.replace('{format}', 'json') path_params = {} # type: Dict if 'vendor_id' in params: path_params['vendorId'] = params['vendor_id'] - if 'permission' in params: - path_params['permission'] = params['permission'] + if 'hosted_skill_permission_type' in params: + path_params['hostedSkillPermissionType'] = params['hosted_skill_permission_type'] query_params = [] # type: List @@ -11985,9 +12716,10 @@ def get_alexa_hosted_skill_user_permissions_v1(self, vendor_id, permission, **kw if full_response: return api_response return api_response.body + - def invoke_skill_end_point_v2(self, skill_id, stage, invocations_api_request, **kwargs): - # type: (str, str, InvocationsApiRequestV2, **Any) -> Union[ApiResponse, ErrorV2, BadRequestErrorV2, InvocationsApiResponseV2] + def invoke_skill_end_point_v2(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, object, BadRequestError_765e0ac6, InvocationsApiResponse_3d7e3234, Error_ea6c1a5a] """ Invokes the Lambda or third party HTTPS endpoint for the given skill against a given stage. This is a synchronous API that invokes the Lambda or third party HTTPS endpoint for a given skill. A successful response will contain information related to what endpoint was called, payload sent to and received from the endpoint. In cases where requests to this API results in an error, the response will contain an error code and a description of the problem. In cases where invoking the skill endpoint specifically fails, the response will contain a status attribute indicating that a failure occurred and details about what was sent to the endpoint. The skill must belong to and be enabled by the user of this API. Also, note that calls to the skill endpoint will timeout after 10 seconds. This API is currently designed in a way that allows extension to an asynchronous API if a significantly bigger timeout is required. @@ -11996,12 +12728,12 @@ def invoke_skill_end_point_v2(self, skill_id, stage, invocations_api_request, ** :type skill_id: str :param stage: (required) Stage for skill. :type stage: str - :param invocations_api_request: (required) Payload sent to the skill invocation API. + :param invocations_api_request: Payload sent to the skill invocation API. :type invocations_api_request: ask_smapi_model.v2.skill.invocations.invocations_api_request.InvocationsApiRequest :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV2, BadRequestErrorV2, InvocationsApiResponseV2] + :rtype: Union[ApiResponse, object, BadRequestError_765e0ac6, InvocationsApiResponse_3d7e3234, Error_ea6c1a5a] """ operation_name = "invoke_skill_end_point_v2" params = locals() @@ -12016,10 +12748,6 @@ def invoke_skill_end_point_v2(self, skill_id, stage, invocations_api_request, ** if ('stage' not in params) or (params['stage'] is None): raise ValueError( "Missing the required parameter `stage` when calling `" + operation_name + "`") - # verify the required parameter 'invocations_api_request' is set - if ('invocations_api_request' not in params) or (params['invocations_api_request'] is None): - raise ValueError( - "Missing the required parameter `invocations_api_request` when calling `" + operation_name + "`") resource_path = '/v2/skills/{skillId}/stages/{stage}/invocations' resource_path = resource_path.replace('{format}', 'json') @@ -12074,12 +12802,13 @@ def invoke_skill_end_point_v2(self, skill_id, stage, invocations_api_request, ** if full_response: return api_response return api_response.body + def simulate_skill_v2(self, skill_id, stage, simulations_api_request, **kwargs): - # type: (str, str, SimulationsApiRequestV2, **Any) -> Union[ApiResponse, ErrorV2, BadRequestErrorV2, SimulationsApiResponseV2] + # type: (str, str, SimulationsApiRequest_ae2e6503, **Any) -> Union[ApiResponse, object, SimulationsApiResponse_e4ad17d, BadRequestError_765e0ac6, Error_ea6c1a5a] """ Simulate executing a skill with the given id against a given stage. - This is an asynchronous API that simulates a skill execution in the Alexa eco-system given an utterance text of what a customer would say to Alexa. A successful response will contain a header with the location of the simulation resource. In cases where requests to this API results in an error, the response will contain an error code and a description of the problem. The skill being simulated must belong to and be enabled by the user of this API. Concurrent requests per user is currently not supported. + This is an asynchronous API that simulates a skill execution in the Alexa eco-system given an utterance text of what a customer would say to Alexa. A successful response will contain a header with the location of the simulation resource. In cases where requests to this API results in an error, the response will contain an error code and a description of the problem. The skill being simulated must belong to and be enabled by the user of this API. Concurrent requests per user is currently not supported. :param skill_id: (required) The skill ID. :type skill_id: str @@ -12090,7 +12819,7 @@ def simulate_skill_v2(self, skill_id, stage, simulations_api_request, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV2, BadRequestErrorV2, SimulationsApiResponseV2] + :rtype: Union[ApiResponse, object, SimulationsApiResponse_e4ad17d, BadRequestError_765e0ac6, Error_ea6c1a5a] """ operation_name = "simulate_skill_v2" params = locals() @@ -12164,9 +12893,10 @@ def simulate_skill_v2(self, skill_id, stage, simulations_api_request, **kwargs): if full_response: return api_response return api_response.body + def get_skill_simulation_v2(self, skill_id, stage, simulation_id, **kwargs): - # type: (str, str, str, **Any) -> Union[ApiResponse, ErrorV2, BadRequestErrorV2, SimulationsApiResponseV2] + # type: (str, str, str, **Any) -> Union[ApiResponse, object, SimulationsApiResponse_e4ad17d, BadRequestError_765e0ac6, Error_ea6c1a5a] """ Get the result of a previously executed simulation. This API gets the result of a previously executed simulation. A successful response will contain the status of the executed simulation. If the simulation successfully completed, the response will also contain information related to skill invocation. In cases where requests to this API results in an error, the response will contain an error code and a description of the problem. In cases where the simulation failed, the response will contain a status attribute indicating that a failure occurred and details about what was sent to the skill endpoint. Note that simulation results are stored for 10 minutes. A request for an expired simulation result will return a 404 HTTP status code. @@ -12180,7 +12910,7 @@ def get_skill_simulation_v2(self, skill_id, stage, simulation_id, **kwargs): :param full_response: Boolean value to check if response should contain headers and status code information. This value had to be passed through keyword arguments, by default the parameter value is set to False. :type full_response: boolean - :rtype: Union[ApiResponse, ErrorV2, BadRequestErrorV2, SimulationsApiResponseV2] + :rtype: Union[ApiResponse, object, SimulationsApiResponse_e4ad17d, BadRequestError_765e0ac6, Error_ea6c1a5a] """ operation_name = "get_skill_simulation_v2" params = locals() @@ -12252,3 +12982,4 @@ def get_skill_simulation_v2(self, skill_id, stage, simulation_id, **kwargs): if full_response: return api_response return api_response.body + diff --git a/ask-smapi-model/ask_smapi_model/v0/__init__.py b/ask-smapi-model/ask_smapi_model/v0/__init__.py index dc1604c4..7bf567dc 100644 --- a/ask-smapi-model/ask_smapi_model/v0/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v0/__init__.py @@ -16,5 +16,3 @@ from .bad_request_error import BadRequestError from .error import Error -from .link import Link -from .links import Links diff --git a/ask-smapi-model/ask_smapi_model/v0/bad_request_error.py b/ask-smapi-model/ask_smapi_model/v0/bad_request_error.py index aee58048..8cecc7ee 100644 --- a/ask-smapi-model/ask_smapi_model/v0/bad_request_error.py +++ b/ask-smapi-model/ask_smapi_model/v0/bad_request_error.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.error import ErrorV0 + from ask_smapi_model.v0.error import Error as Error_d660d58 class BadRequestError(object): @@ -47,7 +47,7 @@ class BadRequestError(object): supports_multiple_types = False def __init__(self, message=None, violations=None): - # type: (Optional[str], Optional[List[ErrorV0]]) -> None + # type: (Optional[str], Optional[List[Error_d660d58]]) -> None """ :param message: Human readable description of error. diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/__init__.py b/ask-smapi-model/ask_smapi_model/v0/catalog/__init__.py index 2369366e..f597548b 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/__init__.py @@ -15,8 +15,8 @@ from __future__ import absolute_import from .list_catalogs_response import ListCatalogsResponse -from .catalog_summary import CatalogSummary from .catalog_type import CatalogType from .catalog_details import CatalogDetails from .catalog_usage import CatalogUsage +from .catalog_summary import CatalogSummary from .create_catalog_request import CreateCatalogRequest diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_details.py b/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_details.py index 9482a88c..fc56f202 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_details.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_details.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.catalog.catalog_type import CatalogTypeV0 - from ask_smapi_model.v0.catalog.catalog_usage import CatalogUsageV0 + from ask_smapi_model.v0.catalog.catalog_usage import CatalogUsage as CatalogUsage_2f19919a + from ask_smapi_model.v0.catalog.catalog_type import CatalogType as CatalogType_da9270a4 class CatalogDetails(object): @@ -68,7 +68,7 @@ class CatalogDetails(object): supports_multiple_types = False def __init__(self, id=None, title=None, object_type=None, usage=None, last_updated_date=None, created_date=None, associated_skill_ids=None): - # type: (Optional[str], Optional[str], Optional[CatalogTypeV0], Optional[CatalogUsageV0], Optional[datetime], Optional[datetime], Optional[List[object]]) -> None + # type: (Optional[str], Optional[str], Optional[CatalogType_da9270a4], Optional[CatalogUsage_2f19919a], Optional[datetime], Optional[datetime], Optional[List[object]]) -> None """ :param id: Unique identifier of the added catalog object. diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_summary.py b/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_summary.py index 58aaedc3..70149a7f 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_summary.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_summary.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.catalog.catalog_type import CatalogTypeV0 - from ask_smapi_model.v0.catalog.catalog_usage import CatalogUsageV0 + from ask_smapi_model.v0.catalog.catalog_usage import CatalogUsage as CatalogUsage_2f19919a + from ask_smapi_model.v0.catalog.catalog_type import CatalogType as CatalogType_da9270a4 class CatalogSummary(object): @@ -68,7 +68,7 @@ class CatalogSummary(object): supports_multiple_types = False def __init__(self, id=None, title=None, object_type=None, usage=None, last_updated_date=None, created_date=None, associated_skill_ids=None): - # type: (Optional[str], Optional[str], Optional[CatalogTypeV0], Optional[CatalogUsageV0], Optional[datetime], Optional[datetime], Optional[List[object]]) -> None + # type: (Optional[str], Optional[str], Optional[CatalogType_da9270a4], Optional[CatalogUsage_2f19919a], Optional[datetime], Optional[datetime], Optional[List[object]]) -> None """ :param id: Unique identifier of the added catalog object. diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_type.py b/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_type.py index d95efc2c..3699281d 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_type.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -43,7 +43,7 @@ class CatalogType(Enum): AMAZON_AudioRecording = "AMAZON.AudioRecording" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -59,7 +59,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CatalogType): return False @@ -67,6 +67,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_usage.py b/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_usage.py index 8443b556..cd48782b 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_usage.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/catalog_usage.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -43,7 +43,7 @@ class CatalogUsage(Enum): AlexaTest_Catalog_AudioRecording = "AlexaTest.Catalog.AudioRecording" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -59,7 +59,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CatalogUsage): return False @@ -67,6 +67,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/create_catalog_request.py b/ask-smapi-model/ask_smapi_model/v0/catalog/create_catalog_request.py index a935432a..df815a77 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/create_catalog_request.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/create_catalog_request.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.catalog.catalog_type import CatalogTypeV0 - from ask_smapi_model.v0.catalog.catalog_usage import CatalogUsageV0 + from ask_smapi_model.v0.catalog.catalog_usage import CatalogUsage as CatalogUsage_2f19919a + from ask_smapi_model.v0.catalog.catalog_type import CatalogType as CatalogType_da9270a4 class CreateCatalogRequest(object): @@ -56,7 +56,7 @@ class CreateCatalogRequest(object): supports_multiple_types = False def __init__(self, title=None, object_type=None, usage=None, vendor_id=None): - # type: (Optional[str], Optional[CatalogTypeV0], Optional[CatalogUsageV0], Optional[str]) -> None + # type: (Optional[str], Optional[CatalogType_da9270a4], Optional[CatalogUsage_2f19919a], Optional[str]) -> None """ :param title: Title of the catalog. diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/list_catalogs_response.py b/ask-smapi-model/ask_smapi_model/v0/catalog/list_catalogs_response.py index 33b77891..80ecec03 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/list_catalogs_response.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/list_catalogs_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.links import LinksV0 - from ask_smapi_model.v0.catalog.catalog_summary import CatalogSummaryV0 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v0.catalog.catalog_summary import CatalogSummary as CatalogSummary_c8609f7a class ListCatalogsResponse(object): @@ -33,7 +33,7 @@ class ListCatalogsResponse(object): :param links: - :type links: (optional) ask_smapi_model.v0.links.Links + :type links: (optional) ask_smapi_model.v1.links.Links :param catalogs: List of catalog summaries. :type catalogs: (optional) list[ask_smapi_model.v0.catalog.catalog_summary.CatalogSummary] :param is_truncated: @@ -43,7 +43,7 @@ class ListCatalogsResponse(object): """ deserialized_types = { - 'links': 'ask_smapi_model.v0.links.Links', + 'links': 'ask_smapi_model.v1.links.Links', 'catalogs': 'list[ask_smapi_model.v0.catalog.catalog_summary.CatalogSummary]', 'is_truncated': 'bool', 'next_token': 'str' @@ -58,11 +58,11 @@ class ListCatalogsResponse(object): supports_multiple_types = False def __init__(self, links=None, catalogs=None, is_truncated=None, next_token=None): - # type: (Optional[LinksV0], Optional[List[CatalogSummaryV0]], Optional[bool], Optional[str]) -> None + # type: (Optional[Links_bc43467b], Optional[List[CatalogSummary_c8609f7a]], Optional[bool], Optional[str]) -> None """Information about catalogs. :param links: - :type links: (optional) ask_smapi_model.v0.links.Links + :type links: (optional) ask_smapi_model.v1.links.Links :param catalogs: List of catalog summaries. :type catalogs: (optional) list[ask_smapi_model.v0.catalog.catalog_summary.CatalogSummary] :param is_truncated: diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/__init__.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/__init__.py index 5be33cbc..03650b92 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/__init__.py @@ -14,17 +14,17 @@ # from __future__ import absolute_import -from .create_content_upload_request import CreateContentUploadRequest -from .get_content_upload_response import GetContentUploadResponse +from .complete_upload_request import CompleteUploadRequest +from .ingestion_status import IngestionStatus from .presigned_upload_part import PresignedUploadPart +from .upload_ingestion_step import UploadIngestionStep from .file_upload_status import FileUploadStatus -from .content_upload_file_summary import ContentUploadFileSummary +from .create_content_upload_request import CreateContentUploadRequest from .list_uploads_response import ListUploadsResponse from .upload_status import UploadStatus -from .complete_upload_request import CompleteUploadRequest -from .content_upload_summary import ContentUploadSummary -from .ingestion_status import IngestionStatus -from .upload_ingestion_step import UploadIngestionStep from .pre_signed_url_item import PreSignedUrlItem -from .create_content_upload_response import CreateContentUploadResponse +from .content_upload_file_summary import ContentUploadFileSummary +from .content_upload_summary import ContentUploadSummary from .ingestion_step_name import IngestionStepName +from .create_content_upload_response import CreateContentUploadResponse +from .get_content_upload_response import GetContentUploadResponse diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/complete_upload_request.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/complete_upload_request.py index 679c72c0..44526e73 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/complete_upload_request.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/complete_upload_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.catalog.upload.pre_signed_url_item import PreSignedUrlItemV0 + from ask_smapi_model.v0.catalog.upload.pre_signed_url_item import PreSignedUrlItem as PreSignedUrlItem_f6fd7455 class CompleteUploadRequest(object): @@ -43,7 +43,7 @@ class CompleteUploadRequest(object): supports_multiple_types = False def __init__(self, part_e_tags=None): - # type: (Optional[List[PreSignedUrlItemV0]]) -> None + # type: (Optional[List[PreSignedUrlItem_f6fd7455]]) -> None """ :param part_e_tags: List of (eTag, part number) pairs for each part of the file uploaded. diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/content_upload_file_summary.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/content_upload_file_summary.py index f9e18a10..a62e731e 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/content_upload_file_summary.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/content_upload_file_summary.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.catalog.upload.file_upload_status import FileUploadStatusV0 + from ask_smapi_model.v0.catalog.upload.file_upload_status import FileUploadStatus as FileUploadStatus_b7cb5662 class ContentUploadFileSummary(object): @@ -47,7 +47,7 @@ class ContentUploadFileSummary(object): supports_multiple_types = False def __init__(self, presigned_download_url=None, status=None): - # type: (Optional[str], Optional[FileUploadStatusV0]) -> None + # type: (Optional[str], Optional[FileUploadStatus_b7cb5662]) -> None """ :param presigned_download_url: If the file is available for download, presigned download URL can be used to download the file. diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/content_upload_summary.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/content_upload_summary.py index f1fc6e4c..a3168752 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/content_upload_summary.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/content_upload_summary.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.catalog.upload.upload_status import UploadStatusV0 + from ask_smapi_model.v0.catalog.upload.upload_status import UploadStatus as UploadStatus_d394a7f class ContentUploadSummary(object): @@ -59,7 +59,7 @@ class ContentUploadSummary(object): supports_multiple_types = False def __init__(self, id=None, catalog_id=None, status=None, created_date=None, last_updated_date=None): - # type: (Optional[str], Optional[str], Optional[UploadStatusV0], Optional[datetime], Optional[datetime]) -> None + # type: (Optional[str], Optional[str], Optional[UploadStatus_d394a7f], Optional[datetime], Optional[datetime]) -> None """ :param id: Unique identifier of the upload. diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/create_content_upload_request.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/create_content_upload_request.py index 8eca530e..07443973 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/create_content_upload_request.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/create_content_upload_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/create_content_upload_response.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/create_content_upload_response.py index ec6ebf1f..338661b6 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/create_content_upload_response.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/create_content_upload_response.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.catalog.upload.upload_ingestion_step import UploadIngestionStepV0 - from ask_smapi_model.v0.catalog.upload.presigned_upload_part import PresignedUploadPartV0 - from ask_smapi_model.v0.catalog.upload.upload_status import UploadStatusV0 + from ask_smapi_model.v0.catalog.upload.presigned_upload_part import PresignedUploadPart as PresignedUploadPart_ab2ee608 + from ask_smapi_model.v0.catalog.upload.upload_ingestion_step import UploadIngestionStep as UploadIngestionStep_2da33f78 + from ask_smapi_model.v0.catalog.upload.upload_status import UploadStatus as UploadStatus_d394a7f class CreateContentUploadResponse(ContentUploadSummary): @@ -72,7 +72,7 @@ class CreateContentUploadResponse(ContentUploadSummary): supports_multiple_types = False def __init__(self, id=None, catalog_id=None, status=None, created_date=None, last_updated_date=None, ingestion_steps=None, presigned_upload_parts=None): - # type: (Optional[str], Optional[str], Optional[UploadStatusV0], Optional[datetime], Optional[datetime], Optional[List[UploadIngestionStepV0]], Optional[List[PresignedUploadPartV0]]) -> None + # type: (Optional[str], Optional[str], Optional[UploadStatus_d394a7f], Optional[datetime], Optional[datetime], Optional[List[UploadIngestionStep_2da33f78]], Optional[List[PresignedUploadPart_ab2ee608]]) -> None """Request body for self-hosted catalog uploads. :param id: Unique identifier of the upload. diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/file_upload_status.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/file_upload_status.py index 54e4fdc0..6d28ceeb 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/file_upload_status.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/file_upload_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class FileUploadStatus(Enum): UNAVAILABLE = "UNAVAILABLE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, FileUploadStatus): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/get_content_upload_response.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/get_content_upload_response.py index 08a50298..4d42b5c9 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/get_content_upload_response.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/get_content_upload_response.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.catalog.upload.upload_ingestion_step import UploadIngestionStepV0 - from ask_smapi_model.v0.catalog.upload.content_upload_file_summary import ContentUploadFileSummaryV0 - from ask_smapi_model.v0.catalog.upload.upload_status import UploadStatusV0 + from ask_smapi_model.v0.catalog.upload.content_upload_file_summary import ContentUploadFileSummary as ContentUploadFileSummary_785f2eb1 + from ask_smapi_model.v0.catalog.upload.upload_ingestion_step import UploadIngestionStep as UploadIngestionStep_2da33f78 + from ask_smapi_model.v0.catalog.upload.upload_status import UploadStatus as UploadStatus_d394a7f class GetContentUploadResponse(ContentUploadSummary): @@ -72,7 +72,7 @@ class GetContentUploadResponse(ContentUploadSummary): supports_multiple_types = False def __init__(self, id=None, catalog_id=None, status=None, created_date=None, last_updated_date=None, file=None, ingestion_steps=None): - # type: (Optional[str], Optional[str], Optional[UploadStatusV0], Optional[datetime], Optional[datetime], Optional[ContentUploadFileSummaryV0], Optional[List[UploadIngestionStepV0]]) -> None + # type: (Optional[str], Optional[str], Optional[UploadStatus_d394a7f], Optional[datetime], Optional[datetime], Optional[ContentUploadFileSummary_785f2eb1], Optional[List[UploadIngestionStep_2da33f78]]) -> None """Response object for get content upload request. :param id: Unique identifier of the upload. diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/ingestion_status.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/ingestion_status.py index ae466972..14b4823c 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/ingestion_status.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/ingestion_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class IngestionStatus(Enum): CANCELLED = "CANCELLED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, IngestionStatus): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/ingestion_step_name.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/ingestion_step_name.py index 9cc1f9e9..c7890b8b 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/ingestion_step_name.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/ingestion_step_name.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,7 +35,7 @@ class IngestionStepName(Enum): SCHEMA_VALIDATION = "SCHEMA_VALIDATION" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -51,7 +51,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, IngestionStepName): return False @@ -59,6 +59,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/list_uploads_response.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/list_uploads_response.py index 855d4fbc..d7429a7f 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/list_uploads_response.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/list_uploads_response.py @@ -21,17 +21,17 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.catalog.upload.content_upload_summary import ContentUploadSummaryV0 - from ask_smapi_model.v0.links import LinksV0 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v0.catalog.upload.content_upload_summary import ContentUploadSummary as ContentUploadSummary_8ef77e7e class ListUploadsResponse(object): """ :param links: - :type links: (optional) ask_smapi_model.v0.links.Links + :type links: (optional) ask_smapi_model.v1.links.Links :param is_truncated: :type is_truncated: (optional) bool :param next_token: @@ -41,7 +41,7 @@ class ListUploadsResponse(object): """ deserialized_types = { - 'links': 'ask_smapi_model.v0.links.Links', + 'links': 'ask_smapi_model.v1.links.Links', 'is_truncated': 'bool', 'next_token': 'str', 'uploads': 'list[ask_smapi_model.v0.catalog.upload.content_upload_summary.ContentUploadSummary]' @@ -56,11 +56,11 @@ class ListUploadsResponse(object): supports_multiple_types = False def __init__(self, links=None, is_truncated=None, next_token=None, uploads=None): - # type: (Optional[LinksV0], Optional[bool], Optional[str], Optional[List[ContentUploadSummaryV0]]) -> None + # type: (Optional[Links_bc43467b], Optional[bool], Optional[str], Optional[List[ContentUploadSummary_8ef77e7e]]) -> None """ :param links: - :type links: (optional) ask_smapi_model.v0.links.Links + :type links: (optional) ask_smapi_model.v1.links.Links :param is_truncated: :type is_truncated: (optional) bool :param next_token: diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/pre_signed_url_item.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/pre_signed_url_item.py index d467a9f6..b7402bc0 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/pre_signed_url_item.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/pre_signed_url_item.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/presigned_upload_part.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/presigned_upload_part.py index a204fc83..15720761 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/presigned_upload_part.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/presigned_upload_part.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/upload_ingestion_step.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/upload_ingestion_step.py index 8251a531..169c7bb3 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/upload_ingestion_step.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/upload_ingestion_step.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.catalog.upload.ingestion_step_name import IngestionStepNameV0 - from ask_smapi_model.v0.error import ErrorV0 - from ask_smapi_model.v0.catalog.upload.ingestion_status import IngestionStatusV0 + from ask_smapi_model.v0.catalog.upload.ingestion_status import IngestionStatus as IngestionStatus_2b1122e3 + from ask_smapi_model.v0.error import Error as Error_d660d58 + from ask_smapi_model.v0.catalog.upload.ingestion_step_name import IngestionStepName as IngestionStepName_4eaa95a2 class UploadIngestionStep(object): @@ -59,7 +59,7 @@ class UploadIngestionStep(object): supports_multiple_types = False def __init__(self, name=None, status=None, log_url=None, errors=None): - # type: (Optional[IngestionStepNameV0], Optional[IngestionStatusV0], Optional[str], Optional[List[ErrorV0]]) -> None + # type: (Optional[IngestionStepName_4eaa95a2], Optional[IngestionStatus_2b1122e3], Optional[str], Optional[List[Error_d660d58]]) -> None """Represents a single step in the ingestion process of a new upload. :param name: diff --git a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/upload_status.py b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/upload_status.py index 04c6e86d..355a5ed6 100644 --- a/ask-smapi-model/ask_smapi_model/v0/catalog/upload/upload_status.py +++ b/ask-smapi-model/ask_smapi_model/v0/catalog/upload/upload_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class UploadStatus(Enum): SUCCEEDED = "SUCCEEDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, UploadStatus): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/__init__.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/__init__.py index 13709986..23156882 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/__init__.py @@ -14,13 +14,13 @@ # from __future__ import absolute_import -from .endpoint import Endpoint -from .update_subscriber_request import UpdateSubscriberRequest -from .endpoint_aws_authorization import EndpointAwsAuthorization -from .subscriber_status import SubscriberStatus -from .subscriber_info import SubscriberInfo from .endpoint_authorization import EndpointAuthorization -from .create_subscriber_request import CreateSubscriberRequest +from .list_subscribers_response import ListSubscribersResponse +from .endpoint_aws_authorization import EndpointAwsAuthorization +from .update_subscriber_request import UpdateSubscriberRequest from .endpoint_authorization_type import EndpointAuthorizationType +from .endpoint import Endpoint from .subscriber_summary import SubscriberSummary -from .list_subscribers_response import ListSubscribersResponse +from .subscriber_info import SubscriberInfo +from .subscriber_status import SubscriberStatus +from .create_subscriber_request import CreateSubscriberRequest diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/create_subscriber_request.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/create_subscriber_request.py index 7683a6f0..59114a00 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/create_subscriber_request.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/create_subscriber_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.development_events.subscriber.endpoint import EndpointV0 + from ask_smapi_model.v0.development_events.subscriber.endpoint import Endpoint as Endpoint_7e4d296f class CreateSubscriberRequest(object): @@ -51,7 +51,7 @@ class CreateSubscriberRequest(object): supports_multiple_types = False def __init__(self, name=None, vendor_id=None, endpoint=None): - # type: (Optional[str], Optional[str], Optional[EndpointV0]) -> None + # type: (Optional[str], Optional[str], Optional[Endpoint_7e4d296f]) -> None """ :param name: Name of the subscriber. diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint.py index 948ec4d3..5c64a04b 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.development_events.subscriber.endpoint_authorization import EndpointAuthorizationV0 + from ask_smapi_model.v0.development_events.subscriber.endpoint_authorization import EndpointAuthorization as EndpointAuthorization_2de8b344 class Endpoint(object): @@ -47,7 +47,7 @@ class Endpoint(object): supports_multiple_types = False def __init__(self, uri=None, authorization=None): - # type: (Optional[str], Optional[EndpointAuthorizationV0]) -> None + # type: (Optional[str], Optional[EndpointAuthorization_2de8b344]) -> None """ :param uri: Uri of the endpoint that receives the notification. diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_authorization.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_authorization.py index 2cfc31bd..cc67a976 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_authorization.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_authorization.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_authorization_type.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_authorization_type.py index a82f2731..0172a318 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_authorization_type.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_authorization_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class EndpointAuthorizationType(Enum): AWS_IAM = "AWS_IAM" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, EndpointAuthorizationType): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_aws_authorization.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_aws_authorization.py index 5261c710..d6c5deca 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_aws_authorization.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/endpoint_aws_authorization.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/list_subscribers_response.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/list_subscribers_response.py index a7e79658..b2a43f51 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/list_subscribers_response.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/list_subscribers_response.py @@ -21,17 +21,17 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.development_events.subscriber.subscriber_summary import SubscriberSummaryV0 - from ask_smapi_model.v0.links import LinksV0 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v0.development_events.subscriber.subscriber_summary import SubscriberSummary as SubscriberSummary_3b34977e class ListSubscribersResponse(object): """ :param links: - :type links: (optional) ask_smapi_model.v0.links.Links + :type links: (optional) ask_smapi_model.v1.links.Links :param next_token: :type next_token: (optional) str :param subscribers: List containing subscriber summary. @@ -39,7 +39,7 @@ class ListSubscribersResponse(object): """ deserialized_types = { - 'links': 'ask_smapi_model.v0.links.Links', + 'links': 'ask_smapi_model.v1.links.Links', 'next_token': 'str', 'subscribers': 'list[ask_smapi_model.v0.development_events.subscriber.subscriber_summary.SubscriberSummary]' } # type: Dict @@ -52,11 +52,11 @@ class ListSubscribersResponse(object): supports_multiple_types = False def __init__(self, links=None, next_token=None, subscribers=None): - # type: (Optional[LinksV0], Optional[str], Optional[List[SubscriberSummaryV0]]) -> None + # type: (Optional[Links_bc43467b], Optional[str], Optional[List[SubscriberSummary_3b34977e]]) -> None """ :param links: - :type links: (optional) ask_smapi_model.v0.links.Links + :type links: (optional) ask_smapi_model.v1.links.Links :param next_token: :type next_token: (optional) str :param subscribers: List containing subscriber summary. diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_info.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_info.py index ecc35dbf..5928dd44 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_info.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_info.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.development_events.subscriber.endpoint import EndpointV0 + from ask_smapi_model.v0.development_events.subscriber.endpoint import Endpoint as Endpoint_7e4d296f class SubscriberInfo(object): @@ -53,7 +53,7 @@ class SubscriberInfo(object): supports_multiple_types = False def __init__(self, subscriber_id=None, name=None, endpoint=None): - # type: (Optional[str], Optional[str], Optional[EndpointV0]) -> None + # type: (Optional[str], Optional[str], Optional[Endpoint_7e4d296f]) -> None """Information about the subscriber. :param subscriber_id: Unique identifier of the subscriber resource. diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_status.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_status.py index 6b814278..e4cbbc52 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_status.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class SubscriberStatus(Enum): INACTIVE = "INACTIVE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SubscriberStatus): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_summary.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_summary.py index 0114d158..63fa0d27 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_summary.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/subscriber_summary.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.development_events.subscriber.endpoint import EndpointV0 - from ask_smapi_model.v0.development_events.subscriber.subscriber_status import SubscriberStatusV0 + from ask_smapi_model.v0.development_events.subscriber.endpoint import Endpoint as Endpoint_7e4d296f + from ask_smapi_model.v0.development_events.subscriber.subscriber_status import SubscriberStatus as SubscriberStatus_9cc1a4de class SubscriberSummary(object): @@ -60,7 +60,7 @@ class SubscriberSummary(object): supports_multiple_types = False def __init__(self, subscriber_id=None, name=None, status=None, client_id=None, endpoint=None): - # type: (Optional[str], Optional[str], Optional[SubscriberStatusV0], Optional[str], Optional[EndpointV0]) -> None + # type: (Optional[str], Optional[str], Optional[SubscriberStatus_9cc1a4de], Optional[str], Optional[Endpoint_7e4d296f]) -> None """ :param subscriber_id: Unique identifier of the subscriber resource. diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/update_subscriber_request.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/update_subscriber_request.py index 17680544..6505332e 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/update_subscriber_request.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscriber/update_subscriber_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.development_events.subscriber.endpoint import EndpointV0 + from ask_smapi_model.v0.development_events.subscriber.endpoint import Endpoint as Endpoint_7e4d296f class UpdateSubscriberRequest(object): @@ -47,7 +47,7 @@ class UpdateSubscriberRequest(object): supports_multiple_types = False def __init__(self, name=None, endpoint=None): - # type: (Optional[str], Optional[EndpointV0]) -> None + # type: (Optional[str], Optional[Endpoint_7e4d296f]) -> None """ :param name: Name of the subscriber. diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/__init__.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/__init__.py index 278ce20d..2a926f96 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/__init__.py @@ -14,9 +14,9 @@ # from __future__ import absolute_import -from .subscription_info import SubscriptionInfo -from .update_subscription_request import UpdateSubscriptionRequest from .list_subscriptions_response import ListSubscriptionsResponse -from .subscription_summary import SubscriptionSummary from .event import Event from .create_subscription_request import CreateSubscriptionRequest +from .subscription_info import SubscriptionInfo +from .update_subscription_request import UpdateSubscriptionRequest +from .subscription_summary import SubscriptionSummary diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/create_subscription_request.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/create_subscription_request.py index 141bf93b..782d8501 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/create_subscription_request.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/create_subscription_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.development_events.subscription.event import EventV0 + from ask_smapi_model.v0.development_events.subscription.event import Event as Event_a93e65dc class CreateSubscriptionRequest(object): @@ -55,7 +55,7 @@ class CreateSubscriptionRequest(object): supports_multiple_types = False def __init__(self, name=None, events=None, vendor_id=None, subscriber_id=None): - # type: (Optional[str], Optional[List[EventV0]], Optional[str], Optional[str]) -> None + # type: (Optional[str], Optional[List[Event_a93e65dc]], Optional[str], Optional[str]) -> None """ :param name: Name of the subscription. diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/event.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/event.py index 6fa0ba1a..752a198a 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/event.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/event.py @@ -21,26 +21,27 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class Event(Enum): """ - Represents an event that the subscriber is interested in. The event is of the format AlexaDevelopmentEvent.OPERATION. You can use wildcard event 'AlexaDevelopmentEvent.All' for recieving all developer notifications listed below. * 'AlexaDevelopmentEvent.ManifestUpdate' - The event representing the status of the update request on the Manifest. * 'AlexaDevelopmentEvent.SkillPublish' - The event representing the status of the skill publish process. * 'AlexaDevelopmentEvent.SkillCertification' - The event represents if a skill has been certified or not. * 'AlexaDevelopmentEvent.InteractionModelUpdate' - The event represents the status of an Interaction Model build for a particular locale. * 'AlexaDevelopmentEvent.All' - A wildcard event name that allows subscription to all the existing events. While using this, you must not specify any other event name. AlexaDevelopmentEvent.All avoids the need of specifying every development event name in order to receive all events pertaining to a vendor account. Similarly, it avoids the need of updating an existing subscription to be able to receive new events, whenever supproted by notification service. Test Subscriber API cannot use this wildcard. Please make sure that your code can gracefully handle new/previously unknown events, if you are using this wildcard. + Represents an event that the subscriber is interested in. The event is of the format EventCategory.OPERATION. You can use wildcard event 'AlexaDevelopmentEvent.All' for recieving all AlexaDevelopmentEvent notifications listed below. We do not support 'AlexaCustomerFeedbackEvent.All' at this point as we only have one event in this category. * 'AlexaDevelopmentEvent.ManifestUpdate' - The event representing the status of the update request on the Manifest. * 'AlexaDevelopmentEvent.SkillPublish' - The event representing the status of the skill publish process. * 'AlexaDevelopmentEvent.SkillCertification' - The event represents if a skill has been certified or not. * 'AlexaDevelopmentEvent.InteractionModelUpdate' - The event represents the status of an Interaction Model build for a particular locale. * 'AlexaDevelopmentEvent.All' - A wildcard event name that allows subscription to all the existing events. While using this, you must not specify any other event name. AlexaDevelopmentEvent.All avoids the need of specifying every development event name in order to receive all events pertaining to a vendor account. Similarly, it avoids the need of updating an existing subscription to be able to receive new events, whenever supproted by notification service. Test Subscriber API cannot use this wildcard. Please make sure that your code can gracefully handle new/previously unknown events, if you are using this wildcard. * 'AlexaCustomerFeedbackEvent.SkillReviewPublish' - The event represents the publishing of a new/updated customer review for a skill on the skill store. - Allowed enum values: [AlexaDevelopmentEvent_ManifestUpdate, AlexaDevelopmentEvent_SkillPublish, AlexaDevelopmentEvent_SkillCertification, AlexaDevelopmentEvent_InteractionModelUpdate, AlexaDevelopmentEvent_All] + Allowed enum values: [AlexaDevelopmentEvent_ManifestUpdate, AlexaDevelopmentEvent_SkillPublish, AlexaDevelopmentEvent_SkillCertification, AlexaDevelopmentEvent_InteractionModelUpdate, AlexaDevelopmentEvent_All, AlexaCustomerFeedbackEvent_SkillReviewPublish] """ AlexaDevelopmentEvent_ManifestUpdate = "AlexaDevelopmentEvent.ManifestUpdate" AlexaDevelopmentEvent_SkillPublish = "AlexaDevelopmentEvent.SkillPublish" AlexaDevelopmentEvent_SkillCertification = "AlexaDevelopmentEvent.SkillCertification" AlexaDevelopmentEvent_InteractionModelUpdate = "AlexaDevelopmentEvent.InteractionModelUpdate" AlexaDevelopmentEvent_All = "AlexaDevelopmentEvent.All" + AlexaCustomerFeedbackEvent_SkillReviewPublish = "AlexaCustomerFeedbackEvent.SkillReviewPublish" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -56,7 +57,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Event): return False @@ -64,6 +65,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/list_subscriptions_response.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/list_subscriptions_response.py index 9c44350b..2f10b2b1 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/list_subscriptions_response.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/list_subscriptions_response.py @@ -21,17 +21,17 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.development_events.subscription.subscription_summary import SubscriptionSummaryV0 - from ask_smapi_model.v0.links import LinksV0 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v0.development_events.subscription.subscription_summary import SubscriptionSummary as SubscriptionSummary_f00dfd49 class ListSubscriptionsResponse(object): """ :param links: - :type links: (optional) ask_smapi_model.v0.links.Links + :type links: (optional) ask_smapi_model.v1.links.Links :param next_token: :type next_token: (optional) str :param subscriptions: List of subscription summaries. @@ -39,7 +39,7 @@ class ListSubscriptionsResponse(object): """ deserialized_types = { - 'links': 'ask_smapi_model.v0.links.Links', + 'links': 'ask_smapi_model.v1.links.Links', 'next_token': 'str', 'subscriptions': 'list[ask_smapi_model.v0.development_events.subscription.subscription_summary.SubscriptionSummary]' } # type: Dict @@ -52,11 +52,11 @@ class ListSubscriptionsResponse(object): supports_multiple_types = False def __init__(self, links=None, next_token=None, subscriptions=None): - # type: (Optional[LinksV0], Optional[str], Optional[List[SubscriptionSummaryV0]]) -> None + # type: (Optional[Links_bc43467b], Optional[str], Optional[List[SubscriptionSummary_f00dfd49]]) -> None """ :param links: - :type links: (optional) ask_smapi_model.v0.links.Links + :type links: (optional) ask_smapi_model.v1.links.Links :param next_token: :type next_token: (optional) str :param subscriptions: List of subscription summaries. diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/subscription_info.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/subscription_info.py index 2f55bddd..11b1870d 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/subscription_info.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/subscription_info.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.development_events.subscription.event import EventV0 + from ask_smapi_model.v0.development_events.subscription.event import Event as Event_a93e65dc class SubscriptionInfo(object): @@ -59,7 +59,7 @@ class SubscriptionInfo(object): supports_multiple_types = False def __init__(self, name=None, subscription_id=None, subscriber_id=None, vendor_id=None, events=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[List[EventV0]]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[List[Event_a93e65dc]]) -> None """ :param name: Name of the subscription. diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/subscription_summary.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/subscription_summary.py index af40dc91..d1e13f96 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/subscription_summary.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/subscription_summary.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.development_events.subscription.event import EventV0 + from ask_smapi_model.v0.development_events.subscription.event import Event as Event_a93e65dc class SubscriptionSummary(object): @@ -59,7 +59,7 @@ class SubscriptionSummary(object): supports_multiple_types = False def __init__(self, name=None, subscription_id=None, subscriber_id=None, vendor_id=None, events=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[List[EventV0]]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[List[Event_a93e65dc]]) -> None """ :param name: Name of the subscription. diff --git a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/update_subscription_request.py b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/update_subscription_request.py index 55570c6a..efbc7aa0 100644 --- a/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/update_subscription_request.py +++ b/ask-smapi-model/ask_smapi_model/v0/development_events/subscription/update_subscription_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.development_events.subscription.event import EventV0 + from ask_smapi_model.v0.development_events.subscription.event import Event as Event_a93e65dc class UpdateSubscriptionRequest(object): @@ -47,7 +47,7 @@ class UpdateSubscriptionRequest(object): supports_multiple_types = False def __init__(self, name=None, events=None): - # type: (Optional[str], Optional[List[EventV0]]) -> None + # type: (Optional[str], Optional[List[Event_a93e65dc]]) -> None """ :param name: Name of the subscription. diff --git a/ask-smapi-model/ask_smapi_model/v0/error.py b/ask-smapi-model/ask_smapi_model/v0/error.py index 7de1f24d..e31fd1cc 100644 --- a/ask-smapi-model/ask_smapi_model/v0/error.py +++ b/ask-smapi-model/ask_smapi_model/v0/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/__init__.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/__init__.py index 35ee70ac..0b65dc05 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/__init__.py @@ -14,11 +14,13 @@ # from __future__ import absolute_import -from .skill_attributes import SkillAttributes from .actor_attributes import ActorAttributes -from .request_status import RequestStatus +from .skill_event_attributes import SkillEventAttributes +from .skill_review_event_attributes import SkillReviewEventAttributes +from .interaction_model_event_attributes import InteractionModelEventAttributes from .subscription_attributes import SubscriptionAttributes from .base_schema import BaseSchema -from .skill_event_attributes import SkillEventAttributes +from .skill_review_attributes import SkillReviewAttributes +from .request_status import RequestStatus from .interaction_model_attributes import InteractionModelAttributes -from .interaction_model_event_attributes import InteractionModelEventAttributes +from .skill_attributes import SkillAttributes diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/actor_attributes.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/actor_attributes.py index 027402ad..baa2addb 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/actor_attributes.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/actor_attributes.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/private/__init__.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_customer_feedback_event/__init__.py similarity index 75% rename from ask-smapi-model/ask_smapi_model/v1/skill/private/__init__.py rename to ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_customer_feedback_event/__init__.py index 378cafdf..a479ba2c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/private/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_customer_feedback_event/__init__.py @@ -14,6 +14,4 @@ # from __future__ import absolute_import -from .accept_status import AcceptStatus -from .private_distribution_account import PrivateDistributionAccount -from .list_private_distribution_accounts_response import ListPrivateDistributionAccountsResponse +from .skill_review_publish import SkillReviewPublish diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_customer_feedback_event/py.typed b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_customer_feedback_event/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_customer_feedback_event/skill_review_publish.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_customer_feedback_event/skill_review_publish.py new file mode 100644 index 00000000..7004f738 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_customer_feedback_event/skill_review_publish.py @@ -0,0 +1,120 @@ +# 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_smapi_model.v0.event_schema.base_schema import BaseSchema + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v0.event_schema.skill_review_event_attributes import SkillReviewEventAttributes as SkillReviewEventAttributes_69f7441f + + +class SkillReviewPublish(BaseSchema): + """ + 'AlexaCustomerFeedbackEvent.SkillReviewPublish' event represents the publishing of a new/updated customer review for a skill. + + + :param timestamp: ISO 8601 timestamp for the instant when event was created. + :type timestamp: (optional) datetime + :param payload: + :type payload: (optional) ask_smapi_model.v0.event_schema.skill_review_event_attributes.SkillReviewEventAttributes + + """ + deserialized_types = { + 'timestamp': 'datetime', + 'event_name': 'str', + 'payload': 'ask_smapi_model.v0.event_schema.skill_review_event_attributes.SkillReviewEventAttributes' + } # type: Dict + + attribute_map = { + 'timestamp': 'timestamp', + 'event_name': 'eventName', + 'payload': 'payload' + } # type: Dict + supports_multiple_types = False + + def __init__(self, timestamp=None, payload=None): + # type: (Optional[datetime], Optional[SkillReviewEventAttributes_69f7441f]) -> None + """'AlexaCustomerFeedbackEvent.SkillReviewPublish' event represents the publishing of a new/updated customer review for a skill. + + :param timestamp: ISO 8601 timestamp for the instant when event was created. + :type timestamp: (optional) datetime + :param payload: + :type payload: (optional) ask_smapi_model.v0.event_schema.skill_review_event_attributes.SkillReviewEventAttributes + """ + self.__discriminator_value = "AlexaCustomerFeedbackEvent.SkillReviewPublish" # type: str + + self.event_name = self.__discriminator_value + super(SkillReviewPublish, self).__init__(timestamp=timestamp, event_name=self.__discriminator_value) + self.payload = payload + + 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, SkillReviewPublish): + 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-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/interaction_model_update.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/interaction_model_update.py index 783fcf13..2ffa08e7 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/interaction_model_update.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/interaction_model_update.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.event_schema.interaction_model_event_attributes import InteractionModelEventAttributesV0 + from ask_smapi_model.v0.event_schema.interaction_model_event_attributes import InteractionModelEventAttributes as InteractionModelEventAttributes_d09fc769 class InteractionModelUpdate(BaseSchema): @@ -56,7 +56,7 @@ class InteractionModelUpdate(BaseSchema): supports_multiple_types = False def __init__(self, timestamp=None, request_id=None, payload=None): - # type: (Optional[datetime], Optional[str], Optional[InteractionModelEventAttributesV0]) -> None + # type: (Optional[datetime], Optional[str], Optional[InteractionModelEventAttributes_d09fc769]) -> None """'AlexaDevelopmentEvent.InteractionModelUpdate' event represents the status of set/update interaction model request. The update request may complete either with `SUCCEEDED` or `FAILED` status. :param timestamp: ISO 8601 timestamp for the instant when event was created. diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/manifest_update.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/manifest_update.py index 55fe4597..6f40747c 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/manifest_update.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/manifest_update.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.event_schema.skill_event_attributes import SkillEventAttributesV0 + from ask_smapi_model.v0.event_schema.skill_event_attributes import SkillEventAttributes as SkillEventAttributes_c0873626 class ManifestUpdate(BaseSchema): @@ -56,7 +56,7 @@ class ManifestUpdate(BaseSchema): supports_multiple_types = False def __init__(self, timestamp=None, request_id=None, payload=None): - # type: (Optional[datetime], Optional[str], Optional[SkillEventAttributesV0]) -> None + # type: (Optional[datetime], Optional[str], Optional[SkillEventAttributes_c0873626]) -> None """'AlexaDevelopmentEvent.ManifestUpdate' event represents the status of the update request on the Manifest. This event is generated when request to create a skill or update an existing skill is completed. The request may complete either with `SUCCEEDED` or `FAILED` status. :param timestamp: ISO 8601 timestamp for the instant when event was created. diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/skill_certification.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/skill_certification.py index 48696eed..a4c405cc 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/skill_certification.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/skill_certification.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.event_schema.skill_event_attributes import SkillEventAttributesV0 + from ask_smapi_model.v0.event_schema.skill_event_attributes import SkillEventAttributes as SkillEventAttributes_c0873626 class SkillCertification(BaseSchema): @@ -56,7 +56,7 @@ class SkillCertification(BaseSchema): supports_multiple_types = False def __init__(self, timestamp=None, request_id=None, payload=None): - # type: (Optional[datetime], Optional[str], Optional[SkillEventAttributesV0]) -> None + # type: (Optional[datetime], Optional[str], Optional[SkillEventAttributes_c0873626]) -> None """'AlexaDevelopmentEvent.SkillCertification' event represents the status of various validations of `certification workflow`. This step may complete either with `SUCCEEDED` or `FAILED` status. :param timestamp: ISO 8601 timestamp for the instant when event was created. diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/skill_publish.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/skill_publish.py index b48e644f..dbbb551f 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/skill_publish.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/alexa_development_event/skill_publish.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.event_schema.skill_event_attributes import SkillEventAttributesV0 + from ask_smapi_model.v0.event_schema.skill_event_attributes import SkillEventAttributes as SkillEventAttributes_c0873626 class SkillPublish(BaseSchema): @@ -56,7 +56,7 @@ class SkillPublish(BaseSchema): supports_multiple_types = False def __init__(self, timestamp=None, request_id=None, payload=None): - # type: (Optional[datetime], Optional[str], Optional[SkillEventAttributesV0]) -> None + # type: (Optional[datetime], Optional[str], Optional[SkillEventAttributes_c0873626]) -> None """'AlexaDevelopmentEvent.SkillPublish' event represents the status of publish to live operation. When a developer submits a skill for certification, it goes through `certification workflow` followed by publish to live workflow. This event is generated in publish workflow and may complete either with `SUCCEEDED` or `FAILED` status. If 'SUCCEEDED', users can see and enable latest version of the skill via Alexa Skill Store. :param timestamp: ISO 8601 timestamp for the instant when event was created. diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/base_schema.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/base_schema.py index 38dd19ce..57dcc600 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/base_schema.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/base_schema.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -43,6 +43,8 @@ class BaseSchema(object): | AlexaDevelopmentEvent.InteractionModelUpdate: :py:class:`ask_smapi_model.v0.event_schema.alexa_development_event.interaction_model_update.InteractionModelUpdate`, | + | AlexaCustomerFeedbackEvent.SkillReviewPublish: :py:class:`ask_smapi_model.v0.event_schema.alexa_customer_feedback_event.skill_review_publish.SkillReviewPublish`, + | | AlexaDevelopmentEvent.SkillPublish: :py:class:`ask_smapi_model.v0.event_schema.alexa_development_event.skill_publish.SkillPublish`, | | AlexaDevelopmentEvent.ManifestUpdate: :py:class:`ask_smapi_model.v0.event_schema.alexa_development_event.manifest_update.ManifestUpdate`, @@ -63,6 +65,7 @@ class BaseSchema(object): discriminator_value_class_map = { 'AlexaDevelopmentEvent.InteractionModelUpdate': 'ask_smapi_model.v0.event_schema.alexa_development_event.interaction_model_update.InteractionModelUpdate', + 'AlexaCustomerFeedbackEvent.SkillReviewPublish': 'ask_smapi_model.v0.event_schema.alexa_customer_feedback_event.skill_review_publish.SkillReviewPublish', 'AlexaDevelopmentEvent.SkillPublish': 'ask_smapi_model.v0.event_schema.alexa_development_event.skill_publish.SkillPublish', 'AlexaDevelopmentEvent.ManifestUpdate': 'ask_smapi_model.v0.event_schema.alexa_development_event.manifest_update.ManifestUpdate', 'AlexaDevelopmentEvent.SkillCertification': 'ask_smapi_model.v0.event_schema.alexa_development_event.skill_certification.SkillCertification' diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/interaction_model_attributes.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/interaction_model_attributes.py index 1efa9725..2924e65a 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/interaction_model_attributes.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/interaction_model_attributes.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,31 +35,38 @@ class InteractionModelAttributes(SkillAttributes): :type skill_id: (optional) str :param vendor_id: Unique identifier of vendor account to which this skill belongs. :type vendor_id: (optional) str + :param locale: Locale of interaction model. + :type locale: (optional) str """ deserialized_types = { 'skill_id': 'str', - 'vendor_id': 'str' + 'vendor_id': 'str', + 'locale': 'str' } # type: Dict attribute_map = { 'skill_id': 'skillId', - 'vendor_id': 'vendorId' + 'vendor_id': 'vendorId', + 'locale': 'locale' } # type: Dict supports_multiple_types = False - def __init__(self, skill_id=None, vendor_id=None): - # type: (Optional[str], Optional[str]) -> None + def __init__(self, skill_id=None, vendor_id=None, locale=None): + # type: (Optional[str], Optional[str], Optional[str]) -> None """Represents a set of attributes specific to interaction model of an Alexa Skill. :param skill_id: Unique identifier of an Alexa skill. :type skill_id: (optional) str :param vendor_id: Unique identifier of vendor account to which this skill belongs. :type vendor_id: (optional) str + :param locale: Locale of interaction model. + :type locale: (optional) str """ self.__discriminator_value = None # type: str super(InteractionModelAttributes, self).__init__(skill_id=skill_id, vendor_id=vendor_id) + self.locale = locale def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/interaction_model_event_attributes.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/interaction_model_event_attributes.py index 4b87b43b..b3b29078 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/interaction_model_event_attributes.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/interaction_model_event_attributes.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.event_schema.subscription_attributes import SubscriptionAttributesV0 - from ask_smapi_model.v0.event_schema.interaction_model_attributes import InteractionModelAttributesV0 - from ask_smapi_model.v0.event_schema.request_status import RequestStatusV0 - from ask_smapi_model.v0.event_schema.actor_attributes import ActorAttributesV0 + from ask_smapi_model.v0.event_schema.request_status import RequestStatus as RequestStatus_8267d453 + from ask_smapi_model.v0.event_schema.actor_attributes import ActorAttributes as ActorAttributes_a2b7ca5d + from ask_smapi_model.v0.event_schema.subscription_attributes import SubscriptionAttributes as SubscriptionAttributes_ee385127 + from ask_smapi_model.v0.event_schema.interaction_model_attributes import InteractionModelAttributes as InteractionModelAttributes_179affa4 class InteractionModelEventAttributes(object): @@ -60,7 +60,7 @@ class InteractionModelEventAttributes(object): supports_multiple_types = False def __init__(self, status=None, actor=None, interaction_model=None, subscription=None): - # type: (Optional[RequestStatusV0], Optional[ActorAttributesV0], Optional[InteractionModelAttributesV0], Optional[SubscriptionAttributesV0]) -> None + # type: (Optional[RequestStatus_8267d453], Optional[ActorAttributes_a2b7ca5d], Optional[InteractionModelAttributes_179affa4], Optional[SubscriptionAttributes_ee385127]) -> None """Interaction model event specific attributes. :param status: diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/request_status.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/request_status.py index 8c0303ee..ac010d87 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/request_status.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/request_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class RequestStatus(Enum): FAILED = "FAILED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, RequestStatus): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_attributes.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_attributes.py index ffb91318..51371ff3 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_attributes.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_attributes.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_event_attributes.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_event_attributes.py index a94954f4..6ae0cf14 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_event_attributes.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_event_attributes.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.event_schema.subscription_attributes import SubscriptionAttributesV0 - from ask_smapi_model.v0.event_schema.request_status import RequestStatusV0 - from ask_smapi_model.v0.event_schema.actor_attributes import ActorAttributesV0 - from ask_smapi_model.v0.event_schema.skill_attributes import SkillAttributesV0 + from ask_smapi_model.v0.event_schema.request_status import RequestStatus as RequestStatus_8267d453 + from ask_smapi_model.v0.event_schema.actor_attributes import ActorAttributes as ActorAttributes_a2b7ca5d + from ask_smapi_model.v0.event_schema.skill_attributes import SkillAttributes as SkillAttributes_416aaddd + from ask_smapi_model.v0.event_schema.subscription_attributes import SubscriptionAttributes as SubscriptionAttributes_ee385127 class SkillEventAttributes(object): @@ -60,7 +60,7 @@ class SkillEventAttributes(object): supports_multiple_types = False def __init__(self, status=None, actor=None, skill=None, subscription=None): - # type: (Optional[RequestStatusV0], Optional[ActorAttributesV0], Optional[SkillAttributesV0], Optional[SubscriptionAttributesV0]) -> None + # type: (Optional[RequestStatus_8267d453], Optional[ActorAttributes_a2b7ca5d], Optional[SkillAttributes_416aaddd], Optional[SubscriptionAttributes_ee385127]) -> None """Skill event specific attributes. :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/get_conflicts_response_result.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_review_attributes.py similarity index 63% rename from ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/get_conflicts_response_result.py rename to ask-smapi-model/ask_smapi_model/v0/event_schema/skill_review_attributes.py index 0d7cc982..28d9652f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/get_conflicts_response_result.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_review_attributes.py @@ -21,44 +21,52 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_result import ConflictResultV1 -class GetConflictsResponseResult(object): +class SkillReviewAttributes(object): """ + Represents attributes of a customer review for a skill. - :param conflicting_utterance: Utterance resolved from sample utterance that causes conflicts among different intents. - :type conflicting_utterance: (optional) str - :param conflicts: - :type conflicts: (optional) list[ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_result.ConflictResult] + + :param review_id: Unique review id associated with a customer review for a skill. + :type review_id: (optional) str + :param url: Link to the customer review on Amazon retail website. + :type url: (optional) str + :param star_rating: StarRating provided by the customer in the review. It is always a natural number from 1 to 5 (inclusive of 1 and 5). + :type star_rating: (optional) str """ deserialized_types = { - 'conflicting_utterance': 'str', - 'conflicts': 'list[ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_result.ConflictResult]' + 'review_id': 'str', + 'url': 'str', + 'star_rating': 'str' } # type: Dict attribute_map = { - 'conflicting_utterance': 'conflictingUtterance', - 'conflicts': 'conflicts' + 'review_id': 'reviewId', + 'url': 'url', + 'star_rating': 'starRating' } # type: Dict supports_multiple_types = False - def __init__(self, conflicting_utterance=None, conflicts=None): - # type: (Optional[str], Optional[List[ConflictResultV1]]) -> None - """ + def __init__(self, review_id=None, url=None, star_rating=None): + # type: (Optional[str], Optional[str], Optional[str]) -> None + """Represents attributes of a customer review for a skill. - :param conflicting_utterance: Utterance resolved from sample utterance that causes conflicts among different intents. - :type conflicting_utterance: (optional) str - :param conflicts: - :type conflicts: (optional) list[ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_result.ConflictResult] + :param review_id: Unique review id associated with a customer review for a skill. + :type review_id: (optional) str + :param url: Link to the customer review on Amazon retail website. + :type url: (optional) str + :param star_rating: StarRating provided by the customer in the review. It is always a natural number from 1 to 5 (inclusive of 1 and 5). + :type star_rating: (optional) str """ self.__discriminator_value = None # type: str - self.conflicting_utterance = conflicting_utterance - self.conflicts = conflicts + self.review_id = review_id + self.url = url + self.star_rating = star_rating def to_dict(self): # type: () -> Dict[str, object] @@ -103,7 +111,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, GetConflictsResponseResult): + if not isinstance(other, SkillReviewAttributes): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_review_event_attributes.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_review_event_attributes.py new file mode 100644 index 00000000..03fc37cb --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/skill_review_event_attributes.py @@ -0,0 +1,125 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v0.event_schema.skill_review_attributes import SkillReviewAttributes as SkillReviewAttributes_a54ff44 + from ask_smapi_model.v0.event_schema.skill_attributes import SkillAttributes as SkillAttributes_416aaddd + from ask_smapi_model.v0.event_schema.subscription_attributes import SubscriptionAttributes as SubscriptionAttributes_ee385127 + + +class SkillReviewEventAttributes(object): + """ + Skill Review by customer event specific attributes. + + + :param skill: + :type skill: (optional) ask_smapi_model.v0.event_schema.skill_attributes.SkillAttributes + :param subscription: + :type subscription: (optional) ask_smapi_model.v0.event_schema.subscription_attributes.SubscriptionAttributes + :param review: + :type review: (optional) ask_smapi_model.v0.event_schema.skill_review_attributes.SkillReviewAttributes + + """ + deserialized_types = { + 'skill': 'ask_smapi_model.v0.event_schema.skill_attributes.SkillAttributes', + 'subscription': 'ask_smapi_model.v0.event_schema.subscription_attributes.SubscriptionAttributes', + 'review': 'ask_smapi_model.v0.event_schema.skill_review_attributes.SkillReviewAttributes' + } # type: Dict + + attribute_map = { + 'skill': 'skill', + 'subscription': 'subscription', + 'review': 'review' + } # type: Dict + supports_multiple_types = False + + def __init__(self, skill=None, subscription=None, review=None): + # type: (Optional[SkillAttributes_416aaddd], Optional[SubscriptionAttributes_ee385127], Optional[SkillReviewAttributes_a54ff44]) -> None + """Skill Review by customer event specific attributes. + + :param skill: + :type skill: (optional) ask_smapi_model.v0.event_schema.skill_attributes.SkillAttributes + :param subscription: + :type subscription: (optional) ask_smapi_model.v0.event_schema.subscription_attributes.SubscriptionAttributes + :param review: + :type review: (optional) ask_smapi_model.v0.event_schema.skill_review_attributes.SkillReviewAttributes + """ + self.__discriminator_value = None # type: str + + self.skill = skill + self.subscription = subscription + self.review = review + + 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, SkillReviewEventAttributes): + 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-smapi-model/ask_smapi_model/v0/event_schema/subscription_attributes.py b/ask-smapi-model/ask_smapi_model/v0/event_schema/subscription_attributes.py index 3a90178c..24397175 100644 --- a/ask-smapi-model/ask_smapi_model/v0/event_schema/subscription_attributes.py +++ b/ask-smapi-model/ask_smapi_model/v0/event_schema/subscription_attributes.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/__init__.py b/ask-smapi-model/ask_smapi_model/v1/__init__.py index b889b8c4..5c3dc387 100644 --- a/ask-smapi-model/ask_smapi_model/v1/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/__init__.py @@ -14,9 +14,9 @@ # from __future__ import absolute_import -from .stage_type import StageType +from .link import Link from .bad_request_error import BadRequestError from .error import Error -from .link import Link -from .stage_v2_type import StageV2Type from .links import Links +from .stage_type import StageType +from .stage_v2_type import StageV2Type diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/__init__.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/__init__.py index 8032119d..93f020fd 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/__init__.py @@ -14,20 +14,20 @@ # from __future__ import absolute_import -from .client import Client -from .requester_filter import RequesterFilter -from .sort_field import SortField -from .resource import Resource -from .request_pagination_context import RequestPaginationContext -from .resource_filter import ResourceFilter -from .sort_direction import SortDirection +from .requester import Requester from .request_filters import RequestFilters -from .operation_filter import OperationFilter -from .audit_log import AuditLog -from .audit_logs_request import AuditLogsRequest +from .sort_direction import SortDirection from .client_filter import ClientFilter -from .resource_type_enum import ResourceTypeEnum -from .requester import Requester -from .response_pagination_context import ResponsePaginationContext +from .resource import Resource from .audit_logs_response import AuditLogsResponse +from .requester_filter import RequesterFilter +from .resource_filter import ResourceFilter +from .sort_field import SortField +from .client import Client +from .response_pagination_context import ResponsePaginationContext +from .resource_type_enum import ResourceTypeEnum +from .operation_filter import OperationFilter +from .request_pagination_context import RequestPaginationContext from .operation import Operation +from .audit_logs_request import AuditLogsRequest +from .audit_log import AuditLog diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_log.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_log.py index b43dbd29..456f1469 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_log.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_log.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.audit_logs.operation import OperationV1 - from ask_smapi_model.v1.audit_logs.resource import ResourceV1 - from ask_smapi_model.v1.audit_logs.requester import RequesterV1 - from ask_smapi_model.v1.audit_logs.client import ClientV1 + from ask_smapi_model.v1.audit_logs.operation import Operation as Operation_7cffbee + from ask_smapi_model.v1.audit_logs.resource import Resource as Resource_1b84fbfc + from ask_smapi_model.v1.audit_logs.requester import Requester as Requester_fd4ba9d8 + from ask_smapi_model.v1.audit_logs.client import Client as Client_2d5ce45c class AuditLog(object): @@ -70,7 +70,7 @@ class AuditLog(object): supports_multiple_types = False def __init__(self, x_amzn_request_id=None, timestamp=None, client=None, operation=None, resources=None, requester=None, http_response_code=None): - # type: (Optional[str], Optional[datetime], Optional[ClientV1], Optional[OperationV1], Optional[List[ResourceV1]], Optional[RequesterV1], Optional[int]) -> None + # type: (Optional[str], Optional[datetime], Optional[Client_2d5ce45c], Optional[Operation_7cffbee], Optional[List[Resource_1b84fbfc]], Optional[Requester_fd4ba9d8], Optional[int]) -> None """ :param x_amzn_request_id: UUID that identifies a specific request. diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_logs_request.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_logs_request.py index 6282f7c4..653daae3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_logs_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_logs_request.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.audit_logs.sort_field import SortFieldV1 - from ask_smapi_model.v1.audit_logs.request_pagination_context import RequestPaginationContextV1 - from ask_smapi_model.v1.audit_logs.sort_direction import SortDirectionV1 - from ask_smapi_model.v1.audit_logs.request_filters import RequestFiltersV1 + from ask_smapi_model.v1.audit_logs.sort_direction import SortDirection as SortDirection_d727b4e3 + from ask_smapi_model.v1.audit_logs.request_pagination_context import RequestPaginationContext as RequestPaginationContext_6159de28 + from ask_smapi_model.v1.audit_logs.request_filters import RequestFilters as RequestFilters_c18c9d61 + from ask_smapi_model.v1.audit_logs.sort_field import SortField as SortField_9dd89c99 class AuditLogsRequest(object): @@ -62,7 +62,7 @@ class AuditLogsRequest(object): supports_multiple_types = False def __init__(self, vendor_id=None, request_filters=None, sort_direction=None, sort_field=None, pagination_context=None): - # type: (Optional[str], Optional[RequestFiltersV1], Optional[SortDirectionV1], Optional[SortFieldV1], Optional[RequestPaginationContextV1]) -> None + # type: (Optional[str], Optional[RequestFilters_c18c9d61], Optional[SortDirection_d727b4e3], Optional[SortField_9dd89c99], Optional[RequestPaginationContext_6159de28]) -> None """ :param vendor_id: Vendor Id. See developer.amazon.com/mycid.html. diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_logs_response.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_logs_response.py index 77a9db6f..69d39fc4 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_logs_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/audit_logs_response.py @@ -21,10 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.audit_logs.audit_log import AuditLogV1 - from ask_smapi_model.v1.audit_logs.response_pagination_context import ResponsePaginationContextV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.audit_logs.response_pagination_context import ResponsePaginationContext as ResponsePaginationContext_ed91c19c + from ask_smapi_model.v1.audit_logs.audit_log import AuditLog as AuditLog_c55d4ea9 class AuditLogsResponse(object): @@ -34,33 +35,40 @@ class AuditLogsResponse(object): :param pagination_context: :type pagination_context: (optional) ask_smapi_model.v1.audit_logs.response_pagination_context.ResponsePaginationContext + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links :param audit_logs: List of audit logs for the vendor. :type audit_logs: (optional) list[ask_smapi_model.v1.audit_logs.audit_log.AuditLog] """ deserialized_types = { 'pagination_context': 'ask_smapi_model.v1.audit_logs.response_pagination_context.ResponsePaginationContext', + 'links': 'ask_smapi_model.v1.links.Links', 'audit_logs': 'list[ask_smapi_model.v1.audit_logs.audit_log.AuditLog]' } # type: Dict attribute_map = { 'pagination_context': 'paginationContext', + 'links': '_links', 'audit_logs': 'auditLogs' } # type: Dict supports_multiple_types = False - def __init__(self, pagination_context=None, audit_logs=None): - # type: (Optional[ResponsePaginationContextV1], Optional[List[AuditLogV1]]) -> None + def __init__(self, pagination_context=None, links=None, audit_logs=None): + # type: (Optional[ResponsePaginationContext_ed91c19c], Optional[Links_bc43467b], Optional[List[AuditLog_c55d4ea9]]) -> None """Response to the Query Audit Logs API. It contains the collection of audit logs for the vendor, nextToken and other metadata related to the search query. :param pagination_context: :type pagination_context: (optional) ask_smapi_model.v1.audit_logs.response_pagination_context.ResponsePaginationContext + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links :param audit_logs: List of audit logs for the vendor. :type audit_logs: (optional) list[ask_smapi_model.v1.audit_logs.audit_log.AuditLog] """ self.__discriminator_value = None # type: str self.pagination_context = pagination_context + self.links = links self.audit_logs = audit_logs def to_dict(self): diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/client.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/client.py index 31300654..c62e4fa4 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/client.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/client.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/client_filter.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/client_filter.py index e7863133..7b8af634 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/client_filter.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/client_filter.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/operation.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/operation.py index 59abb81d..ff5aa97a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/operation.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/operation.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/operation_filter.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/operation_filter.py index 69194c26..d3953105 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/operation_filter.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/operation_filter.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/request_filters.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/request_filters.py index 4a109c32..75d650d6 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/request_filters.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/request_filters.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.audit_logs.resource_filter import ResourceFilterV1 - from ask_smapi_model.v1.audit_logs.client_filter import ClientFilterV1 - from ask_smapi_model.v1.audit_logs.operation_filter import OperationFilterV1 - from ask_smapi_model.v1.audit_logs.requester_filter import RequesterFilterV1 + from ask_smapi_model.v1.audit_logs.operation_filter import OperationFilter as OperationFilter_65f5ab53 + from ask_smapi_model.v1.audit_logs.client_filter import ClientFilter as ClientFilter_f8370157 + from ask_smapi_model.v1.audit_logs.requester_filter import RequesterFilter as RequesterFilter_22457ff3 + from ask_smapi_model.v1.audit_logs.resource_filter import ResourceFilter as ResourceFilter_ca75dd class RequestFilters(object): @@ -72,7 +72,7 @@ class RequestFilters(object): supports_multiple_types = False def __init__(self, clients=None, operations=None, resources=None, requesters=None, start_time=None, end_time=None, http_response_codes=None): - # type: (Optional[List[ClientFilterV1]], Optional[List[OperationFilterV1]], Optional[List[ResourceFilterV1]], Optional[List[RequesterFilterV1]], Optional[datetime], Optional[datetime], Optional[List[object]]) -> None + # type: (Optional[List[ClientFilter_f8370157]], Optional[List[OperationFilter_65f5ab53]], Optional[List[ResourceFilter_ca75dd]], Optional[List[RequesterFilter_22457ff3]], Optional[datetime], Optional[datetime], Optional[List[object]]) -> None """Request Filters for filtering audit logs. :param clients: List of Client IDs for filtering. diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/request_pagination_context.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/request_pagination_context.py index 78edd5a2..5c52507f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/request_pagination_context.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/request_pagination_context.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -33,12 +33,12 @@ class RequestPaginationContext(object): :param next_token: When the response to this API call is truncated, the response includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that this API understands. Token has expiry of 1 hour. :type next_token: (optional) str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve more or less than the default of 50 results, you can add this parameter to your request. maxResults can exceed the upper limit of 250 but we will not return more items than that. The response might contain fewer results than maxResults for purpose of keeping SLA or because there are not enough items, but it will never contain more. - :type max_results: (optional) float + :type max_results: (optional) int """ deserialized_types = { 'next_token': 'str', - 'max_results': 'float' + 'max_results': 'int' } # type: Dict attribute_map = { @@ -48,13 +48,13 @@ class RequestPaginationContext(object): supports_multiple_types = False def __init__(self, next_token=None, max_results=None): - # type: (Optional[str], Optional[float]) -> None + # type: (Optional[str], Optional[int]) -> None """This object includes nextToken and maxResults. :param next_token: When the response to this API call is truncated, the response includes the nextToken element. The value of nextToken can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that this API understands. Token has expiry of 1 hour. :type next_token: (optional) str :param max_results: Sets the maximum number of results returned in the response body. If you want to retrieve more or less than the default of 50 results, you can add this parameter to your request. maxResults can exceed the upper limit of 250 but we will not return more items than that. The response might contain fewer results than maxResults for purpose of keeping SLA or because there are not enough items, but it will never contain more. - :type max_results: (optional) float + :type max_results: (optional) int """ self.__discriminator_value = None # type: str diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/requester.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/requester.py index 3b921c69..6b510543 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/requester.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/requester.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/requester_filter.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/requester_filter.py index 4ceed6ee..679ea01d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/requester_filter.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/requester_filter.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource.py index 913f874a..188fdbb3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource_filter.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource_filter.py index 3ceb4550..afc8d92c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource_filter.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource_filter.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.audit_logs.resource_type_enum import ResourceTypeEnumV1 + from ask_smapi_model.v1.audit_logs.resource_type_enum import ResourceTypeEnum as ResourceTypeEnum_fbeff4f0 class ResourceFilter(object): @@ -49,7 +49,7 @@ class ResourceFilter(object): supports_multiple_types = False def __init__(self, id=None, object_type=None): - # type: (Optional[str], Optional[ResourceTypeEnumV1]) -> None + # type: (Optional[str], Optional[ResourceTypeEnum_fbeff4f0]) -> None """Resource that the developer operated on. Both do not need to be provided. :param id: diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource_type_enum.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource_type_enum.py index 7cbbb106..5a6242cd 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource_type_enum.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/resource_type_enum.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ResourceTypeEnum(Enum): Export = "Export" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ResourceTypeEnum): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/response_pagination_context.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/response_pagination_context.py index 9e3fd9c9..0f3097ae 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/response_pagination_context.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/response_pagination_context.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/sort_direction.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/sort_direction.py index f9e81511..f633e33c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/sort_direction.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/sort_direction.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class SortDirection(Enum): DESC = "DESC" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SortDirection): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/audit_logs/sort_field.py b/ask-smapi-model/ask_smapi_model/v1/audit_logs/sort_field.py index a7fdb225..9fcf41dc 100644 --- a/ask-smapi-model/ask_smapi_model/v1/audit_logs/sort_field.py +++ b/ask-smapi-model/ask_smapi_model/v1/audit_logs/sort_field.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -42,7 +42,7 @@ class SortField(Enum): httpResponseCode = "httpResponseCode" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -58,7 +58,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SortField): return False @@ -66,6 +66,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/bad_request_error.py b/ask-smapi-model/ask_smapi_model/v1/bad_request_error.py index c97b811b..cabf2c4e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/bad_request_error.py +++ b/ask-smapi-model/ask_smapi_model/v1/bad_request_error.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.error import ErrorV1 + from ask_smapi_model.v1.error import Error as Error_fbe913d9 class BadRequestError(object): @@ -47,7 +47,7 @@ class BadRequestError(object): supports_multiple_types = False def __init__(self, message=None, violations=None): - # type: (Optional[str], Optional[List[ErrorV1]]) -> None + # type: (Optional[str], Optional[List[Error_fbe913d9]]) -> None """ :param message: Human readable description of error. diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/__init__.py b/ask-smapi-model/ask_smapi_model/v1/catalog/__init__.py index cc9dfa74..a051feb3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/__init__.py @@ -14,6 +14,6 @@ # from __future__ import absolute_import -from .presigned_upload_part_items import PresignedUploadPartItems from .create_content_upload_url_request import CreateContentUploadUrlRequest from .create_content_upload_url_response import CreateContentUploadUrlResponse +from .presigned_upload_part_items import PresignedUploadPartItems diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/create_content_upload_url_request.py b/ask-smapi-model/ask_smapi_model/v1/catalog/create_content_upload_url_request.py index 402482d0..89b9bfa5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/create_content_upload_url_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/create_content_upload_url_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/create_content_upload_url_response.py b/ask-smapi-model/ask_smapi_model/v1/catalog/create_content_upload_url_response.py index baad7e61..9c4e0fc1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/create_content_upload_url_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/create_content_upload_url_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.catalog.presigned_upload_part_items import PresignedUploadPartItemsV1 + from ask_smapi_model.v1.catalog.presigned_upload_part_items import PresignedUploadPartItems as PresignedUploadPartItems_81cf2d27 class CreateContentUploadUrlResponse(object): @@ -31,34 +31,34 @@ class CreateContentUploadUrlResponse(object): :param url_id: Unique identifier for collection of generated urls. :type url_id: (optional) str - :param pre_signed_upload_parts: Ordered list of presigned upload parts to perform a partitioned (multipart) file upload - :type pre_signed_upload_parts: (optional) list[ask_smapi_model.v1.catalog.presigned_upload_part_items.PresignedUploadPartItems] + :param presigned_upload_parts: Ordered list of presigned upload parts to perform a partitioned (multipart) file upload + :type presigned_upload_parts: (optional) list[ask_smapi_model.v1.catalog.presigned_upload_part_items.PresignedUploadPartItems] """ deserialized_types = { 'url_id': 'str', - 'pre_signed_upload_parts': 'list[ask_smapi_model.v1.catalog.presigned_upload_part_items.PresignedUploadPartItems]' + 'presigned_upload_parts': 'list[ask_smapi_model.v1.catalog.presigned_upload_part_items.PresignedUploadPartItems]' } # type: Dict attribute_map = { 'url_id': 'urlId', - 'pre_signed_upload_parts': 'preSignedUploadParts' + 'presigned_upload_parts': 'presignedUploadParts' } # type: Dict supports_multiple_types = False - def __init__(self, url_id=None, pre_signed_upload_parts=None): - # type: (Optional[str], Optional[List[PresignedUploadPartItemsV1]]) -> None + def __init__(self, url_id=None, presigned_upload_parts=None): + # type: (Optional[str], Optional[List[PresignedUploadPartItems_81cf2d27]]) -> None """ :param url_id: Unique identifier for collection of generated urls. :type url_id: (optional) str - :param pre_signed_upload_parts: Ordered list of presigned upload parts to perform a partitioned (multipart) file upload - :type pre_signed_upload_parts: (optional) list[ask_smapi_model.v1.catalog.presigned_upload_part_items.PresignedUploadPartItems] + :param presigned_upload_parts: Ordered list of presigned upload parts to perform a partitioned (multipart) file upload + :type presigned_upload_parts: (optional) list[ask_smapi_model.v1.catalog.presigned_upload_part_items.PresignedUploadPartItems] """ self.__discriminator_value = None # type: str self.url_id = url_id - self.pre_signed_upload_parts = pre_signed_upload_parts + self.presigned_upload_parts = presigned_upload_parts def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/presigned_upload_part_items.py b/ask-smapi-model/ask_smapi_model/v1/catalog/presigned_upload_part_items.py index d3dcb42e..aae81f0c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/presigned_upload_part_items.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/presigned_upload_part_items.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/__init__.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/__init__.py index e77f93ad..6a0e7bd1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/__init__.py @@ -14,14 +14,14 @@ # from __future__ import absolute_import +from .ingestion_status import IngestionStatus from .pre_signed_url import PreSignedUrl -from .get_content_upload_response import GetContentUploadResponse -from .catalog_upload_base import CatalogUploadBase +from .upload_ingestion_step import UploadIngestionStep from .file_upload_status import FileUploadStatus -from .content_upload_file_summary import ContentUploadFileSummary -from .location import Location from .upload_status import UploadStatus -from .ingestion_status import IngestionStatus -from .upload_ingestion_step import UploadIngestionStep +from .catalog_upload_base import CatalogUploadBase from .pre_signed_url_item import PreSignedUrlItem +from .content_upload_file_summary import ContentUploadFileSummary from .ingestion_step_name import IngestionStepName +from .location import Location +from .get_content_upload_response import GetContentUploadResponse diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/catalog_upload_base.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/catalog_upload_base.py index 31a7d965..84047887 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/catalog_upload_base.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/catalog_upload_base.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/content_upload_file_summary.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/content_upload_file_summary.py index c7c550ba..8e7ee272 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/content_upload_file_summary.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/content_upload_file_summary.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.catalog.upload.file_upload_status import FileUploadStatusV1 + from ask_smapi_model.v1.catalog.upload.file_upload_status import FileUploadStatus as FileUploadStatus_e5a3f0c1 class ContentUploadFileSummary(object): @@ -51,7 +51,7 @@ class ContentUploadFileSummary(object): supports_multiple_types = False def __init__(self, download_url=None, expires_at=None, status=None): - # type: (Optional[str], Optional[datetime], Optional[FileUploadStatusV1]) -> None + # type: (Optional[str], Optional[datetime], Optional[FileUploadStatus_e5a3f0c1]) -> None """ :param download_url: If the file is available for download, downloadUrl can be used to download the file. diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/file_upload_status.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/file_upload_status.py index 54e4fdc0..6d28ceeb 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/file_upload_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/file_upload_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class FileUploadStatus(Enum): UNAVAILABLE = "UNAVAILABLE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, FileUploadStatus): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/get_content_upload_response.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/get_content_upload_response.py index b841cc3e..29bca890 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/get_content_upload_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/get_content_upload_response.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.catalog.upload.upload_status import UploadStatusV1 - from ask_smapi_model.v1.catalog.upload.content_upload_file_summary import ContentUploadFileSummaryV1 - from ask_smapi_model.v1.catalog.upload.upload_ingestion_step import UploadIngestionStepV1 + from ask_smapi_model.v1.catalog.upload.upload_ingestion_step import UploadIngestionStep as UploadIngestionStep_ba905697 + from ask_smapi_model.v1.catalog.upload.upload_status import UploadStatus as UploadStatus_f27ab940 + from ask_smapi_model.v1.catalog.upload.content_upload_file_summary import ContentUploadFileSummary as ContentUploadFileSummary_69b0be32 class GetContentUploadResponse(object): @@ -69,7 +69,7 @@ class GetContentUploadResponse(object): supports_multiple_types = False def __init__(self, id=None, catalog_id=None, status=None, created_date=None, last_updated_date=None, file=None, ingestion_steps=None): - # type: (Optional[str], Optional[str], Optional[UploadStatusV1], Optional[datetime], Optional[datetime], Optional[ContentUploadFileSummaryV1], Optional[List[UploadIngestionStepV1]]) -> None + # type: (Optional[str], Optional[str], Optional[UploadStatus_f27ab940], Optional[datetime], Optional[datetime], Optional[ContentUploadFileSummary_69b0be32], Optional[List[UploadIngestionStep_ba905697]]) -> None """ :param id: Unique identifier of the upload diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_status.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_status.py index ae466972..14b4823c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class IngestionStatus(Enum): CANCELLED = "CANCELLED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, IngestionStatus): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_step_name.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_step_name.py index 9cc1f9e9..c7890b8b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_step_name.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_step_name.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,7 +35,7 @@ class IngestionStepName(Enum): SCHEMA_VALIDATION = "SCHEMA_VALIDATION" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -51,7 +51,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, IngestionStepName): return False @@ -59,6 +59,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/location.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/location.py index 5acec8d4..eea1e56a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/location.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/location.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url.py index d8fc17fb..e2771765 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.catalog.upload.pre_signed_url_item import PreSignedUrlItemV1 + from ask_smapi_model.v1.catalog.upload.pre_signed_url_item import PreSignedUrlItem as PreSignedUrlItem_843825d6 class PreSignedUrl(CatalogUploadBase): @@ -50,7 +50,7 @@ class PreSignedUrl(CatalogUploadBase): supports_multiple_types = False def __init__(self, url_id=None, part_e_tags=None): - # type: (Optional[str], Optional[List[PreSignedUrlItemV1]]) -> None + # type: (Optional[str], Optional[List[PreSignedUrlItem_843825d6]]) -> None """Request body for self-hosted catalog uploads :param url_id: Unique identifier for urls diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url_item.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url_item.py index d467a9f6..b7402bc0 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url_item.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url_item.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/upload_ingestion_step.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/upload_ingestion_step.py index 88f10a18..1d3ebf6c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/upload_ingestion_step.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/upload_ingestion_step.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.catalog.upload.ingestion_status import IngestionStatusV1 - from ask_smapi_model.v1.catalog.upload.ingestion_step_name import IngestionStepNameV1 - from ask_smapi_model.v1.error import ErrorV1 + from ask_smapi_model.v1.catalog.upload.ingestion_status import IngestionStatus as IngestionStatus_2a9abce4 + from ask_smapi_model.v1.catalog.upload.ingestion_step_name import IngestionStepName as IngestionStepName_68c61441 + from ask_smapi_model.v1.error import Error as Error_fbe913d9 class UploadIngestionStep(object): @@ -59,7 +59,7 @@ class UploadIngestionStep(object): supports_multiple_types = False def __init__(self, name=None, status=None, log_url=None, violations=None): - # type: (Optional[IngestionStepNameV1], Optional[IngestionStatusV1], Optional[str], Optional[List[ErrorV1]]) -> None + # type: (Optional[IngestionStepName_68c61441], Optional[IngestionStatus_2a9abce4], Optional[str], Optional[List[Error_fbe913d9]]) -> None """Represents a single step in the multi-step ingestion process of a new upload. :param name: diff --git a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/upload_status.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/upload_status.py index b64b4143..a9aa07ff 100644 --- a/ask-smapi-model/ask_smapi_model/v1/catalog/upload/upload_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/upload_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class UploadStatus(Enum): SUCCEEDED = "SUCCEEDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, UploadStatus): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/error.py b/ask-smapi-model/ask_smapi_model/v1/error.py index a7d162a0..a942904d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/error.py +++ b/ask-smapi-model/ask_smapi_model/v1/error.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/__init__.py b/ask-smapi-model/ask_smapi_model/v1/isp/__init__.py index 7bbe5cbb..418f4bd3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/__init__.py @@ -14,34 +14,34 @@ # from __future__ import absolute_import +from .create_in_skill_product_request import CreateInSkillProductRequest +from .custom_product_prompts import CustomProductPrompts +from .summary_marketplace_pricing import SummaryMarketplacePricing +from .list_in_skill_product import ListInSkillProduct +from .promotable_state import PromotableState +from .subscription_payment_frequency import SubscriptionPaymentFrequency +from .in_skill_product_definition import InSkillProductDefinition +from .isp_summary_links import IspSummaryLinks +from .marketplace_pricing import MarketplacePricing +from .tax_information import TaxInformation from .editable_state import EditableState -from .in_skill_product_summary_response import InSkillProductSummaryResponse from .update_in_skill_product_request import UpdateInSkillProductRequest -from .product_type import ProductType -from .currency import Currency from .associated_skill_response import AssociatedSkillResponse -from .tax_information import TaxInformation -from .stage import Stage -from .summary_price_listing import SummaryPriceListing -from .localized_publishing_information import LocalizedPublishingInformation -from .in_skill_product_definition import InSkillProductDefinition -from .create_in_skill_product_request import CreateInSkillProductRequest -from .subscription_information import SubscriptionInformation -from .subscription_payment_frequency import SubscriptionPaymentFrequency +from .list_in_skill_product_response import ListInSkillProductResponse +from .price_listing import PriceListing from .product_response import ProductResponse +from .in_skill_product_summary_response import InSkillProductSummaryResponse +from .currency import Currency from .distribution_countries import DistributionCountries -from .in_skill_product_summary import InSkillProductSummary -from .tax_information_category import TaxInformationCategory -from .status import Status -from .price_listing import PriceListing -from .purchasable_state import PurchasableState from .privacy_and_compliance import PrivacyAndCompliance -from .localized_privacy_and_compliance import LocalizedPrivacyAndCompliance -from .summary_marketplace_pricing import SummaryMarketplacePricing -from .marketplace_pricing import MarketplacePricing -from .list_in_skill_product_response import ListInSkillProductResponse -from .custom_product_prompts import CustomProductPrompts -from .isp_summary_links import IspSummaryLinks -from .list_in_skill_product import ListInSkillProduct +from .localized_publishing_information import LocalizedPublishingInformation from .in_skill_product_definition_response import InSkillProductDefinitionResponse +from .product_type import ProductType +from .tax_information_category import TaxInformationCategory +from .subscription_information import SubscriptionInformation from .publishing_information import PublishingInformation +from .summary_price_listing import SummaryPriceListing +from .purchasable_state import PurchasableState +from .status import Status +from .in_skill_product_summary import InSkillProductSummary +from .localized_privacy_and_compliance import LocalizedPrivacyAndCompliance diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/associated_skill_response.py b/ask-smapi-model/ask_smapi_model/v1/isp/associated_skill_response.py index fc6abd5b..c069ad4e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/associated_skill_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/associated_skill_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b class AssociatedSkillResponse(object): @@ -57,7 +57,7 @@ class AssociatedSkillResponse(object): supports_multiple_types = False def __init__(self, associated_skill_ids=None, links=None, is_truncated=None, next_token=None): - # type: (Optional[List[object]], Optional[LinksV1], Optional[bool], Optional[str]) -> None + # type: (Optional[List[object]], Optional[Links_bc43467b], Optional[bool], Optional[str]) -> None """In-skill product skill association details. :param associated_skill_ids: List of skill IDs that correspond to the skills associated with the in-skill product. The associations are stage specific. A live association is created through successful skill certification. diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/create_in_skill_product_request.py b/ask-smapi-model/ask_smapi_model/v1/isp/create_in_skill_product_request.py index 27635197..2490a79e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/create_in_skill_product_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/create_in_skill_product_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.in_skill_product_definition import InSkillProductDefinitionV1 + from ask_smapi_model.v1.isp.in_skill_product_definition import InSkillProductDefinition as InSkillProductDefinition_20ce10ca class CreateInSkillProductRequest(object): @@ -47,7 +47,7 @@ class CreateInSkillProductRequest(object): supports_multiple_types = False def __init__(self, vendor_id=None, in_skill_product_definition=None): - # type: (Optional[str], Optional[InSkillProductDefinitionV1]) -> None + # type: (Optional[str], Optional[InSkillProductDefinition_20ce10ca]) -> None """ :param vendor_id: ID of the vendor owning the in-skill product. diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/currency.py b/ask-smapi-model/ask_smapi_model/v1/isp/currency.py index 9a49ca44..8b51540e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/currency.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/currency.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class Currency(Enum): JPY = "JPY" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Currency): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/custom_product_prompts.py b/ask-smapi-model/ask_smapi_model/v1/isp/custom_product_prompts.py index f96b8f12..08f5c49b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/custom_product_prompts.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/custom_product_prompts.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -32,34 +32,34 @@ class CustomProductPrompts(object): :param purchase_prompt_description: Description of in-skill product heard before customer is prompted for purchase. :type purchase_prompt_description: (optional) str - :param bought_confirmation_prompt: Confirmation of in-skill product purchase. - :type bought_confirmation_prompt: (optional) str + :param bought_card_description: A description of the product that displays on the skill card in the Alexa app. + :type bought_card_description: (optional) str """ deserialized_types = { 'purchase_prompt_description': 'str', - 'bought_confirmation_prompt': 'str' + 'bought_card_description': 'str' } # type: Dict attribute_map = { 'purchase_prompt_description': 'purchasePromptDescription', - 'bought_confirmation_prompt': 'boughtConfirmationPrompt' + 'bought_card_description': 'boughtCardDescription' } # type: Dict supports_multiple_types = False - def __init__(self, purchase_prompt_description=None, bought_confirmation_prompt=None): + def __init__(self, purchase_prompt_description=None, bought_card_description=None): # type: (Optional[str], Optional[str]) -> None """Custom prompts used for in-skill product purchasing options. Supports Speech Synthesis Markup Language (SSML), which can be used to control pronunciation, intonation, timing, and emotion. :param purchase_prompt_description: Description of in-skill product heard before customer is prompted for purchase. :type purchase_prompt_description: (optional) str - :param bought_confirmation_prompt: Confirmation of in-skill product purchase. - :type bought_confirmation_prompt: (optional) str + :param bought_card_description: A description of the product that displays on the skill card in the Alexa app. + :type bought_card_description: (optional) str """ self.__discriminator_value = None # type: str self.purchase_prompt_description = purchase_prompt_description - self.bought_confirmation_prompt = bought_confirmation_prompt + self.bought_card_description = bought_card_description def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/distribution_countries.py b/ask-smapi-model/ask_smapi_model/v1/isp/distribution_countries.py index c05eb7f7..e6fe0877 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/distribution_countries.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/distribution_countries.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -274,7 +274,7 @@ class DistributionCountries(Enum): ZW = "ZW" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -290,7 +290,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, DistributionCountries): return False @@ -298,6 +298,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/editable_state.py b/ask-smapi-model/ask_smapi_model/v1/isp/editable_state.py index 33ca0a42..fda4c408 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/editable_state.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/editable_state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class EditableState(Enum): NOT_EDITABLE = "NOT_EDITABLE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, EditableState): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition.py b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition.py index 50cd6f12..576182c9 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition.py @@ -21,13 +21,14 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.subscription_information import SubscriptionInformationV1 - from ask_smapi_model.v1.isp.publishing_information import PublishingInformationV1 - from ask_smapi_model.v1.isp.privacy_and_compliance import PrivacyAndComplianceV1 - from ask_smapi_model.v1.isp.product_type import ProductTypeV1 - from ask_smapi_model.v1.isp.purchasable_state import PurchasableStateV1 + from ask_smapi_model.v1.isp.product_type import ProductType as ProductType_bf0e7936 + from ask_smapi_model.v1.isp.promotable_state import PromotableState as PromotableState_25399706 + from ask_smapi_model.v1.isp.publishing_information import PublishingInformation as PublishingInformation_e7caf3fc + from ask_smapi_model.v1.isp.privacy_and_compliance import PrivacyAndCompliance as PrivacyAndCompliance_bf320b8d + from ask_smapi_model.v1.isp.subscription_information import SubscriptionInformation as SubscriptionInformation_f76debbc + from ask_smapi_model.v1.isp.purchasable_state import PurchasableState as PurchasableState_c58a6ca2 class InSkillProductDefinition(object): @@ -43,6 +44,8 @@ class InSkillProductDefinition(object): :type reference_name: (optional) str :param purchasable_state: :type purchasable_state: (optional) ask_smapi_model.v1.isp.purchasable_state.PurchasableState + :param promotable_state: + :type promotable_state: (optional) ask_smapi_model.v1.isp.promotable_state.PromotableState :param subscription_information: :type subscription_information: (optional) ask_smapi_model.v1.isp.subscription_information.SubscriptionInformation :param publishing_information: @@ -58,6 +61,7 @@ class InSkillProductDefinition(object): 'object_type': 'ask_smapi_model.v1.isp.product_type.ProductType', 'reference_name': 'str', 'purchasable_state': 'ask_smapi_model.v1.isp.purchasable_state.PurchasableState', + 'promotable_state': 'ask_smapi_model.v1.isp.promotable_state.PromotableState', 'subscription_information': 'ask_smapi_model.v1.isp.subscription_information.SubscriptionInformation', 'publishing_information': 'ask_smapi_model.v1.isp.publishing_information.PublishingInformation', 'privacy_and_compliance': 'ask_smapi_model.v1.isp.privacy_and_compliance.PrivacyAndCompliance', @@ -69,6 +73,7 @@ class InSkillProductDefinition(object): 'object_type': 'type', 'reference_name': 'referenceName', 'purchasable_state': 'purchasableState', + 'promotable_state': 'promotableState', 'subscription_information': 'subscriptionInformation', 'publishing_information': 'publishingInformation', 'privacy_and_compliance': 'privacyAndCompliance', @@ -76,8 +81,8 @@ class InSkillProductDefinition(object): } # type: Dict supports_multiple_types = False - def __init__(self, version=None, object_type=None, reference_name=None, purchasable_state=None, subscription_information=None, publishing_information=None, privacy_and_compliance=None, testing_instructions=None): - # type: (Optional[str], Optional[ProductTypeV1], Optional[str], Optional[PurchasableStateV1], Optional[SubscriptionInformationV1], Optional[PublishingInformationV1], Optional[PrivacyAndComplianceV1], Optional[str]) -> None + def __init__(self, version=None, object_type=None, reference_name=None, purchasable_state=None, promotable_state=None, subscription_information=None, publishing_information=None, privacy_and_compliance=None, testing_instructions=None): + # type: (Optional[str], Optional[ProductType_bf0e7936], Optional[str], Optional[PurchasableState_c58a6ca2], Optional[PromotableState_25399706], Optional[SubscriptionInformation_f76debbc], Optional[PublishingInformation_e7caf3fc], Optional[PrivacyAndCompliance_bf320b8d], Optional[str]) -> None """Defines the structure for an in-skill product. :param version: Version of in-skill product definition. @@ -88,6 +93,8 @@ def __init__(self, version=None, object_type=None, reference_name=None, purchasa :type reference_name: (optional) str :param purchasable_state: :type purchasable_state: (optional) ask_smapi_model.v1.isp.purchasable_state.PurchasableState + :param promotable_state: + :type promotable_state: (optional) ask_smapi_model.v1.isp.promotable_state.PromotableState :param subscription_information: :type subscription_information: (optional) ask_smapi_model.v1.isp.subscription_information.SubscriptionInformation :param publishing_information: @@ -103,6 +110,7 @@ def __init__(self, version=None, object_type=None, reference_name=None, purchasa self.object_type = object_type self.reference_name = reference_name self.purchasable_state = purchasable_state + self.promotable_state = promotable_state self.subscription_information = subscription_information self.publishing_information = publishing_information self.privacy_and_compliance = privacy_and_compliance diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition_response.py b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition_response.py index c454d791..8929d2f9 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.in_skill_product_definition import InSkillProductDefinitionV1 + from ask_smapi_model.v1.isp.in_skill_product_definition import InSkillProductDefinition as InSkillProductDefinition_20ce10ca class InSkillProductDefinitionResponse(object): @@ -45,7 +45,7 @@ class InSkillProductDefinitionResponse(object): supports_multiple_types = False def __init__(self, in_skill_product_definition=None): - # type: (Optional[InSkillProductDefinitionV1]) -> None + # type: (Optional[InSkillProductDefinition_20ce10ca]) -> None """Defines In-skill product response. :param in_skill_product_definition: diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary.py b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary.py index b7647b5a..4e66d9e2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary.py @@ -21,15 +21,16 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.summary_marketplace_pricing import SummaryMarketplacePricingV1 - from ask_smapi_model.v1.isp.stage import StageV1 - from ask_smapi_model.v1.isp.isp_summary_links import IspSummaryLinksV1 - from ask_smapi_model.v1.isp.product_type import ProductTypeV1 - from ask_smapi_model.v1.isp.status import StatusV1 - from ask_smapi_model.v1.isp.editable_state import EditableStateV1 - from ask_smapi_model.v1.isp.purchasable_state import PurchasableStateV1 + from ask_smapi_model.v1.isp.product_type import ProductType as ProductType_bf0e7936 + from ask_smapi_model.v1.isp.editable_state import EditableState as EditableState_1fb842e6 + from ask_smapi_model.v1.stage_type import StageType as StageType_700be16e + from ask_smapi_model.v1.isp.promotable_state import PromotableState as PromotableState_25399706 + from ask_smapi_model.v1.isp.status import Status as Status_cbf30a3d + from ask_smapi_model.v1.isp.isp_summary_links import IspSummaryLinks as IspSummaryLinks_84051861 + from ask_smapi_model.v1.isp.summary_marketplace_pricing import SummaryMarketplacePricing as SummaryMarketplacePricing_d0d9d0db + from ask_smapi_model.v1.isp.purchasable_state import PurchasableState as PurchasableState_c58a6ca2 class InSkillProductSummary(object): @@ -50,11 +51,13 @@ class InSkillProductSummary(object): :param status: :type status: (optional) ask_smapi_model.v1.isp.status.Status :param stage: - :type stage: (optional) ask_smapi_model.v1.isp.stage.Stage + :type stage: (optional) ask_smapi_model.v1.stage_type.StageType :param editable_state: :type editable_state: (optional) ask_smapi_model.v1.isp.editable_state.EditableState :param purchasable_state: :type purchasable_state: (optional) ask_smapi_model.v1.isp.purchasable_state.PurchasableState + :param promotable_state: + :type promotable_state: (optional) ask_smapi_model.v1.isp.promotable_state.PromotableState :param links: :type links: (optional) ask_smapi_model.v1.isp.isp_summary_links.IspSummaryLinks :param pricing: In-skill product pricing information. @@ -68,9 +71,10 @@ class InSkillProductSummary(object): 'last_updated': 'datetime', 'name_by_locale': 'dict(str, str)', 'status': 'ask_smapi_model.v1.isp.status.Status', - 'stage': 'ask_smapi_model.v1.isp.stage.Stage', + 'stage': 'ask_smapi_model.v1.stage_type.StageType', 'editable_state': 'ask_smapi_model.v1.isp.editable_state.EditableState', 'purchasable_state': 'ask_smapi_model.v1.isp.purchasable_state.PurchasableState', + 'promotable_state': 'ask_smapi_model.v1.isp.promotable_state.PromotableState', 'links': 'ask_smapi_model.v1.isp.isp_summary_links.IspSummaryLinks', 'pricing': 'dict(str, ask_smapi_model.v1.isp.summary_marketplace_pricing.SummaryMarketplacePricing)' } # type: Dict @@ -85,13 +89,14 @@ class InSkillProductSummary(object): 'stage': 'stage', 'editable_state': 'editableState', 'purchasable_state': 'purchasableState', + 'promotable_state': 'promotableState', 'links': '_links', 'pricing': 'pricing' } # type: Dict supports_multiple_types = False - def __init__(self, object_type=None, product_id=None, reference_name=None, last_updated=None, name_by_locale=None, status=None, stage=None, editable_state=None, purchasable_state=None, links=None, pricing=None): - # type: (Optional[ProductTypeV1], Optional[str], Optional[str], Optional[datetime], Optional[Dict[str, object]], Optional[StatusV1], Optional[StageV1], Optional[EditableStateV1], Optional[PurchasableStateV1], Optional[IspSummaryLinksV1], Optional[Dict[str, SummaryMarketplacePricingV1]]) -> None + def __init__(self, object_type=None, product_id=None, reference_name=None, last_updated=None, name_by_locale=None, status=None, stage=None, editable_state=None, purchasable_state=None, promotable_state=None, links=None, pricing=None): + # type: (Optional[ProductType_bf0e7936], Optional[str], Optional[str], Optional[datetime], Optional[Dict[str, object]], Optional[Status_cbf30a3d], Optional[StageType_700be16e], Optional[EditableState_1fb842e6], Optional[PurchasableState_c58a6ca2], Optional[PromotableState_25399706], Optional[IspSummaryLinks_84051861], Optional[Dict[str, SummaryMarketplacePricing_d0d9d0db]]) -> None """Information about the in-skill product that is not editable. :param object_type: @@ -107,11 +112,13 @@ def __init__(self, object_type=None, product_id=None, reference_name=None, last_ :param status: :type status: (optional) ask_smapi_model.v1.isp.status.Status :param stage: - :type stage: (optional) ask_smapi_model.v1.isp.stage.Stage + :type stage: (optional) ask_smapi_model.v1.stage_type.StageType :param editable_state: :type editable_state: (optional) ask_smapi_model.v1.isp.editable_state.EditableState :param purchasable_state: :type purchasable_state: (optional) ask_smapi_model.v1.isp.purchasable_state.PurchasableState + :param promotable_state: + :type promotable_state: (optional) ask_smapi_model.v1.isp.promotable_state.PromotableState :param links: :type links: (optional) ask_smapi_model.v1.isp.isp_summary_links.IspSummaryLinks :param pricing: In-skill product pricing information. @@ -128,6 +135,7 @@ def __init__(self, object_type=None, product_id=None, reference_name=None, last_ self.stage = stage self.editable_state = editable_state self.purchasable_state = purchasable_state + self.promotable_state = promotable_state self.links = links self.pricing = pricing diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary_response.py b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary_response.py index 9d5aa9f3..fb39790f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.in_skill_product_summary import InSkillProductSummaryV1 + from ask_smapi_model.v1.isp.in_skill_product_summary import InSkillProductSummary as InSkillProductSummary_295940f4 class InSkillProductSummaryResponse(object): @@ -45,7 +45,7 @@ class InSkillProductSummaryResponse(object): supports_multiple_types = False def __init__(self, in_skill_product_summary=None): - # type: (Optional[InSkillProductSummaryV1]) -> None + # type: (Optional[InSkillProductSummary_295940f4]) -> None """In-skill product summary response. :param in_skill_product_summary: diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/isp_summary_links.py b/ask-smapi-model/ask_smapi_model/v1/isp/isp_summary_links.py index b4631680..1d8576e5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/isp_summary_links.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/isp_summary_links.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.link import LinkV1 + from ask_smapi_model.v1.link import Link as Link_5c161ca5 class IspSummaryLinks(object): @@ -43,7 +43,7 @@ class IspSummaryLinks(object): supports_multiple_types = False def __init__(self, object_self=None): - # type: (Optional[LinkV1]) -> None + # type: (Optional[Link_5c161ca5]) -> None """ :param object_self: diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product.py b/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product.py index 73d09b86..e6ccb8cd 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 - from ask_smapi_model.v1.isp.in_skill_product_summary import InSkillProductSummaryV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.isp.in_skill_product_summary import InSkillProductSummary as InSkillProductSummary_295940f4 class ListInSkillProduct(object): @@ -58,7 +58,7 @@ class ListInSkillProduct(object): supports_multiple_types = False def __init__(self, links=None, in_skill_products=None, is_truncated=None, next_token=None): - # type: (Optional[LinksV1], Optional[List[InSkillProductSummaryV1]], Optional[bool], Optional[str]) -> None + # type: (Optional[Links_bc43467b], Optional[List[InSkillProductSummary_295940f4]], Optional[bool], Optional[str]) -> None """List of in-skill products. :param links: diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product_response.py b/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product_response.py index d2c2b255..7e072acc 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.list_in_skill_product import ListInSkillProductV1 + from ask_smapi_model.v1.isp.list_in_skill_product import ListInSkillProduct as ListInSkillProduct_8bb28838 class ListInSkillProductResponse(object): @@ -45,7 +45,7 @@ class ListInSkillProductResponse(object): supports_multiple_types = False def __init__(self, in_skill_product_summary_list=None): - # type: (Optional[ListInSkillProductV1]) -> None + # type: (Optional[ListInSkillProduct_8bb28838]) -> None """List of in-skill product response. :param in_skill_product_summary_list: diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/localized_privacy_and_compliance.py b/ask-smapi-model/ask_smapi_model/v1/isp/localized_privacy_and_compliance.py index 252145d5..239c9094 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/localized_privacy_and_compliance.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/localized_privacy_and_compliance.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/localized_publishing_information.py b/ask-smapi-model/ask_smapi_model/v1/isp/localized_publishing_information.py index c1bb7cee..c650583d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/localized_publishing_information.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/localized_publishing_information.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.custom_product_prompts import CustomProductPromptsV1 + from ask_smapi_model.v1.isp.custom_product_prompts import CustomProductPrompts as CustomProductPrompts_f71d1c5d class LocalizedPublishingInformation(object): @@ -73,7 +73,7 @@ class LocalizedPublishingInformation(object): supports_multiple_types = False def __init__(self, name=None, small_icon_uri=None, large_icon_uri=None, summary=None, description=None, example_phrases=None, keywords=None, custom_product_prompts=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[List[object]], Optional[List[object]], Optional[CustomProductPromptsV1]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[List[object]], Optional[List[object]], Optional[CustomProductPrompts_f71d1c5d]) -> None """Defines the structure for locale specific publishing information in the in-skill product definition. :param name: Name of the in-skill product that is heard by customers and displayed in the Alexa app. diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/marketplace_pricing.py b/ask-smapi-model/ask_smapi_model/v1/isp/marketplace_pricing.py index ffead3a5..cea56f5d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/marketplace_pricing.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/marketplace_pricing.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.price_listing import PriceListingV1 + from ask_smapi_model.v1.isp.price_listing import PriceListing as PriceListing_37c6f12c class MarketplacePricing(object): @@ -49,7 +49,7 @@ class MarketplacePricing(object): supports_multiple_types = False def __init__(self, release_date=None, default_price_listing=None): - # type: (Optional[datetime], Optional[PriceListingV1]) -> None + # type: (Optional[datetime], Optional[PriceListing_37c6f12c]) -> None """In-skill product pricing information for a marketplace. :param release_date: Date when in-skill product is available to customers for both purchase and use. Prior to this date the in-skill product will appear unavailable to customers and will not be purchasable. diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/price_listing.py b/ask-smapi-model/ask_smapi_model/v1/isp/price_listing.py index af94905a..fec865f1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/price_listing.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/price_listing.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.currency import CurrencyV1 + from ask_smapi_model.v1.isp.currency import Currency as Currency_b5ead69d class PriceListing(object): @@ -49,7 +49,7 @@ class PriceListing(object): supports_multiple_types = False def __init__(self, price=None, currency=None): - # type: (Optional[float], Optional[CurrencyV1]) -> None + # type: (Optional[float], Optional[Currency_b5ead69d]) -> None """Price listing information for in-skill product. :param price: Defines the price of an in-skill product. The list price should be your suggested price, not including any VAT or similar taxes. Taxes are included in the final price to end users. diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/privacy_and_compliance.py b/ask-smapi-model/ask_smapi_model/v1/isp/privacy_and_compliance.py index 024e8d15..83989b94 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/privacy_and_compliance.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/privacy_and_compliance.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.localized_privacy_and_compliance import LocalizedPrivacyAndComplianceV1 + from ask_smapi_model.v1.isp.localized_privacy_and_compliance import LocalizedPrivacyAndCompliance as LocalizedPrivacyAndCompliance_df1dc646 class PrivacyAndCompliance(object): @@ -45,7 +45,7 @@ class PrivacyAndCompliance(object): supports_multiple_types = False def __init__(self, locales=None): - # type: (Optional[Dict[str, LocalizedPrivacyAndComplianceV1]]) -> None + # type: (Optional[Dict[str, LocalizedPrivacyAndCompliance_df1dc646]]) -> None """Defines the structure for privacy and compliance. :param locales: Defines the structure for locale specific privacy and compliance. diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/product_response.py b/ask-smapi-model/ask_smapi_model/v1/isp/product_response.py index 6c819ceb..a0f5babe 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/product_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/product_response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/product_type.py b/ask-smapi-model/ask_smapi_model/v1/isp/product_type.py index e4674e7a..f07f36e7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/product_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/product_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ProductType(Enum): CONSUMABLE = "CONSUMABLE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ProductType): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_result_status.py b/ask-smapi-model/ask_smapi_model/v1/isp/promotable_state.py similarity index 72% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_result_status.py rename to ask-smapi-model/ask_smapi_model/v1/isp/promotable_state.py index 483adec6..d99a096c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_result_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/promotable_state.py @@ -21,23 +21,23 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class EvaluationResultStatus(Enum): +class PromotableState(Enum): """ - enum indicating the evaluation result status. * `PASSED` - evaluation result is considered passed * `FAILED` - evaluation result is considered failed + Promote this ISP on Amazon channels such as Amazon.com. Enabling this setting will allow customers to view ISP detail pages and purchase the ISP on Amazon.com. - Allowed enum values: [PASSED, FAILED] + Allowed enum values: [IN_SKILL_ONLY, ALL_AMAZON_CHANNELS] """ - PASSED = "PASSED" - FAILED = "FAILED" + IN_SKILL_ONLY = "IN_SKILL_ONLY" + ALL_AMAZON_CHANNELS = "ALL_AMAZON_CHANNELS" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,14 +53,14 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" - if not isinstance(other, EvaluationResultStatus): + if not isinstance(other, PromotableState): return False return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/publishing_information.py b/ask-smapi-model/ask_smapi_model/v1/isp/publishing_information.py index 3d632bb2..5ccaf80f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/publishing_information.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/publishing_information.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.localized_publishing_information import LocalizedPublishingInformationV1 - from ask_smapi_model.v1.isp.marketplace_pricing import MarketplacePricingV1 - from ask_smapi_model.v1.isp.distribution_countries import DistributionCountriesV1 - from ask_smapi_model.v1.isp.tax_information import TaxInformationV1 + from ask_smapi_model.v1.isp.distribution_countries import DistributionCountries as DistributionCountries_9441646c + from ask_smapi_model.v1.isp.tax_information import TaxInformation as TaxInformation_d7a91e8 + from ask_smapi_model.v1.isp.marketplace_pricing import MarketplacePricing as MarketplacePricing_bbe8aae8 + from ask_smapi_model.v1.isp.localized_publishing_information import LocalizedPublishingInformation as LocalizedPublishingInformation_4fbbbb97 class PublishingInformation(object): @@ -60,7 +60,7 @@ class PublishingInformation(object): supports_multiple_types = False def __init__(self, locales=None, distribution_countries=None, pricing=None, tax_information=None): - # type: (Optional[Dict[str, LocalizedPublishingInformationV1]], Optional[List[DistributionCountriesV1]], Optional[Dict[str, MarketplacePricingV1]], Optional[TaxInformationV1]) -> None + # type: (Optional[Dict[str, LocalizedPublishingInformation_4fbbbb97]], Optional[List[DistributionCountries_9441646c]], Optional[Dict[str, MarketplacePricing_bbe8aae8]], Optional[TaxInformation_d7a91e8]) -> None """Defines the structure for in-skill product publishing information. :param locales: Defines the structure for locale specific publishing information for an in-skill product. diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/purchasable_state.py b/ask-smapi-model/ask_smapi_model/v1/isp/purchasable_state.py index 7b45d13a..f702f5a0 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/purchasable_state.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/purchasable_state.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PurchasableState(Enum): NOT_PURCHASABLE = "NOT_PURCHASABLE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PurchasableState): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/status.py b/ask-smapi-model/ask_smapi_model/v1/isp/status.py index edad1a64..7f8c25ee 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/status.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -40,7 +40,7 @@ class Status(Enum): SUPPRESSED = "SUPPRESSED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -56,7 +56,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Status): return False @@ -64,6 +64,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/subscription_information.py b/ask-smapi-model/ask_smapi_model/v1/isp/subscription_information.py index 95a49826..8ea527b5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/subscription_information.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/subscription_information.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.subscription_payment_frequency import SubscriptionPaymentFrequencyV1 + from ask_smapi_model.v1.isp.subscription_payment_frequency import SubscriptionPaymentFrequency as SubscriptionPaymentFrequency_35249ecf class SubscriptionInformation(object): @@ -49,7 +49,7 @@ class SubscriptionInformation(object): supports_multiple_types = False def __init__(self, subscription_payment_frequency=None, subscription_trial_period_days=None): - # type: (Optional[SubscriptionPaymentFrequencyV1], Optional[int]) -> None + # type: (Optional[SubscriptionPaymentFrequency_35249ecf], Optional[int]) -> None """Defines the structure for in-skill product subscription information. :param subscription_payment_frequency: diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/subscription_payment_frequency.py b/ask-smapi-model/ask_smapi_model/v1/isp/subscription_payment_frequency.py index d5dca0be..21b65220 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/subscription_payment_frequency.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/subscription_payment_frequency.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class SubscriptionPaymentFrequency(Enum): YEARLY = "YEARLY" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SubscriptionPaymentFrequency): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/summary_marketplace_pricing.py b/ask-smapi-model/ask_smapi_model/v1/isp/summary_marketplace_pricing.py index 5f970b15..f5cd8a3a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/summary_marketplace_pricing.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/summary_marketplace_pricing.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.summary_price_listing import SummaryPriceListingV1 + from ask_smapi_model.v1.isp.summary_price_listing import SummaryPriceListing as SummaryPriceListing_dd08d917 class SummaryMarketplacePricing(object): @@ -49,7 +49,7 @@ class SummaryMarketplacePricing(object): supports_multiple_types = False def __init__(self, release_date=None, default_price_listing=None): - # type: (Optional[datetime], Optional[SummaryPriceListingV1]) -> None + # type: (Optional[datetime], Optional[SummaryPriceListing_dd08d917]) -> None """Localized in-skill product pricing information. :param release_date: Date when in-skill product is available to customers for both purchase and use. Prior to this date the in-skill product will appear unavailable to customers and will not be purchasable. diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/summary_price_listing.py b/ask-smapi-model/ask_smapi_model/v1/isp/summary_price_listing.py index bc6ca787..9c49caa3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/summary_price_listing.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/summary_price_listing.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.currency import CurrencyV1 + from ask_smapi_model.v1.isp.currency import Currency as Currency_b5ead69d class SummaryPriceListing(object): @@ -53,7 +53,7 @@ class SummaryPriceListing(object): supports_multiple_types = False def __init__(self, price=None, prime_member_price=None, currency=None): - # type: (Optional[float], Optional[float], Optional[CurrencyV1]) -> None + # type: (Optional[float], Optional[float], Optional[Currency_b5ead69d]) -> None """Price listing information for in-skill product. :param price: The price of an in-skill product. diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/tax_information.py b/ask-smapi-model/ask_smapi_model/v1/isp/tax_information.py index e295e099..91214b1d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/tax_information.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/tax_information.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.tax_information_category import TaxInformationCategoryV1 + from ask_smapi_model.v1.isp.tax_information_category import TaxInformationCategory as TaxInformationCategory_c38bfef7 class TaxInformation(object): @@ -45,7 +45,7 @@ class TaxInformation(object): supports_multiple_types = False def __init__(self, category=None): - # type: (Optional[TaxInformationCategoryV1]) -> None + # type: (Optional[TaxInformationCategory_c38bfef7]) -> None """Defines the structure for in-skill product tax information. :param category: diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/tax_information_category.py b/ask-smapi-model/ask_smapi_model/v1/isp/tax_information_category.py index 36347ba4..e7a46aed 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/tax_information_category.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/tax_information_category.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -42,7 +42,7 @@ class TaxInformationCategory(Enum): NEWSPAPERS = "NEWSPAPERS" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -58,7 +58,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, TaxInformationCategory): return False @@ -66,6 +66,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/update_in_skill_product_request.py b/ask-smapi-model/ask_smapi_model/v1/isp/update_in_skill_product_request.py index fa49a945..a0860e64 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/update_in_skill_product_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/isp/update_in_skill_product_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.isp.in_skill_product_definition import InSkillProductDefinitionV1 + from ask_smapi_model.v1.isp.in_skill_product_definition import InSkillProductDefinition as InSkillProductDefinition_20ce10ca class UpdateInSkillProductRequest(object): @@ -43,7 +43,7 @@ class UpdateInSkillProductRequest(object): supports_multiple_types = False def __init__(self, in_skill_product_definition=None): - # type: (Optional[InSkillProductDefinitionV1]) -> None + # type: (Optional[InSkillProductDefinition_20ce10ca]) -> None """ :param in_skill_product_definition: diff --git a/ask-smapi-model/ask_smapi_model/v1/link.py b/ask-smapi-model/ask_smapi_model/v1/link.py index f49885a8..1ea807e2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/link.py +++ b/ask-smapi-model/ask_smapi_model/v1/link.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/links.py b/ask-smapi-model/ask_smapi_model/v1/links.py index 906416c5..5cab3ab7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/links.py +++ b/ask-smapi-model/ask_smapi_model/v1/links.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.link import LinkV1 + from ask_smapi_model.v1.link import Link as Link_5c161ca5 class Links(object): @@ -49,7 +49,7 @@ class Links(object): supports_multiple_types = False def __init__(self, object_self=None, next=None): - # type: (Optional[LinkV1], Optional[LinkV1]) -> None + # type: (Optional[Link_5c161ca5], Optional[Link_5c161ca5]) -> None """Links for the API navigation. :param object_self: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/__init__.py index 9da8f2b0..0233aeea 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/__init__.py @@ -14,71 +14,71 @@ # from __future__ import absolute_import -from .agreement_type import AgreementType -from .clone_locale_stage_type import CloneLocaleStageType +from .hosted_skill_deployment_status import HostedSkillDeploymentStatus +from .version_submission import VersionSubmission +from .rollback_request_status import RollbackRequestStatus +from .clone_locale_status import CloneLocaleStatus +from .hosted_skill_provisioning_status import HostedSkillProvisioningStatus +from .image_attributes import ImageAttributes +from .publication_status import PublicationStatus +from .hosted_skill_provisioning_last_update_request import HostedSkillProvisioningLastUpdateRequest +from .skill_summary import SkillSummary +from .clone_locale_request_status import CloneLocaleRequestStatus +from .clone_locale_resource_status import CloneLocaleResourceStatus +from .publication_method import PublicationMethod +from .list_skill_response import ListSkillResponse +from .validation_failure_reason import ValidationFailureReason from .update_skill_with_package_request import UpdateSkillWithPackageRequest -from .validation_feature import ValidationFeature +from .create_skill_response import CreateSkillResponse from .skill_status import SkillStatus +from .skill_resources_enum import SkillResourcesEnum +from .image_size_unit import ImageSizeUnit +from .validation_failure_type import ValidationFailureType from .build_step_name import BuildStepName -from .response_status import ResponseStatus -from .clone_locale_status import CloneLocaleStatus -from .create_rollback_request import CreateRollbackRequest -from .ssl_certificate_payload import SSLCertificatePayload -from .clone_locale_status_response import CloneLocaleStatusResponse -from .build_step import BuildStep -from .publication_status import PublicationStatus -from .skill_version import SkillVersion -from .standardized_error import StandardizedError from .manifest_last_update_request import ManifestLastUpdateRequest +from .format import Format +from .action import Action +from .create_rollback_request import CreateRollbackRequest +from .clone_locale_stage_type import CloneLocaleStageType +from .skill_messaging_credentials import SkillMessagingCredentials +from .image_size import ImageSize from .validation_details import ValidationDetails -from .submit_skill_for_certification_request import SubmitSkillForCertificationRequest -from .version_submission import VersionSubmission -from .interaction_model_last_update_request import InteractionModelLastUpdateRequest -from .image_attributes import ImageAttributes -from .validation_failure_type import ValidationFailureType from .reason import Reason -from .hosted_skill_deployment_status_last_update_request import HostedSkillDeploymentStatusLastUpdateRequest -from .clone_locale_request_status import CloneLocaleRequestStatus -from .skill_summary import SkillSummary -from .publication_method import PublicationMethod -from .image_dimension import ImageDimension +from .ssl_certificate_payload import SSLCertificatePayload +from .build_step import BuildStep from .create_skill_request import CreateSkillRequest -from .list_skill_versions_response import ListSkillVersionsResponse -from .image_size import ImageSize -from .hosted_skill_provisioning_status import HostedSkillProvisioningStatus -from .rollback_request_status_types import RollbackRequestStatusTypes -from .import_response_skill import ImportResponseSkill -from .instance import Instance -from .skill_messaging_credentials import SkillMessagingCredentials -from .version_submission_status import VersionSubmissionStatus -from .hosted_skill_deployment_status import HostedSkillDeploymentStatus -from .create_rollback_response import CreateRollbackResponse -from .status import Status -from .regional_ssl_certificate import RegionalSSLCertificate -from .clone_locale_resource_status import CloneLocaleResourceStatus -from .import_response import ImportResponse -from .withdraw_request import WithdrawRequest +from .skill_credentials import SkillCredentials from .export_response_skill import ExportResponseSkill -from .build_details import BuildDetails -from .skill_interaction_model_status import SkillInteractionModelStatus from .create_skill_with_package_request import CreateSkillWithPackageRequest -from .create_skill_response import CreateSkillResponse -from .overwrite_mode import OverwriteMode -from .format import Format -from .upload_response import UploadResponse -from .skill_credentials import SkillCredentials -from .skill_summary_apis import SkillSummaryApis -from .validation_failure_reason import ValidationFailureReason -from .export_response import ExportResponse -from .clone_locale_request import CloneLocaleRequest -from .list_skill_response import ListSkillResponse +from .version_submission_status import VersionSubmissionStatus +from .clone_locale_status_response import CloneLocaleStatusResponse from .hosted_skill_deployment_details import HostedSkillDeploymentDetails +from .instance import Instance +from .regional_ssl_certificate import RegionalSSLCertificate +from .import_response import ImportResponse +from .validation_feature import ValidationFeature from .validation_endpoint import ValidationEndpoint +from .agreement_type import AgreementType +from .create_rollback_response import CreateRollbackResponse +from .export_response import ExportResponse from .manifest_status import ManifestStatus -from .action import Action -from .rollback_request_status import RollbackRequestStatus -from .hosted_skill_provisioning_last_update_request import HostedSkillProvisioningLastUpdateRequest -from .image_size_unit import ImageSizeUnit -from .validation_data_types import ValidationDataTypes from .resource_import_status import ResourceImportStatus -from .skill_resources_enum import SkillResourcesEnum +from .standardized_error import StandardizedError +from .response_status import ResponseStatus +from .import_response_skill import ImportResponseSkill +from .list_skill_versions_response import ListSkillVersionsResponse +from .validation_data_types import ValidationDataTypes +from .overwrite_mode import OverwriteMode +from .skill_interaction_model_status import SkillInteractionModelStatus +from .upload_response import UploadResponse +from .rollback_request_status_types import RollbackRequestStatusTypes +from .submit_skill_for_certification_request import SubmitSkillForCertificationRequest +from .skill_version import SkillVersion +from .interaction_model_last_update_request import InteractionModelLastUpdateRequest +from .clone_locale_request import CloneLocaleRequest +from .skill_summary_apis import SkillSummaryApis +from .status import Status +from .withdraw_request import WithdrawRequest +from .build_details import BuildDetails +from .hosted_skill_deployment_status_last_update_request import HostedSkillDeploymentStatusLastUpdateRequest +from .image_dimension import ImageDimension diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/__init__.py index 9fd0734d..66f25d8e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/__init__.py @@ -14,9 +14,11 @@ # from __future__ import absolute_import -from .account_linking_platform_authorization_url import AccountLinkingPlatformAuthorizationUrl -from .account_linking_response import AccountLinkingResponse from .access_token_scheme_type import AccessTokenSchemeType -from .account_linking_request import AccountLinkingRequest +from .account_linking_request_payload import AccountLinkingRequestPayload from .account_linking_type import AccountLinkingType from .platform_type import PlatformType +from .account_linking_response import AccountLinkingResponse +from .voice_forward_account_linking_status import VoiceForwardAccountLinkingStatus +from .account_linking_platform_authorization_url import AccountLinkingPlatformAuthorizationUrl +from .account_linking_request import AccountLinkingRequest diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/access_token_scheme_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/access_token_scheme_type.py index f4b101a1..9a5b816b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/access_token_scheme_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/access_token_scheme_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class AccessTokenSchemeType(Enum): REQUEST_BODY_CREDENTIALS = "REQUEST_BODY_CREDENTIALS" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, AccessTokenSchemeType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_platform_authorization_url.py b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_platform_authorization_url.py index c52d4ef1..0bfad2b5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_platform_authorization_url.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_platform_authorization_url.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.account_linking.platform_type import PlatformTypeV1 + from ask_smapi_model.v1.skill.account_linking.platform_type import PlatformType as PlatformType_d133fbf3 class AccountLinkingPlatformAuthorizationUrl(object): @@ -49,7 +49,7 @@ class AccountLinkingPlatformAuthorizationUrl(object): supports_multiple_types = False def __init__(self, platform_type=None, platform_authorization_url=None): - # type: (Optional[PlatformTypeV1], Optional[str]) -> None + # type: (Optional[PlatformType_d133fbf3], Optional[str]) -> None """A key-value pair object that contains the OAuth2 authorization url to initiate the skill account linking process. :param platform_type: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_request.py index 03c303c2..fee1ecb0 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_request.py @@ -21,118 +21,39 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.account_linking.account_linking_type import AccountLinkingTypeV1 - from ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url import AccountLinkingPlatformAuthorizationUrlV1 - from ask_smapi_model.v1.skill.account_linking.access_token_scheme_type import AccessTokenSchemeTypeV1 + from ask_smapi_model.v1.skill.account_linking.account_linking_request_payload import AccountLinkingRequestPayload as AccountLinkingRequestPayload_6a6fa471 class AccountLinkingRequest(object): """ - The payload for creating the account linking partner. - - - :param object_type: - :type object_type: (optional) ask_smapi_model.v1.skill.account_linking.account_linking_type.AccountLinkingType - :param authorization_url: The url where customers will be redirected in the companion app to enter login credentials. - :type authorization_url: (optional) str - :param domains: The list of domains that the authorization URL will fetch content from. - :type domains: (optional) list[str] - :param client_id: The unique public string used to identify the client requesting for authentication. - :type client_id: (optional) str - :param scopes: The list of permissions which will be requested from the skill user. - :type scopes: (optional) list[str] - :param access_token_url: The url used for access token and token refresh requests. - :type access_token_url: (optional) str - :param client_secret: The client secret provided by developer. - :type client_secret: (optional) str - :param access_token_scheme: - :type access_token_scheme: (optional) ask_smapi_model.v1.skill.account_linking.access_token_scheme_type.AccessTokenSchemeType - :param default_token_expiration_in_seconds: The time in seconds for which access token is valid. If OAuth client returns \"expires_in\", it will be overwrite this parameter. - :type default_token_expiration_in_seconds: (optional) int - :param reciprocal_access_token_url: Optional, if your skill requires reciprocal authorization, provide this additional access token url to handle reciprocal (Alexa) authorization codes that can be exchanged for Alexa access tokens. - :type reciprocal_access_token_url: (optional) str - :param redirect_urls: The list of valid urls to redirect back to, when the linking process is initiated from a third party system. - :type redirect_urls: (optional) list[str] - :param authorization_urls_by_platform: The list of valid authorization urls for allowed platforms to initiate account linking. - :type authorization_urls_by_platform: (optional) list[ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url.AccountLinkingPlatformAuthorizationUrl] + The request body of AccountLinkingRequest. + + + :param account_linking_request: + :type account_linking_request: (optional) ask_smapi_model.v1.skill.account_linking.account_linking_request_payload.AccountLinkingRequestPayload """ deserialized_types = { - 'object_type': 'ask_smapi_model.v1.skill.account_linking.account_linking_type.AccountLinkingType', - 'authorization_url': 'str', - 'domains': 'list[str]', - 'client_id': 'str', - 'scopes': 'list[str]', - 'access_token_url': 'str', - 'client_secret': 'str', - 'access_token_scheme': 'ask_smapi_model.v1.skill.account_linking.access_token_scheme_type.AccessTokenSchemeType', - 'default_token_expiration_in_seconds': 'int', - 'reciprocal_access_token_url': 'str', - 'redirect_urls': 'list[str]', - 'authorization_urls_by_platform': 'list[ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url.AccountLinkingPlatformAuthorizationUrl]' + 'account_linking_request': 'ask_smapi_model.v1.skill.account_linking.account_linking_request_payload.AccountLinkingRequestPayload' } # type: Dict attribute_map = { - 'object_type': 'type', - 'authorization_url': 'authorizationUrl', - 'domains': 'domains', - 'client_id': 'clientId', - 'scopes': 'scopes', - 'access_token_url': 'accessTokenUrl', - 'client_secret': 'clientSecret', - 'access_token_scheme': 'accessTokenScheme', - 'default_token_expiration_in_seconds': 'defaultTokenExpirationInSeconds', - 'reciprocal_access_token_url': 'reciprocalAccessTokenUrl', - 'redirect_urls': 'redirectUrls', - 'authorization_urls_by_platform': 'authorizationUrlsByPlatform' + 'account_linking_request': 'accountLinkingRequest' } # type: Dict supports_multiple_types = False - def __init__(self, object_type=None, authorization_url=None, domains=None, client_id=None, scopes=None, access_token_url=None, client_secret=None, access_token_scheme=None, default_token_expiration_in_seconds=None, reciprocal_access_token_url=None, redirect_urls=None, authorization_urls_by_platform=None): - # type: (Optional[AccountLinkingTypeV1], Optional[str], Optional[List[object]], Optional[str], Optional[List[object]], Optional[str], Optional[str], Optional[AccessTokenSchemeTypeV1], Optional[int], Optional[str], Optional[List[object]], Optional[List[AccountLinkingPlatformAuthorizationUrlV1]]) -> None - """The payload for creating the account linking partner. - - :param object_type: - :type object_type: (optional) ask_smapi_model.v1.skill.account_linking.account_linking_type.AccountLinkingType - :param authorization_url: The url where customers will be redirected in the companion app to enter login credentials. - :type authorization_url: (optional) str - :param domains: The list of domains that the authorization URL will fetch content from. - :type domains: (optional) list[str] - :param client_id: The unique public string used to identify the client requesting for authentication. - :type client_id: (optional) str - :param scopes: The list of permissions which will be requested from the skill user. - :type scopes: (optional) list[str] - :param access_token_url: The url used for access token and token refresh requests. - :type access_token_url: (optional) str - :param client_secret: The client secret provided by developer. - :type client_secret: (optional) str - :param access_token_scheme: - :type access_token_scheme: (optional) ask_smapi_model.v1.skill.account_linking.access_token_scheme_type.AccessTokenSchemeType - :param default_token_expiration_in_seconds: The time in seconds for which access token is valid. If OAuth client returns \"expires_in\", it will be overwrite this parameter. - :type default_token_expiration_in_seconds: (optional) int - :param reciprocal_access_token_url: Optional, if your skill requires reciprocal authorization, provide this additional access token url to handle reciprocal (Alexa) authorization codes that can be exchanged for Alexa access tokens. - :type reciprocal_access_token_url: (optional) str - :param redirect_urls: The list of valid urls to redirect back to, when the linking process is initiated from a third party system. - :type redirect_urls: (optional) list[str] - :param authorization_urls_by_platform: The list of valid authorization urls for allowed platforms to initiate account linking. - :type authorization_urls_by_platform: (optional) list[ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url.AccountLinkingPlatformAuthorizationUrl] + def __init__(self, account_linking_request=None): + # type: (Optional[AccountLinkingRequestPayload_6a6fa471]) -> None + """The request body of AccountLinkingRequest. + + :param account_linking_request: + :type account_linking_request: (optional) ask_smapi_model.v1.skill.account_linking.account_linking_request_payload.AccountLinkingRequestPayload """ self.__discriminator_value = None # type: str - self.object_type = object_type - self.authorization_url = authorization_url - self.domains = domains - self.client_id = client_id - self.scopes = scopes - self.access_token_url = access_token_url - self.client_secret = client_secret - self.access_token_scheme = access_token_scheme - self.default_token_expiration_in_seconds = default_token_expiration_in_seconds - self.reciprocal_access_token_url = reciprocal_access_token_url - self.redirect_urls = redirect_urls - self.authorization_urls_by_platform = authorization_urls_by_platform + self.account_linking_request = account_linking_request def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_request_payload.py b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_request_payload.py new file mode 100644 index 00000000..74c198d2 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_request_payload.py @@ -0,0 +1,203 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.account_linking.account_linking_type import AccountLinkingType as AccountLinkingType_bb3d8e2 + from ask_smapi_model.v1.skill.account_linking.voice_forward_account_linking_status import VoiceForwardAccountLinkingStatus as VoiceForwardAccountLinkingStatus_5cb337ee + from ask_smapi_model.v1.skill.account_linking.access_token_scheme_type import AccessTokenSchemeType as AccessTokenSchemeType_e9bad6d7 + from ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url import AccountLinkingPlatformAuthorizationUrl as AccountLinkingPlatformAuthorizationUrl_2972ebae + + +class AccountLinkingRequestPayload(object): + """ + The payload for creating the account linking partner. + + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.account_linking.account_linking_type.AccountLinkingType + :param authorization_url: The url where customers will be redirected in the companion app to enter login credentials. + :type authorization_url: (optional) str + :param domains: The list of domains that the authorization URL will fetch content from. + :type domains: (optional) list[str] + :param client_id: The unique public string used to identify the client requesting for authentication. + :type client_id: (optional) str + :param scopes: The list of permissions which will be requested from the skill user. + :type scopes: (optional) list[str] + :param access_token_url: The url used for access token and token refresh requests. + :type access_token_url: (optional) str + :param client_secret: The client secret provided by developer. + :type client_secret: (optional) str + :param access_token_scheme: + :type access_token_scheme: (optional) ask_smapi_model.v1.skill.account_linking.access_token_scheme_type.AccessTokenSchemeType + :param default_token_expiration_in_seconds: The time in seconds for which access token is valid. If OAuth client returns \"expires_in\", it will be overwrite this parameter. + :type default_token_expiration_in_seconds: (optional) int + :param reciprocal_access_token_url: Optional, if your skill requires reciprocal authorization, provide this additional access token url to handle reciprocal (Alexa) authorization codes that can be exchanged for Alexa access tokens. + :type reciprocal_access_token_url: (optional) str + :param redirect_urls: The list of valid urls to redirect back to, when the linking process is initiated from a third party system. + :type redirect_urls: (optional) list[str] + :param authorization_urls_by_platform: The list of valid authorization urls for allowed platforms to initiate account linking. + :type authorization_urls_by_platform: (optional) list[ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url.AccountLinkingPlatformAuthorizationUrl] + :param skip_on_enablement: Set to true to let users enable the skill without starting the account linking flow. Set to false to require the normal account linking flow when users enable the skill. + :type skip_on_enablement: (optional) bool + :param voice_forward_account_linking: + :type voice_forward_account_linking: (optional) ask_smapi_model.v1.skill.account_linking.voice_forward_account_linking_status.VoiceForwardAccountLinkingStatus + + """ + deserialized_types = { + 'object_type': 'ask_smapi_model.v1.skill.account_linking.account_linking_type.AccountLinkingType', + 'authorization_url': 'str', + 'domains': 'list[str]', + 'client_id': 'str', + 'scopes': 'list[str]', + 'access_token_url': 'str', + 'client_secret': 'str', + 'access_token_scheme': 'ask_smapi_model.v1.skill.account_linking.access_token_scheme_type.AccessTokenSchemeType', + 'default_token_expiration_in_seconds': 'int', + 'reciprocal_access_token_url': 'str', + 'redirect_urls': 'list[str]', + 'authorization_urls_by_platform': 'list[ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url.AccountLinkingPlatformAuthorizationUrl]', + 'skip_on_enablement': 'bool', + 'voice_forward_account_linking': 'ask_smapi_model.v1.skill.account_linking.voice_forward_account_linking_status.VoiceForwardAccountLinkingStatus' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'authorization_url': 'authorizationUrl', + 'domains': 'domains', + 'client_id': 'clientId', + 'scopes': 'scopes', + 'access_token_url': 'accessTokenUrl', + 'client_secret': 'clientSecret', + 'access_token_scheme': 'accessTokenScheme', + 'default_token_expiration_in_seconds': 'defaultTokenExpirationInSeconds', + 'reciprocal_access_token_url': 'reciprocalAccessTokenUrl', + 'redirect_urls': 'redirectUrls', + 'authorization_urls_by_platform': 'authorizationUrlsByPlatform', + 'skip_on_enablement': 'skipOnEnablement', + 'voice_forward_account_linking': 'voiceForwardAccountLinking' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, authorization_url=None, domains=None, client_id=None, scopes=None, access_token_url=None, client_secret=None, access_token_scheme=None, default_token_expiration_in_seconds=None, reciprocal_access_token_url=None, redirect_urls=None, authorization_urls_by_platform=None, skip_on_enablement=None, voice_forward_account_linking=None): + # type: (Optional[AccountLinkingType_bb3d8e2], Optional[str], Optional[List[object]], Optional[str], Optional[List[object]], Optional[str], Optional[str], Optional[AccessTokenSchemeType_e9bad6d7], Optional[int], Optional[str], Optional[List[object]], Optional[List[AccountLinkingPlatformAuthorizationUrl_2972ebae]], Optional[bool], Optional[VoiceForwardAccountLinkingStatus_5cb337ee]) -> None + """The payload for creating the account linking partner. + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.account_linking.account_linking_type.AccountLinkingType + :param authorization_url: The url where customers will be redirected in the companion app to enter login credentials. + :type authorization_url: (optional) str + :param domains: The list of domains that the authorization URL will fetch content from. + :type domains: (optional) list[str] + :param client_id: The unique public string used to identify the client requesting for authentication. + :type client_id: (optional) str + :param scopes: The list of permissions which will be requested from the skill user. + :type scopes: (optional) list[str] + :param access_token_url: The url used for access token and token refresh requests. + :type access_token_url: (optional) str + :param client_secret: The client secret provided by developer. + :type client_secret: (optional) str + :param access_token_scheme: + :type access_token_scheme: (optional) ask_smapi_model.v1.skill.account_linking.access_token_scheme_type.AccessTokenSchemeType + :param default_token_expiration_in_seconds: The time in seconds for which access token is valid. If OAuth client returns \"expires_in\", it will be overwrite this parameter. + :type default_token_expiration_in_seconds: (optional) int + :param reciprocal_access_token_url: Optional, if your skill requires reciprocal authorization, provide this additional access token url to handle reciprocal (Alexa) authorization codes that can be exchanged for Alexa access tokens. + :type reciprocal_access_token_url: (optional) str + :param redirect_urls: The list of valid urls to redirect back to, when the linking process is initiated from a third party system. + :type redirect_urls: (optional) list[str] + :param authorization_urls_by_platform: The list of valid authorization urls for allowed platforms to initiate account linking. + :type authorization_urls_by_platform: (optional) list[ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url.AccountLinkingPlatformAuthorizationUrl] + :param skip_on_enablement: Set to true to let users enable the skill without starting the account linking flow. Set to false to require the normal account linking flow when users enable the skill. + :type skip_on_enablement: (optional) bool + :param voice_forward_account_linking: + :type voice_forward_account_linking: (optional) ask_smapi_model.v1.skill.account_linking.voice_forward_account_linking_status.VoiceForwardAccountLinkingStatus + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.authorization_url = authorization_url + self.domains = domains + self.client_id = client_id + self.scopes = scopes + self.access_token_url = access_token_url + self.client_secret = client_secret + self.access_token_scheme = access_token_scheme + self.default_token_expiration_in_seconds = default_token_expiration_in_seconds + self.reciprocal_access_token_url = reciprocal_access_token_url + self.redirect_urls = redirect_urls + self.authorization_urls_by_platform = authorization_urls_by_platform + self.skip_on_enablement = skip_on_enablement + self.voice_forward_account_linking = voice_forward_account_linking + + 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, AccountLinkingRequestPayload): + 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-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_response.py index f0eb960d..215a400b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_response.py @@ -21,11 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.account_linking.account_linking_type import AccountLinkingTypeV1 - from ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url import AccountLinkingPlatformAuthorizationUrlV1 - from ask_smapi_model.v1.skill.account_linking.access_token_scheme_type import AccessTokenSchemeTypeV1 + from ask_smapi_model.v1.skill.account_linking.account_linking_type import AccountLinkingType as AccountLinkingType_bb3d8e2 + from ask_smapi_model.v1.skill.account_linking.voice_forward_account_linking_status import VoiceForwardAccountLinkingStatus as VoiceForwardAccountLinkingStatus_5cb337ee + from ask_smapi_model.v1.skill.account_linking.access_token_scheme_type import AccessTokenSchemeType as AccessTokenSchemeType_e9bad6d7 + from ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url import AccountLinkingPlatformAuthorizationUrl as AccountLinkingPlatformAuthorizationUrl_2972ebae class AccountLinkingResponse(object): @@ -53,6 +54,8 @@ class AccountLinkingResponse(object): :type redirect_urls: (optional) list[str] :param authorization_urls_by_platform: The list of valid authorization urls for allowed platforms to initiate account linking. :type authorization_urls_by_platform: (optional) list[ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url.AccountLinkingPlatformAuthorizationUrl] + :param voice_forward_account_linking: + :type voice_forward_account_linking: (optional) ask_smapi_model.v1.skill.account_linking.voice_forward_account_linking_status.VoiceForwardAccountLinkingStatus """ deserialized_types = { @@ -65,7 +68,8 @@ class AccountLinkingResponse(object): 'access_token_scheme': 'ask_smapi_model.v1.skill.account_linking.access_token_scheme_type.AccessTokenSchemeType', 'default_token_expiration_in_seconds': 'int', 'redirect_urls': 'list[str]', - 'authorization_urls_by_platform': 'list[ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url.AccountLinkingPlatformAuthorizationUrl]' + 'authorization_urls_by_platform': 'list[ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url.AccountLinkingPlatformAuthorizationUrl]', + 'voice_forward_account_linking': 'ask_smapi_model.v1.skill.account_linking.voice_forward_account_linking_status.VoiceForwardAccountLinkingStatus' } # type: Dict attribute_map = { @@ -78,12 +82,13 @@ class AccountLinkingResponse(object): 'access_token_scheme': 'accessTokenScheme', 'default_token_expiration_in_seconds': 'defaultTokenExpirationInSeconds', 'redirect_urls': 'redirectUrls', - 'authorization_urls_by_platform': 'authorizationUrlsByPlatform' + 'authorization_urls_by_platform': 'authorizationUrlsByPlatform', + 'voice_forward_account_linking': 'voiceForwardAccountLinking' } # type: Dict supports_multiple_types = False - def __init__(self, object_type=None, authorization_url=None, domains=None, client_id=None, scopes=None, access_token_url=None, access_token_scheme=None, default_token_expiration_in_seconds=None, redirect_urls=None, authorization_urls_by_platform=None): - # type: (Optional[AccountLinkingTypeV1], Optional[str], Optional[List[object]], Optional[str], Optional[List[object]], Optional[str], Optional[AccessTokenSchemeTypeV1], Optional[int], Optional[List[object]], Optional[List[AccountLinkingPlatformAuthorizationUrlV1]]) -> None + def __init__(self, object_type=None, authorization_url=None, domains=None, client_id=None, scopes=None, access_token_url=None, access_token_scheme=None, default_token_expiration_in_seconds=None, redirect_urls=None, authorization_urls_by_platform=None, voice_forward_account_linking=None): + # type: (Optional[AccountLinkingType_bb3d8e2], Optional[str], Optional[List[object]], Optional[str], Optional[List[object]], Optional[str], Optional[AccessTokenSchemeType_e9bad6d7], Optional[int], Optional[List[object]], Optional[List[AccountLinkingPlatformAuthorizationUrl_2972ebae]], Optional[VoiceForwardAccountLinkingStatus_5cb337ee]) -> None """The account linking information of a skill. :param object_type: @@ -106,6 +111,8 @@ def __init__(self, object_type=None, authorization_url=None, domains=None, clien :type redirect_urls: (optional) list[str] :param authorization_urls_by_platform: The list of valid authorization urls for allowed platforms to initiate account linking. :type authorization_urls_by_platform: (optional) list[ask_smapi_model.v1.skill.account_linking.account_linking_platform_authorization_url.AccountLinkingPlatformAuthorizationUrl] + :param voice_forward_account_linking: + :type voice_forward_account_linking: (optional) ask_smapi_model.v1.skill.account_linking.voice_forward_account_linking_status.VoiceForwardAccountLinkingStatus """ self.__discriminator_value = None # type: str @@ -119,6 +126,7 @@ def __init__(self, object_type=None, authorization_url=None, domains=None, clien self.default_token_expiration_in_seconds = default_token_expiration_in_seconds self.redirect_urls = redirect_urls self.authorization_urls_by_platform = authorization_urls_by_platform + self.voice_forward_account_linking = voice_forward_account_linking def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_type.py index 0973732e..bbfa3250 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class AccountLinkingType(Enum): IMPLICIT = "IMPLICIT" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, AccountLinkingType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/platform_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/platform_type.py index 3ab796de..8082bdfc 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/platform_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/platform_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PlatformType(Enum): Android = "Android" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PlatformType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/voice_forward_account_linking_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/voice_forward_account_linking_status.py new file mode 100644 index 00000000..247509c0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/voice_forward_account_linking_status.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class VoiceForwardAccountLinkingStatus(Enum): + """ + Defines the voice forward account linking status of a skill. + + + + Allowed enum values: [ENABLED, DISABLED] + """ + ENABLED = "ENABLED" + DISABLED = "DISABLED" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, VoiceForwardAccountLinkingStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/action.py b/ask-smapi-model/ask_smapi_model/v1/skill/action.py index f39ac750..69328c82 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/action.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/action.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class Action(Enum): DISASSOCIATE = "DISASSOCIATE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Action): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/agreement_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/agreement_type.py index 65ff6d21..c7f89593 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/agreement_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/agreement_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class AgreementType(Enum): EXPORT_COMPLIANCE = "EXPORT_COMPLIANCE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, AgreementType): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/__init__.py index 563f2f52..1e35c83c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/__init__.py @@ -14,16 +14,17 @@ # from __future__ import absolute_import -from .hosted_skill_permission import HostedSkillPermission -from .alexa_hosted_config import AlexaHostedConfig -from .hosted_skill_permission_type import HostedSkillPermissionType -from .hosted_skill_repository_info import HostedSkillRepositoryInfo from .hosted_skill_runtime import HostedSkillRuntime -from .hosted_skill_repository_credentials import HostedSkillRepositoryCredentials -from .hosted_skill_info import HostedSkillInfo -from .hosted_skill_repository import HostedSkillRepository -from .hosted_skill_metadata import HostedSkillMetadata -from .hosted_skill_repository_credentials_list import HostedSkillRepositoryCredentialsList from .hosted_skill_repository_credentials_request import HostedSkillRepositoryCredentialsRequest +from .hosted_skill_permission_type import HostedSkillPermissionType from .hosting_configuration import HostingConfiguration +from .hosted_skill_info import HostedSkillInfo from .hosted_skill_permission_status import HostedSkillPermissionStatus +from .hosted_skill_permission import HostedSkillPermission +from .hosted_skill_repository import HostedSkillRepository +from .hosted_skill_repository_credentials_list import HostedSkillRepositoryCredentialsList +from .hosted_skill_metadata import HostedSkillMetadata +from .hosted_skill_repository_credentials import HostedSkillRepositoryCredentials +from .hosted_skill_repository_info import HostedSkillRepositoryInfo +from .alexa_hosted_config import AlexaHostedConfig +from .hosted_skill_region import HostedSkillRegion diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/alexa_hosted_config.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/alexa_hosted_config.py index cfb0a258..ec9a0e35 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/alexa_hosted_config.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/alexa_hosted_config.py @@ -21,9 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime import HostedSkillRuntimeV1 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_region import HostedSkillRegion as HostedSkillRegion_40868d85 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime import HostedSkillRuntime as HostedSkillRuntime_6f3a4c25 class AlexaHostedConfig(object): @@ -33,27 +34,34 @@ class AlexaHostedConfig(object): :param runtime: :type runtime: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime.HostedSkillRuntime + :param region: + :type region: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_region.HostedSkillRegion """ deserialized_types = { - 'runtime': 'ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime.HostedSkillRuntime' + 'runtime': 'ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime.HostedSkillRuntime', + 'region': 'ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_region.HostedSkillRegion' } # type: Dict attribute_map = { - 'runtime': 'runtime' + 'runtime': 'runtime', + 'region': 'region' } # type: Dict supports_multiple_types = False - def __init__(self, runtime=None): - # type: (Optional[HostedSkillRuntimeV1]) -> None + def __init__(self, runtime=None, region=None): + # type: (Optional[HostedSkillRuntime_6f3a4c25], Optional[HostedSkillRegion_40868d85]) -> None """Alexa hosted skill create configuration :param runtime: :type runtime: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime.HostedSkillRuntime + :param region: + :type region: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_region.HostedSkillRegion """ self.__discriminator_value = None # type: str self.runtime = runtime + self.region = region def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_info.py index 2584cbb3..a7fb5b44 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_info.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_info.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info import HostedSkillRepositoryInfoV1 - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime import HostedSkillRuntimeV1 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime import HostedSkillRuntime as HostedSkillRuntime_6f3a4c25 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info import HostedSkillRepositoryInfo as HostedSkillRepositoryInfo_957f5416 class HostedSkillInfo(object): @@ -48,7 +48,7 @@ class HostedSkillInfo(object): supports_multiple_types = False def __init__(self, repository=None, runtime=None): - # type: (Optional[HostedSkillRepositoryInfoV1], Optional[HostedSkillRuntimeV1]) -> None + # type: (Optional[HostedSkillRepositoryInfo_957f5416], Optional[HostedSkillRuntime_6f3a4c25]) -> None """ :param repository: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.py index 78138820..f7570d3e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_info import HostedSkillInfoV1 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_info import HostedSkillInfo as HostedSkillInfo_de0ff179 class HostedSkillMetadata(object): @@ -45,7 +45,7 @@ class HostedSkillMetadata(object): supports_multiple_types = False def __init__(self, alexa_hosted=None): - # type: (Optional[HostedSkillInfoV1]) -> None + # type: (Optional[HostedSkillInfo_de0ff179]) -> None """Alexa Hosted skill's metadata :param alexa_hosted: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission.py index 681bf807..0cae1799 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission_type import HostedSkillPermissionTypeV1 - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission_status import HostedSkillPermissionStatusV1 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission_type import HostedSkillPermissionType as HostedSkillPermissionType_97df770e + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission_status import HostedSkillPermissionStatus as HostedSkillPermissionStatus_52fd27be class HostedSkillPermission(object): @@ -54,7 +54,7 @@ class HostedSkillPermission(object): supports_multiple_types = False def __init__(self, permission=None, status=None, action_url=None): - # type: (Optional[HostedSkillPermissionTypeV1], Optional[HostedSkillPermissionStatusV1], Optional[str]) -> None + # type: (Optional[HostedSkillPermissionType_97df770e], Optional[HostedSkillPermissionStatus_52fd27be], Optional[str]) -> None """Customer's permission about Hosted skill features. :param permission: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_status.py index 55c54a0b..a71d27f4 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class HostedSkillPermissionStatus(Enum): RATE_EXCEEDED = "RATE_EXCEEDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, HostedSkillPermissionStatus): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_type.py index e5155bfd..7c97295e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -34,7 +34,7 @@ class HostedSkillPermissionType(Enum): NEW_SKILL = "NEW_SKILL" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -50,7 +50,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, HostedSkillPermissionType): return False @@ -58,6 +58,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_region.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_region.py new file mode 100644 index 00000000..189177ff --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_region.py @@ -0,0 +1,67 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class HostedSkillRegion(Enum): + """ + Hosted skill AWS region + + + + Allowed enum values: [US_EAST_1, US_WEST_2, EU_WEST_1] + """ + US_EAST_1 = "US_EAST_1" + US_WEST_2 = "US_WEST_2" + EU_WEST_1 = "EU_WEST_1" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, HostedSkillRegion): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository.py index 571df26f..bc2628f9 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -34,7 +34,7 @@ class HostedSkillRepository(Enum): GIT = "GIT" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -50,7 +50,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, HostedSkillRepository): return False @@ -58,6 +58,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials.py index fc0a3683..fb160694 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials_list.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials_list.py index 3ffd06af..f9e945f4 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials_list.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials_list.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials import HostedSkillRepositoryCredentialsV1 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials import HostedSkillRepositoryCredentials as HostedSkillRepositoryCredentials_d0820c6e class HostedSkillRepositoryCredentialsList(object): @@ -45,7 +45,7 @@ class HostedSkillRepositoryCredentialsList(object): supports_multiple_types = False def __init__(self, repository_credentials=None): - # type: (Optional[HostedSkillRepositoryCredentialsV1]) -> None + # type: (Optional[HostedSkillRepositoryCredentials_d0820c6e]) -> None """defines the structure for the hosted skill repository credentials response :param repository_credentials: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials_request.py index d0f4fdee..56418e06 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info import HostedSkillRepositoryInfoV1 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info import HostedSkillRepositoryInfo as HostedSkillRepositoryInfo_957f5416 class HostedSkillRepositoryCredentialsRequest(object): @@ -43,7 +43,7 @@ class HostedSkillRepositoryCredentialsRequest(object): supports_multiple_types = False def __init__(self, repository=None): - # type: (Optional[HostedSkillRepositoryInfoV1]) -> None + # type: (Optional[HostedSkillRepositoryInfo_957f5416]) -> None """ :param repository: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_info.py index f4589f07..e17c0aa7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_info.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_info.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository import HostedSkillRepositoryV1 + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository import HostedSkillRepository as HostedSkillRepository_4a5af8b1 class HostedSkillRepositoryInfo(object): @@ -49,7 +49,7 @@ class HostedSkillRepositoryInfo(object): supports_multiple_types = False def __init__(self, url=None, object_type=None): - # type: (Optional[str], Optional[HostedSkillRepositoryV1]) -> None + # type: (Optional[str], Optional[HostedSkillRepository_4a5af8b1]) -> None """Alexa Hosted Skill's Repository Information :param url: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_runtime.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_runtime.py index 108cbc96..463dec1f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_runtime.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_runtime.py @@ -21,23 +21,25 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class HostedSkillRuntime(Enum): """ - Hosted skill lambda runtime + Hosted skill lambda runtime; Node.js 12.x is deprecated by Hosted Skill service as of October 24, 2022. - Allowed enum values: [NODE_10_X, PYTHON_3_7] + Allowed enum values: [NODE_10_X, PYTHON_3_7, NODE_12_X, NODE_16_X] """ NODE_10_X = "NODE_10_X" PYTHON_3_7 = "PYTHON_3_7" + NODE_12_X = "NODE_12_X" + NODE_16_X = "NODE_16_X" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, HostedSkillRuntime): return False @@ -61,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosting_configuration.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosting_configuration.py index f02a514f..35fd5104 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosting_configuration.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosting_configuration.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.alexa_hosted.alexa_hosted_config import AlexaHostedConfigV1 + from ask_smapi_model.v1.skill.alexa_hosted.alexa_hosted_config import AlexaHostedConfig as AlexaHostedConfig_4d3d0617 class HostingConfiguration(object): @@ -45,7 +45,7 @@ class HostingConfiguration(object): supports_multiple_types = False def __init__(self, alexa_hosted=None): - # type: (Optional[AlexaHostedConfigV1]) -> None + # type: (Optional[AlexaHostedConfig_4d3d0617]) -> None """Configurations for creating new hosted skill :param alexa_hosted: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/__init__.py deleted file mode 100644 index 0e91f483..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. -# -from __future__ import absolute_import - -from .create_asr_annotation_set_request_object import CreateAsrAnnotationSetRequestObject -from .audio_asset import AudioAsset -from .pagination_context import PaginationContext -from .annotation_with_audio_asset import AnnotationWithAudioAsset -from .annotation_set_items import AnnotationSetItems -from .audio_asset_download_url_expiry_time import AudioAssetDownloadUrlExpiryTime -from .annotation import Annotation -from .list_asr_annotation_sets_response import ListASRAnnotationSetsResponse -from .update_asr_annotation_set_contents_payload import UpdateAsrAnnotationSetContentsPayload -from .create_asr_annotation_set_response import CreateAsrAnnotationSetResponse -from .annotation_set_metadata import AnnotationSetMetadata -from .audio_asset_download_url import AudioAssetDownloadUrl -from .get_asr_annotation_set_annotations_response import GetAsrAnnotationSetAnnotationsResponse -from .get_asr_annotation_sets_properties_response import GetASRAnnotationSetsPropertiesResponse -from .update_asr_annotation_set_properties_request_object import UpdateAsrAnnotationSetPropertiesRequestObject diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation.py b/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation.py deleted file mode 100644 index 51996213..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation.py +++ /dev/null @@ -1,129 +0,0 @@ -# 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 - - -if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union - from datetime import datetime - - -class Annotation(object): - """ - A single test case that describes the audio reference, expected transcriptions, test case weight etc. Each annotation object must have at least expectedTranscription or, uploadId and filePathInUpload in pair. In any case, filePathInUpload and uploadId must be present or missing in pair. - - - :param upload_id: Upload id obtained when developer creates an upload using catalog API. Required to be present when expectedTranscription is missing. When uploadId is present, filePathInUpload must also be present. - :type upload_id: (optional) str - :param file_path_in_upload: File path in the uploaded zip file. For example, a zip containing a folder named 'a' and there is an audio b.mp3 in that folder. The file path is a/b.mp3. Notice that forward slash ('/') should be used to concatenate directories. Required to be present when expectedTranscription is missing. When filePathInUpload is present, uploadId must also be present. - :type file_path_in_upload: (optional) str - :param evaluation_weight: Weight of the test case in an evaluation, the value would be used for calculating metrics such as overall error rate. The acceptable values are from 1 - 1000. 1 means least significant, 1000 means mot significant. Here is how weight impact the `OVERALL_ERROR_RATE` calculation: For example, an annotation set consists of 3 annotations and they have weight of 8, 1, 1. The evaluation results show that only the first annotation test case passed while the rest of the test cases failed. In this case, the overall error rate is (8 / (8 + 1 + 1)) = 0.8 - :type evaluation_weight: (optional) float - :param expected_transcription: Expected transcription text for the input audio. The acceptable length of the string is between 1 and 500 Unicode characters. Required to be present when uploadId and filePathInUpload are missing. - :type expected_transcription: (optional) str - - """ - deserialized_types = { - 'upload_id': 'str', - 'file_path_in_upload': 'str', - 'evaluation_weight': 'float', - 'expected_transcription': 'str' - } # type: Dict - - attribute_map = { - 'upload_id': 'uploadId', - 'file_path_in_upload': 'filePathInUpload', - 'evaluation_weight': 'evaluationWeight', - 'expected_transcription': 'expectedTranscription' - } # type: Dict - supports_multiple_types = False - - def __init__(self, upload_id=None, file_path_in_upload=None, evaluation_weight=None, expected_transcription=None): - # type: (Optional[str], Optional[str], Optional[float], Optional[str]) -> None - """A single test case that describes the audio reference, expected transcriptions, test case weight etc. Each annotation object must have at least expectedTranscription or, uploadId and filePathInUpload in pair. In any case, filePathInUpload and uploadId must be present or missing in pair. - - :param upload_id: Upload id obtained when developer creates an upload using catalog API. Required to be present when expectedTranscription is missing. When uploadId is present, filePathInUpload must also be present. - :type upload_id: (optional) str - :param file_path_in_upload: File path in the uploaded zip file. For example, a zip containing a folder named 'a' and there is an audio b.mp3 in that folder. The file path is a/b.mp3. Notice that forward slash ('/') should be used to concatenate directories. Required to be present when expectedTranscription is missing. When filePathInUpload is present, uploadId must also be present. - :type file_path_in_upload: (optional) str - :param evaluation_weight: Weight of the test case in an evaluation, the value would be used for calculating metrics such as overall error rate. The acceptable values are from 1 - 1000. 1 means least significant, 1000 means mot significant. Here is how weight impact the `OVERALL_ERROR_RATE` calculation: For example, an annotation set consists of 3 annotations and they have weight of 8, 1, 1. The evaluation results show that only the first annotation test case passed while the rest of the test cases failed. In this case, the overall error rate is (8 / (8 + 1 + 1)) = 0.8 - :type evaluation_weight: (optional) float - :param expected_transcription: Expected transcription text for the input audio. The acceptable length of the string is between 1 and 500 Unicode characters. Required to be present when uploadId and filePathInUpload are missing. - :type expected_transcription: (optional) str - """ - self.__discriminator_value = None # type: str - - self.upload_id = upload_id - self.file_path_in_upload = file_path_in_upload - self.evaluation_weight = evaluation_weight - self.expected_transcription = expected_transcription - - 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, Annotation): - 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-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation_with_audio_asset.py b/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation_with_audio_asset.py deleted file mode 100644 index dd1c441d..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation_with_audio_asset.py +++ /dev/null @@ -1,135 +0,0 @@ -# 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_smapi_model.v1.skill.asr.annotation_sets.annotation import Annotation - - -if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union - from datetime import datetime - from ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset import AudioAssetV1 - - -class AnnotationWithAudioAsset(Annotation): - """ - Object containing annotation content and audio file download information. - - - :param upload_id: Upload id obtained when developer creates an upload using catalog API. Required to be present when expectedTranscription is missing. When uploadId is present, filePathInUpload must also be present. - :type upload_id: (optional) str - :param file_path_in_upload: File path in the uploaded zip file. For example, a zip containing a folder named 'a' and there is an audio b.mp3 in that folder. The file path is a/b.mp3. Notice that forward slash ('/') should be used to concatenate directories. Required to be present when expectedTranscription is missing. When filePathInUpload is present, uploadId must also be present. - :type file_path_in_upload: (optional) str - :param evaluation_weight: Weight of the test case in an evaluation, the value would be used for calculating metrics such as overall error rate. The acceptable values are from 1 - 1000. 1 means least significant, 1000 means mot significant. Here is how weight impact the `OVERALL_ERROR_RATE` calculation: For example, an annotation set consists of 3 annotations and they have weight of 8, 1, 1. The evaluation results show that only the first annotation test case passed while the rest of the test cases failed. In this case, the overall error rate is (8 / (8 + 1 + 1)) = 0.8 - :type evaluation_weight: (optional) float - :param expected_transcription: Expected transcription text for the input audio. The acceptable length of the string is between 1 and 500 Unicode characters. Required to be present when uploadId and filePathInUpload are missing. - :type expected_transcription: (optional) str - :param audio_asset: - :type audio_asset: (optional) ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset.AudioAsset - - """ - deserialized_types = { - 'upload_id': 'str', - 'file_path_in_upload': 'str', - 'evaluation_weight': 'float', - 'expected_transcription': 'str', - 'audio_asset': 'ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset.AudioAsset' - } # type: Dict - - attribute_map = { - 'upload_id': 'uploadId', - 'file_path_in_upload': 'filePathInUpload', - 'evaluation_weight': 'evaluationWeight', - 'expected_transcription': 'expectedTranscription', - 'audio_asset': 'audioAsset' - } # type: Dict - supports_multiple_types = False - - def __init__(self, upload_id=None, file_path_in_upload=None, evaluation_weight=None, expected_transcription=None, audio_asset=None): - # type: (Optional[str], Optional[str], Optional[float], Optional[str], Optional[AudioAssetV1]) -> None - """Object containing annotation content and audio file download information. - - :param upload_id: Upload id obtained when developer creates an upload using catalog API. Required to be present when expectedTranscription is missing. When uploadId is present, filePathInUpload must also be present. - :type upload_id: (optional) str - :param file_path_in_upload: File path in the uploaded zip file. For example, a zip containing a folder named 'a' and there is an audio b.mp3 in that folder. The file path is a/b.mp3. Notice that forward slash ('/') should be used to concatenate directories. Required to be present when expectedTranscription is missing. When filePathInUpload is present, uploadId must also be present. - :type file_path_in_upload: (optional) str - :param evaluation_weight: Weight of the test case in an evaluation, the value would be used for calculating metrics such as overall error rate. The acceptable values are from 1 - 1000. 1 means least significant, 1000 means mot significant. Here is how weight impact the `OVERALL_ERROR_RATE` calculation: For example, an annotation set consists of 3 annotations and they have weight of 8, 1, 1. The evaluation results show that only the first annotation test case passed while the rest of the test cases failed. In this case, the overall error rate is (8 / (8 + 1 + 1)) = 0.8 - :type evaluation_weight: (optional) float - :param expected_transcription: Expected transcription text for the input audio. The acceptable length of the string is between 1 and 500 Unicode characters. Required to be present when uploadId and filePathInUpload are missing. - :type expected_transcription: (optional) str - :param audio_asset: - :type audio_asset: (optional) ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset.AudioAsset - """ - self.__discriminator_value = None # type: str - - super(AnnotationWithAudioAsset, self).__init__(upload_id=upload_id, file_path_in_upload=file_path_in_upload, evaluation_weight=evaluation_weight, expected_transcription=expected_transcription) - self.audio_asset = audio_asset - - 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, AnnotationWithAudioAsset): - 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-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/get_asr_annotation_set_annotations_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/get_asr_annotation_set_annotations_response.py deleted file mode 100644 index 65b545ae..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/get_asr_annotation_set_annotations_response.py +++ /dev/null @@ -1,117 +0,0 @@ -# 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 - - -if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union - from datetime import datetime - from ask_smapi_model.v1.skill.asr.annotation_sets.pagination_context import PaginationContextV1 - from ask_smapi_model.v1.skill.asr.annotation_sets.annotation_with_audio_asset import AnnotationWithAudioAssetV1 - - -class GetAsrAnnotationSetAnnotationsResponse(object): - """ - This is the payload schema for annotation set contents. Note that when uploadId and filePathInUpload is present, and the payload content type is 'application/json', audioAsset is included in the returned annotation set content payload. For 'text/csv' annotation set content type, audioAssetDownloadUrl and audioAssetDownloadUrlExpiryTime are included in the csv headers for representing the audio download url and the expiry time of the presigned audio download. - - - :param annotations: - :type annotations: (optional) list[ask_smapi_model.v1.skill.asr.annotation_sets.annotation_with_audio_asset.AnnotationWithAudioAsset] - :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.asr.annotation_sets.pagination_context.PaginationContext - - """ - deserialized_types = { - 'annotations': 'list[ask_smapi_model.v1.skill.asr.annotation_sets.annotation_with_audio_asset.AnnotationWithAudioAsset]', - 'pagination_context': 'ask_smapi_model.v1.skill.asr.annotation_sets.pagination_context.PaginationContext' - } # type: Dict - - attribute_map = { - 'annotations': 'annotations', - 'pagination_context': 'paginationContext' - } # type: Dict - supports_multiple_types = False - - def __init__(self, annotations=None, pagination_context=None): - # type: (Optional[List[AnnotationWithAudioAssetV1]], Optional[PaginationContextV1]) -> None - """This is the payload schema for annotation set contents. Note that when uploadId and filePathInUpload is present, and the payload content type is 'application/json', audioAsset is included in the returned annotation set content payload. For 'text/csv' annotation set content type, audioAssetDownloadUrl and audioAssetDownloadUrlExpiryTime are included in the csv headers for representing the audio download url and the expiry time of the presigned audio download. - - :param annotations: - :type annotations: (optional) list[ask_smapi_model.v1.skill.asr.annotation_sets.annotation_with_audio_asset.AnnotationWithAudioAsset] - :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.asr.annotation_sets.pagination_context.PaginationContext - """ - self.__discriminator_value = None # type: str - - self.annotations = annotations - self.pagination_context = pagination_context - - 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, GetAsrAnnotationSetAnnotationsResponse): - 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/__init__.py deleted file mode 100644 index 9c2bfc34..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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. -# -from __future__ import absolute_import - -from .evaluation_items import EvaluationItems -from .evaluation_result_output import EvaluationResultOutput -from .error_object import ErrorObject -from .audio_asset import AudioAsset -from .pagination_context import PaginationContext -from .evaluation_status import EvaluationStatus -from .annotation_with_audio_asset import AnnotationWithAudioAsset -from .annotation import Annotation -from .list_asr_evaluations_response import ListAsrEvaluationsResponse -from .evaluation_metadata_result import EvaluationMetadataResult -from .skill import Skill -from .evaluation_metadata import EvaluationMetadata -from .post_asr_evaluations_response_object import PostAsrEvaluationsResponseObject -from .get_asr_evaluation_status_response_object import GetAsrEvaluationStatusResponseObject -from .evaluation_result import EvaluationResult -from .evaluation_result_status import EvaluationResultStatus -from .post_asr_evaluations_request_object import PostAsrEvaluationsRequestObject -from .get_asr_evaluations_results_response import GetAsrEvaluationsResultsResponse -from .metrics import Metrics diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/annotation.py b/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/annotation.py deleted file mode 100644 index 4ebb4063..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/annotation.py +++ /dev/null @@ -1,127 +0,0 @@ -# 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 - - -if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union - from datetime import datetime - - -class Annotation(object): - """ - - :param upload_id: upload id obtained when developer creates an upload using catalog API - :type upload_id: (optional) str - :param file_path_in_upload: file path in the uploaded zip file. For example, a zip containing a folder named 'a' and there is an audio b.mp3 in that folder. The file path is a/b.mp3. Notice that forward slash ('/') should be used to concatenate directories. - :type file_path_in_upload: (optional) str - :param evaluation_weight: weight of the test case in an evaluation, the value would be used for calculating metrics such as overall error rate. The acceptable values are from 1 - 1000. 1 means least significant, 1000 means mot significant. Here is how weight impact the `OVERALL_ERROR_RATE` calculation: For example, an annotation set consists of 3 annotations and they have weight of 8, 1, 1. The evaluation results show that only the first annotation test case passed while the rest of the test cases failed. In this case, the overall error rate is (8 / (8 + 1 + 1)) = 0.8 - :type evaluation_weight: (optional) float - :param expected_transcription: expected transcription text for the input audio. The acceptable length of the string is between 1 and 500 Unicode characters - :type expected_transcription: (optional) str - - """ - deserialized_types = { - 'upload_id': 'str', - 'file_path_in_upload': 'str', - 'evaluation_weight': 'float', - 'expected_transcription': 'str' - } # type: Dict - - attribute_map = { - 'upload_id': 'uploadId', - 'file_path_in_upload': 'filePathInUpload', - 'evaluation_weight': 'evaluationWeight', - 'expected_transcription': 'expectedTranscription' - } # type: Dict - supports_multiple_types = False - - def __init__(self, upload_id=None, file_path_in_upload=None, evaluation_weight=None, expected_transcription=None): - # type: (Optional[str], Optional[str], Optional[float], Optional[str]) -> None - """ - - :param upload_id: upload id obtained when developer creates an upload using catalog API - :type upload_id: (optional) str - :param file_path_in_upload: file path in the uploaded zip file. For example, a zip containing a folder named 'a' and there is an audio b.mp3 in that folder. The file path is a/b.mp3. Notice that forward slash ('/') should be used to concatenate directories. - :type file_path_in_upload: (optional) str - :param evaluation_weight: weight of the test case in an evaluation, the value would be used for calculating metrics such as overall error rate. The acceptable values are from 1 - 1000. 1 means least significant, 1000 means mot significant. Here is how weight impact the `OVERALL_ERROR_RATE` calculation: For example, an annotation set consists of 3 annotations and they have weight of 8, 1, 1. The evaluation results show that only the first annotation test case passed while the rest of the test cases failed. In this case, the overall error rate is (8 / (8 + 1 + 1)) = 0.8 - :type evaluation_weight: (optional) float - :param expected_transcription: expected transcription text for the input audio. The acceptable length of the string is between 1 and 500 Unicode characters - :type expected_transcription: (optional) str - """ - self.__discriminator_value = None # type: str - - self.upload_id = upload_id - self.file_path_in_upload = file_path_in_upload - self.evaluation_weight = evaluation_weight - self.expected_transcription = expected_transcription - - 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, Annotation): - 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/annotation_with_audio_asset.py b/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/annotation_with_audio_asset.py deleted file mode 100644 index 8d3d33ea..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/annotation_with_audio_asset.py +++ /dev/null @@ -1,135 +0,0 @@ -# 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_smapi_model.v1.skill.asr.evaluations.annotation import Annotation - - -if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union - from datetime import datetime - from ask_smapi_model.v1.skill.asr.evaluations.audio_asset import AudioAssetV1 - - -class AnnotationWithAudioAsset(Annotation): - """ - object containing annotation content and audio file download information. - - - :param upload_id: upload id obtained when developer creates an upload using catalog API - :type upload_id: (optional) str - :param file_path_in_upload: file path in the uploaded zip file. For example, a zip containing a folder named 'a' and there is an audio b.mp3 in that folder. The file path is a/b.mp3. Notice that forward slash ('/') should be used to concatenate directories. - :type file_path_in_upload: (optional) str - :param evaluation_weight: weight of the test case in an evaluation, the value would be used for calculating metrics such as overall error rate. The acceptable values are from 1 - 1000. 1 means least significant, 1000 means mot significant. Here is how weight impact the `OVERALL_ERROR_RATE` calculation: For example, an annotation set consists of 3 annotations and they have weight of 8, 1, 1. The evaluation results show that only the first annotation test case passed while the rest of the test cases failed. In this case, the overall error rate is (8 / (8 + 1 + 1)) = 0.8 - :type evaluation_weight: (optional) float - :param expected_transcription: expected transcription text for the input audio. The acceptable length of the string is between 1 and 500 Unicode characters - :type expected_transcription: (optional) str - :param audio_asset: - :type audio_asset: (optional) ask_smapi_model.v1.skill.asr.evaluations.audio_asset.AudioAsset - - """ - deserialized_types = { - 'upload_id': 'str', - 'file_path_in_upload': 'str', - 'evaluation_weight': 'float', - 'expected_transcription': 'str', - 'audio_asset': 'ask_smapi_model.v1.skill.asr.evaluations.audio_asset.AudioAsset' - } # type: Dict - - attribute_map = { - 'upload_id': 'uploadId', - 'file_path_in_upload': 'filePathInUpload', - 'evaluation_weight': 'evaluationWeight', - 'expected_transcription': 'expectedTranscription', - 'audio_asset': 'audioAsset' - } # type: Dict - supports_multiple_types = False - - def __init__(self, upload_id=None, file_path_in_upload=None, evaluation_weight=None, expected_transcription=None, audio_asset=None): - # type: (Optional[str], Optional[str], Optional[float], Optional[str], Optional[AudioAssetV1]) -> None - """object containing annotation content and audio file download information. - - :param upload_id: upload id obtained when developer creates an upload using catalog API - :type upload_id: (optional) str - :param file_path_in_upload: file path in the uploaded zip file. For example, a zip containing a folder named 'a' and there is an audio b.mp3 in that folder. The file path is a/b.mp3. Notice that forward slash ('/') should be used to concatenate directories. - :type file_path_in_upload: (optional) str - :param evaluation_weight: weight of the test case in an evaluation, the value would be used for calculating metrics such as overall error rate. The acceptable values are from 1 - 1000. 1 means least significant, 1000 means mot significant. Here is how weight impact the `OVERALL_ERROR_RATE` calculation: For example, an annotation set consists of 3 annotations and they have weight of 8, 1, 1. The evaluation results show that only the first annotation test case passed while the rest of the test cases failed. In this case, the overall error rate is (8 / (8 + 1 + 1)) = 0.8 - :type evaluation_weight: (optional) float - :param expected_transcription: expected transcription text for the input audio. The acceptable length of the string is between 1 and 500 Unicode characters - :type expected_transcription: (optional) str - :param audio_asset: - :type audio_asset: (optional) ask_smapi_model.v1.skill.asr.evaluations.audio_asset.AudioAsset - """ - self.__discriminator_value = None # type: str - - super(AnnotationWithAudioAsset, self).__init__(upload_id=upload_id, file_path_in_upload=file_path_in_upload, evaluation_weight=evaluation_weight, expected_transcription=expected_transcription) - self.audio_asset = audio_asset - - 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, AnnotationWithAudioAsset): - 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_items.py deleted file mode 100644 index 226ad6b3..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_items.py +++ /dev/null @@ -1,154 +0,0 @@ -# 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_smapi_model.v1.skill.asr.evaluations.evaluation_metadata import EvaluationMetadata - - -if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union - from datetime import datetime - from ask_smapi_model.v1.skill.asr.evaluations.error_object import ErrorObjectV1 - from ask_smapi_model.v1.skill.asr.evaluations.evaluation_status import EvaluationStatusV1 - from ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result import EvaluationMetadataResultV1 - from ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object import PostAsrEvaluationsRequestObjectV1 - - -class EvaluationItems(EvaluationMetadata): - """ - - :param status: - :type status: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_status.EvaluationStatus - :param total_evaluation_count: indicate the total number of evaluations that are supposed to be run in the evaluation request - :type total_evaluation_count: (optional) float - :param completed_evaluation_count: indicate the number of completed evaluations - :type completed_evaluation_count: (optional) float - :param start_timestamp: indicate the start time stamp of the ASR evaluation job. ISO-8601 Format. - :type start_timestamp: (optional) datetime - :param request: - :type request: (optional) ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object.PostAsrEvaluationsRequestObject - :param error: - :type error: (optional) ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject - :param result: - :type result: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result.EvaluationMetadataResult - :param id: evaluation id - :type id: (optional) str - - """ - deserialized_types = { - 'status': 'ask_smapi_model.v1.skill.asr.evaluations.evaluation_status.EvaluationStatus', - 'total_evaluation_count': 'float', - 'completed_evaluation_count': 'float', - 'start_timestamp': 'datetime', - 'request': 'ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object.PostAsrEvaluationsRequestObject', - 'error': 'ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject', - 'result': 'ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result.EvaluationMetadataResult', - 'id': 'str' - } # type: Dict - - attribute_map = { - 'status': 'status', - 'total_evaluation_count': 'totalEvaluationCount', - 'completed_evaluation_count': 'completedEvaluationCount', - 'start_timestamp': 'startTimestamp', - 'request': 'request', - 'error': 'error', - 'result': 'result', - 'id': 'id' - } # type: Dict - supports_multiple_types = False - - def __init__(self, status=None, total_evaluation_count=None, completed_evaluation_count=None, start_timestamp=None, request=None, error=None, result=None, id=None): - # type: (Optional[EvaluationStatusV1], Optional[float], Optional[float], Optional[datetime], Optional[PostAsrEvaluationsRequestObjectV1], Optional[ErrorObjectV1], Optional[EvaluationMetadataResultV1], Optional[str]) -> None - """ - - :param status: - :type status: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_status.EvaluationStatus - :param total_evaluation_count: indicate the total number of evaluations that are supposed to be run in the evaluation request - :type total_evaluation_count: (optional) float - :param completed_evaluation_count: indicate the number of completed evaluations - :type completed_evaluation_count: (optional) float - :param start_timestamp: indicate the start time stamp of the ASR evaluation job. ISO-8601 Format. - :type start_timestamp: (optional) datetime - :param request: - :type request: (optional) ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object.PostAsrEvaluationsRequestObject - :param error: - :type error: (optional) ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject - :param result: - :type result: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result.EvaluationMetadataResult - :param id: evaluation id - :type id: (optional) str - """ - self.__discriminator_value = None # type: str - - super(EvaluationItems, self).__init__(status=status, total_evaluation_count=total_evaluation_count, completed_evaluation_count=completed_evaluation_count, start_timestamp=start_timestamp, request=request, error=error, result=result) - self.id = 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, EvaluationItems): - 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_metadata.py b/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_metadata.py deleted file mode 100644 index 0235bfe3..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_metadata.py +++ /dev/null @@ -1,154 +0,0 @@ -# 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 - - -if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union - from datetime import datetime - from ask_smapi_model.v1.skill.asr.evaluations.error_object import ErrorObjectV1 - from ask_smapi_model.v1.skill.asr.evaluations.evaluation_status import EvaluationStatusV1 - from ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result import EvaluationMetadataResultV1 - from ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object import PostAsrEvaluationsRequestObjectV1 - - -class EvaluationMetadata(object): - """ - response body for GetAsrEvaluationsStatus API - - - :param status: - :type status: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_status.EvaluationStatus - :param total_evaluation_count: indicate the total number of evaluations that are supposed to be run in the evaluation request - :type total_evaluation_count: (optional) float - :param completed_evaluation_count: indicate the number of completed evaluations - :type completed_evaluation_count: (optional) float - :param start_timestamp: indicate the start time stamp of the ASR evaluation job. ISO-8601 Format. - :type start_timestamp: (optional) datetime - :param request: - :type request: (optional) ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object.PostAsrEvaluationsRequestObject - :param error: - :type error: (optional) ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject - :param result: - :type result: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result.EvaluationMetadataResult - - """ - deserialized_types = { - 'status': 'ask_smapi_model.v1.skill.asr.evaluations.evaluation_status.EvaluationStatus', - 'total_evaluation_count': 'float', - 'completed_evaluation_count': 'float', - 'start_timestamp': 'datetime', - 'request': 'ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object.PostAsrEvaluationsRequestObject', - 'error': 'ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject', - 'result': 'ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result.EvaluationMetadataResult' - } # type: Dict - - attribute_map = { - 'status': 'status', - 'total_evaluation_count': 'totalEvaluationCount', - 'completed_evaluation_count': 'completedEvaluationCount', - 'start_timestamp': 'startTimestamp', - 'request': 'request', - 'error': 'error', - 'result': 'result' - } # type: Dict - supports_multiple_types = False - - def __init__(self, status=None, total_evaluation_count=None, completed_evaluation_count=None, start_timestamp=None, request=None, error=None, result=None): - # type: (Optional[EvaluationStatusV1], Optional[float], Optional[float], Optional[datetime], Optional[PostAsrEvaluationsRequestObjectV1], Optional[ErrorObjectV1], Optional[EvaluationMetadataResultV1]) -> None - """response body for GetAsrEvaluationsStatus API - - :param status: - :type status: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_status.EvaluationStatus - :param total_evaluation_count: indicate the total number of evaluations that are supposed to be run in the evaluation request - :type total_evaluation_count: (optional) float - :param completed_evaluation_count: indicate the number of completed evaluations - :type completed_evaluation_count: (optional) float - :param start_timestamp: indicate the start time stamp of the ASR evaluation job. ISO-8601 Format. - :type start_timestamp: (optional) datetime - :param request: - :type request: (optional) ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object.PostAsrEvaluationsRequestObject - :param error: - :type error: (optional) ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject - :param result: - :type result: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result.EvaluationMetadataResult - """ - self.__discriminator_value = None # type: str - - self.status = status - self.total_evaluation_count = total_evaluation_count - self.completed_evaluation_count = completed_evaluation_count - self.start_timestamp = start_timestamp - self.request = request - self.error = error - self.result = result - - 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, EvaluationMetadata): - 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/get_asr_evaluation_status_response_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/get_asr_evaluation_status_response_object.py deleted file mode 100644 index 1c425ce8..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/get_asr_evaluation_status_response_object.py +++ /dev/null @@ -1,147 +0,0 @@ -# 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_smapi_model.v1.skill.asr.evaluations.evaluation_metadata import EvaluationMetadata - - -if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union - from datetime import datetime - from ask_smapi_model.v1.skill.asr.evaluations.error_object import ErrorObjectV1 - from ask_smapi_model.v1.skill.asr.evaluations.evaluation_status import EvaluationStatusV1 - from ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result import EvaluationMetadataResultV1 - from ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object import PostAsrEvaluationsRequestObjectV1 - - -class GetAsrEvaluationStatusResponseObject(EvaluationMetadata): - """ - - :param status: - :type status: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_status.EvaluationStatus - :param total_evaluation_count: indicate the total number of evaluations that are supposed to be run in the evaluation request - :type total_evaluation_count: (optional) float - :param completed_evaluation_count: indicate the number of completed evaluations - :type completed_evaluation_count: (optional) float - :param start_timestamp: indicate the start time stamp of the ASR evaluation job. ISO-8601 Format. - :type start_timestamp: (optional) datetime - :param request: - :type request: (optional) ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object.PostAsrEvaluationsRequestObject - :param error: - :type error: (optional) ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject - :param result: - :type result: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result.EvaluationMetadataResult - - """ - deserialized_types = { - 'status': 'ask_smapi_model.v1.skill.asr.evaluations.evaluation_status.EvaluationStatus', - 'total_evaluation_count': 'float', - 'completed_evaluation_count': 'float', - 'start_timestamp': 'datetime', - 'request': 'ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object.PostAsrEvaluationsRequestObject', - 'error': 'ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject', - 'result': 'ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result.EvaluationMetadataResult' - } # type: Dict - - attribute_map = { - 'status': 'status', - 'total_evaluation_count': 'totalEvaluationCount', - 'completed_evaluation_count': 'completedEvaluationCount', - 'start_timestamp': 'startTimestamp', - 'request': 'request', - 'error': 'error', - 'result': 'result' - } # type: Dict - supports_multiple_types = False - - def __init__(self, status=None, total_evaluation_count=None, completed_evaluation_count=None, start_timestamp=None, request=None, error=None, result=None): - # type: (Optional[EvaluationStatusV1], Optional[float], Optional[float], Optional[datetime], Optional[PostAsrEvaluationsRequestObjectV1], Optional[ErrorObjectV1], Optional[EvaluationMetadataResultV1]) -> None - """ - - :param status: - :type status: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_status.EvaluationStatus - :param total_evaluation_count: indicate the total number of evaluations that are supposed to be run in the evaluation request - :type total_evaluation_count: (optional) float - :param completed_evaluation_count: indicate the number of completed evaluations - :type completed_evaluation_count: (optional) float - :param start_timestamp: indicate the start time stamp of the ASR evaluation job. ISO-8601 Format. - :type start_timestamp: (optional) datetime - :param request: - :type request: (optional) ask_smapi_model.v1.skill.asr.evaluations.post_asr_evaluations_request_object.PostAsrEvaluationsRequestObject - :param error: - :type error: (optional) ask_smapi_model.v1.skill.asr.evaluations.error_object.ErrorObject - :param result: - :type result: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_metadata_result.EvaluationMetadataResult - """ - self.__discriminator_value = None # type: str - - super(GetAsrEvaluationStatusResponseObject, self).__init__(status=status, total_evaluation_count=total_evaluation_count, completed_evaluation_count=completed_evaluation_count, start_timestamp=start_timestamp, request=request, error=error, result=result) - - 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, GetAsrEvaluationStatusResponseObject): - 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/metrics.py b/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/metrics.py deleted file mode 100644 index 0f4e615e..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/metrics.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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 - - -if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union - from datetime import datetime - - -class Metrics(object): - """ - - :param overall_error_rate: overall error rate for the ASR evaluation run - :type overall_error_rate: (optional) float - - """ - deserialized_types = { - 'overall_error_rate': 'float' - } # type: Dict - - attribute_map = { - 'overall_error_rate': 'overallErrorRate' - } # type: Dict - supports_multiple_types = False - - def __init__(self, overall_error_rate=None): - # type: (Optional[float]) -> None - """ - - :param overall_error_rate: overall error rate for the ASR evaluation run - :type overall_error_rate: (optional) float - """ - self.__discriminator_value = None # type: str - - self.overall_error_rate = overall_error_rate - - 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, Metrics): - 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-smapi-model/ask_smapi_model/v1/skill/beta_test/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/__init__.py index cc2d87ba..8075ee65 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/__init__.py @@ -15,5 +15,5 @@ from __future__ import absolute_import from .beta_test import BetaTest -from .status import Status from .test_body import TestBody +from .status import Status diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/beta_test.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/beta_test.py index 227be699..c72c5e2c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/beta_test.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/beta_test.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.beta_test.status import StatusV1 + from ask_smapi_model.v1.skill.beta_test.status import Status as Status_3d3324db class BetaTest(object): @@ -40,7 +40,7 @@ class BetaTest(object): :param invitation_url: Deeplinking for getting authorized to the beta test. :type invitation_url: (optional) str :param invites_remaining: Remaining invite count for the beta test. - :type invites_remaining: (optional) float + :type invites_remaining: (optional) int """ deserialized_types = { @@ -48,7 +48,7 @@ class BetaTest(object): 'status': 'ask_smapi_model.v1.skill.beta_test.status.Status', 'feedback_email': 'str', 'invitation_url': 'str', - 'invites_remaining': 'float' + 'invites_remaining': 'int' } # type: Dict attribute_map = { @@ -61,7 +61,7 @@ class BetaTest(object): supports_multiple_types = False def __init__(self, expiry_date=None, status=None, feedback_email=None, invitation_url=None, invites_remaining=None): - # type: (Optional[datetime], Optional[StatusV1], Optional[str], Optional[str], Optional[float]) -> None + # type: (Optional[datetime], Optional[Status_3d3324db], Optional[str], Optional[str], Optional[int]) -> None """Beta test for an Alexa skill. :param expiry_date: Expiry date of the beta test. @@ -73,7 +73,7 @@ def __init__(self, expiry_date=None, status=None, feedback_email=None, invitatio :param invitation_url: Deeplinking for getting authorized to the beta test. :type invitation_url: (optional) str :param invites_remaining: Remaining invite count for the beta test. - :type invites_remaining: (optional) float + :type invites_remaining: (optional) int """ self.__discriminator_value = None # type: str diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/status.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/status.py index 756ff6a1..c7af7ff3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -40,7 +40,7 @@ class Status(Enum): ENDED = "ENDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -56,7 +56,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Status): return False @@ -64,6 +64,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/test_body.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/test_body.py index 5c2d4c7b..279160f6 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/test_body.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/test_body.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/__init__.py index 228ba3f3..23aeae5c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/__init__.py @@ -14,8 +14,8 @@ # from __future__ import absolute_import -from .tester_with_details import TesterWithDetails -from .list_testers_response import ListTestersResponse from .tester import Tester -from .invitation_status import InvitationStatus +from .list_testers_response import ListTestersResponse +from .tester_with_details import TesterWithDetails from .testers_list import TestersList +from .invitation_status import InvitationStatus diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/invitation_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/invitation_status.py index 3a1db28a..4b8ce248 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/invitation_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/invitation_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class InvitationStatus(Enum): NOT_ACCEPTED = "NOT_ACCEPTED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, InvitationStatus): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/list_testers_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/list_testers_response.py index ac4547cc..3bc80911 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/list_testers_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/list_testers_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.beta_test.testers.tester_with_details import TesterWithDetailsV1 + from ask_smapi_model.v1.skill.beta_test.testers.tester_with_details import TesterWithDetails as TesterWithDetails_e51f394b class ListTestersResponse(object): @@ -51,7 +51,7 @@ class ListTestersResponse(object): supports_multiple_types = False def __init__(self, testers=None, is_truncated=None, next_token=None): - # type: (Optional[List[TesterWithDetailsV1]], Optional[bool], Optional[str]) -> None + # type: (Optional[List[TesterWithDetails_e51f394b]], Optional[bool], Optional[str]) -> None """ :param testers: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/tester.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/tester.py index 43f80f51..81c3bbca 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/tester.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/tester.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/tester_with_details.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/tester_with_details.py index d6a9d82b..b8ca9534 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/tester_with_details.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/tester_with_details.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.beta_test.testers.invitation_status import InvitationStatusV1 + from ask_smapi_model.v1.skill.beta_test.testers.invitation_status import InvitationStatus as InvitationStatus_d942d94e class TesterWithDetails(object): @@ -57,7 +57,7 @@ class TesterWithDetails(object): supports_multiple_types = False def __init__(self, email_id=None, association_date=None, is_reminder_allowed=None, invitation_status=None): - # type: (Optional[str], Optional[datetime], Optional[bool], Optional[InvitationStatusV1]) -> None + # type: (Optional[str], Optional[datetime], Optional[bool], Optional[InvitationStatus_d942d94e]) -> None """Tester information. :param email_id: Email address of the tester. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/testers_list.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/testers_list.py index 2ba0c2ad..3b5802c0 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/testers_list.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/testers_list.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.beta_test.testers.tester import TesterV1 + from ask_smapi_model.v1.skill.beta_test.testers.tester import Tester as Tester_39f38261 class TestersList(object): @@ -45,7 +45,7 @@ class TestersList(object): supports_multiple_types = False def __init__(self, testers=None): - # type: (Optional[List[TesterV1]]) -> None + # type: (Optional[List[Tester_39f38261]]) -> None """List of testers. :param testers: List of the email address of testers. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/blueprint/__init__.py similarity index 94% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/__init__.py rename to ask-smapi-model/ask_smapi_model/v1/skill/blueprint/__init__.py index c5570471..97294df3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/blueprint/__init__.py @@ -14,3 +14,4 @@ # from __future__ import absolute_import +from .shopping_kit import ShoppingKit diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/blueprint/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/blueprint/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/blueprint/shopping_kit.py b/ask-smapi-model/ask_smapi_model/v1/skill/blueprint/shopping_kit.py new file mode 100644 index 00000000..9a06b58c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/blueprint/shopping_kit.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ShoppingKit(object): + """ + Defines the structure for Shopping Kit related information in the skill manifest. + + + :param is_shopping_actions_enabled: True if the skill uses Alexa Shopping Actions, false otherwise. + :type is_shopping_actions_enabled: (optional) bool + :param is_amazon_associates_on_alexa_enabled: True if the skill uses Shopping Actions with Amazon Associates, false otherwise. + :type is_amazon_associates_on_alexa_enabled: (optional) bool + + """ + deserialized_types = { + 'is_shopping_actions_enabled': 'bool', + 'is_amazon_associates_on_alexa_enabled': 'bool' + } # type: Dict + + attribute_map = { + 'is_shopping_actions_enabled': 'isShoppingActionsEnabled', + 'is_amazon_associates_on_alexa_enabled': 'isAmazonAssociatesOnAlexaEnabled' + } # type: Dict + supports_multiple_types = False + + def __init__(self, is_shopping_actions_enabled=None, is_amazon_associates_on_alexa_enabled=None): + # type: (Optional[bool], Optional[bool]) -> None + """Defines the structure for Shopping Kit related information in the skill manifest. + + :param is_shopping_actions_enabled: True if the skill uses Alexa Shopping Actions, false otherwise. + :type is_shopping_actions_enabled: (optional) bool + :param is_amazon_associates_on_alexa_enabled: True if the skill uses Shopping Actions with Amazon Associates, false otherwise. + :type is_amazon_associates_on_alexa_enabled: (optional) bool + """ + self.__discriminator_value = None # type: str + + self.is_shopping_actions_enabled = is_shopping_actions_enabled + self.is_amazon_associates_on_alexa_enabled = is_amazon_associates_on_alexa_enabled + + 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, ShoppingKit): + 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-smapi-model/ask_smapi_model/v1/skill/build_details.py b/ask-smapi-model/ask_smapi_model/v1/skill/build_details.py index ca65696d..51a27caa 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/build_details.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/build_details.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.build_step import BuildStepV1 + from ask_smapi_model.v1.skill.build_step import BuildStep as BuildStep_c5ced0cf class BuildDetails(object): @@ -45,7 +45,7 @@ class BuildDetails(object): supports_multiple_types = False def __init__(self, steps=None): - # type: (Optional[List[BuildStepV1]]) -> None + # type: (Optional[List[BuildStep_c5ced0cf]]) -> None """Contains array which describes steps involved in a build. Elements (or build steps) are added to this array as they become IN_PROGRESS. :param steps: An array where each element represents a build step. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/build_step.py b/ask-smapi-model/ask_smapi_model/v1/skill/build_step.py index 1f9eba40..18640c6c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/build_step.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/build_step.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.build_step_name import BuildStepNameV1 - from ask_smapi_model.v1.skill.status import StatusV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 + from ask_smapi_model.v1.skill.build_step_name import BuildStepName as BuildStepName_524a98be + from ask_smapi_model.v1.skill.status import Status as Status_585d1308 + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 class BuildStep(object): @@ -55,7 +55,7 @@ class BuildStep(object): supports_multiple_types = False def __init__(self, name=None, status=None, errors=None): - # type: (Optional[BuildStepNameV1], Optional[StatusV1], Optional[List[StandardizedErrorV1]]) -> None + # type: (Optional[BuildStepName_524a98be], Optional[Status_585d1308], Optional[List[StandardizedError_f5106a89]]) -> None """Describes the status of a build step. :param name: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/build_step_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/build_step_name.py index 244f24d7..e44955d3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/build_step_name.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/build_step_name.py @@ -21,24 +21,26 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class BuildStepName(Enum): """ - Name of the build step. Possible values - * `DIALOG_MODEL_BUILD` - Build status for dialog model. * `LANGUAGE_MODEL_QUICK_BUILD` - Build status for FST model. * `LANGUAGE_MODEL_FULL_BUILD` - Build status for statistical model. + Name of the build step. Possible values - * `DIALOG_MODEL_BUILD` - Build status for dialog model. * `LANGUAGE_MODEL_QUICK_BUILD` - Build status for FST model. * `LANGUAGE_MODEL_FULL_BUILD` - Build status for statistical model. * `ALEXA_CONVERSATIONS_QUICK_BUILD` - AlexaConversations LowFidelity model build status. * `ALEXA_CONVERSATIONS_FULL_BUILD` - AlexaConversations HighFidelity model build status. - Allowed enum values: [DIALOG_MODEL_BUILD, LANGUAGE_MODEL_QUICK_BUILD, LANGUAGE_MODEL_FULL_BUILD] + Allowed enum values: [DIALOG_MODEL_BUILD, LANGUAGE_MODEL_QUICK_BUILD, LANGUAGE_MODEL_FULL_BUILD, ALEXA_CONVERSATIONS_QUICK_BUILD, ALEXA_CONVERSATIONS_FULL_BUILD] """ DIALOG_MODEL_BUILD = "DIALOG_MODEL_BUILD" LANGUAGE_MODEL_QUICK_BUILD = "LANGUAGE_MODEL_QUICK_BUILD" LANGUAGE_MODEL_FULL_BUILD = "LANGUAGE_MODEL_FULL_BUILD" + ALEXA_CONVERSATIONS_QUICK_BUILD = "ALEXA_CONVERSATIONS_QUICK_BUILD" + ALEXA_CONVERSATIONS_FULL_BUILD = "ALEXA_CONVERSATIONS_FULL_BUILD" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +56,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, BuildStepName): return False @@ -62,6 +64,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/certification/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/__init__.py index 589b1799..ad71a5e7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/certification/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/__init__.py @@ -14,13 +14,13 @@ # from __future__ import absolute_import -from .distribution_info import DistributionInfo -from .review_tracking_info import ReviewTrackingInfo from .certification_response import CertificationResponse -from .certification_summary import CertificationSummary -from .review_tracking_info_summary import ReviewTrackingInfoSummary from .list_certifications_response import ListCertificationsResponse -from .certification_status import CertificationStatus -from .publication_failure import PublicationFailure from .estimation_update import EstimationUpdate +from .review_tracking_info import ReviewTrackingInfo +from .distribution_info import DistributionInfo +from .review_tracking_info_summary import ReviewTrackingInfoSummary +from .publication_failure import PublicationFailure from .certification_result import CertificationResult +from .certification_summary import CertificationSummary +from .certification_status import CertificationStatus diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_response.py index 20b8c882..0b8a987b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_response.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.certification.review_tracking_info import ReviewTrackingInfoV1 - from ask_smapi_model.v1.skill.certification.certification_status import CertificationStatusV1 - from ask_smapi_model.v1.skill.certification.certification_result import CertificationResultV1 + from ask_smapi_model.v1.skill.certification.certification_status import CertificationStatus as CertificationStatus_f3c4064f + from ask_smapi_model.v1.skill.certification.certification_result import CertificationResult as CertificationResult_84c93325 + from ask_smapi_model.v1.skill.certification.review_tracking_info import ReviewTrackingInfo as ReviewTrackingInfo_efea7da2 class CertificationResponse(object): @@ -61,7 +61,7 @@ class CertificationResponse(object): supports_multiple_types = False def __init__(self, id=None, status=None, skill_submission_timestamp=None, review_tracking_info=None, result=None): - # type: (Optional[str], Optional[CertificationStatusV1], Optional[datetime], Optional[ReviewTrackingInfoV1], Optional[CertificationResultV1]) -> None + # type: (Optional[str], Optional[CertificationStatus_f3c4064f], Optional[datetime], Optional[ReviewTrackingInfo_efea7da2], Optional[CertificationResult_84c93325]) -> None """ :param id: Certification Id for the skill diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_result.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_result.py index d01b485a..c7d28f04 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_result.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_result.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.certification.distribution_info import DistributionInfoV1 + from ask_smapi_model.v1.skill.certification.distribution_info import DistributionInfo as DistributionInfo_e586ad31 class CertificationResult(object): @@ -45,7 +45,7 @@ class CertificationResult(object): supports_multiple_types = False def __init__(self, distribution_info=None): - # type: (Optional[DistributionInfoV1]) -> None + # type: (Optional[DistributionInfo_e586ad31]) -> None """Structure for the result for the outcomes of certification review for the skill. Currently provides the distribution information of a skill if the certification SUCCEEDED. :param distribution_info: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_status.py index ba3e8ea9..4fef2aea 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class CertificationStatus(Enum): CANCELLED = "CANCELLED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CertificationStatus): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_summary.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_summary.py index dbe451cb..66216d81 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_summary.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_summary.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.certification.review_tracking_info_summary import ReviewTrackingInfoSummaryV1 - from ask_smapi_model.v1.skill.certification.certification_status import CertificationStatusV1 + from ask_smapi_model.v1.skill.certification.certification_status import CertificationStatus as CertificationStatus_f3c4064f + from ask_smapi_model.v1.skill.certification.review_tracking_info_summary import ReviewTrackingInfoSummary as ReviewTrackingInfoSummary_98ac3a4b class CertificationSummary(object): @@ -58,7 +58,7 @@ class CertificationSummary(object): supports_multiple_types = False def __init__(self, id=None, status=None, skill_submission_timestamp=None, review_tracking_info=None): - # type: (Optional[str], Optional[CertificationStatusV1], Optional[datetime], Optional[ReviewTrackingInfoSummaryV1]) -> None + # type: (Optional[str], Optional[CertificationStatus_f3c4064f], Optional[datetime], Optional[ReviewTrackingInfoSummary_98ac3a4b]) -> None """Summary of the certification resource. This is a leaner view of the certification resource for the collections API. :param id: Certification Id for the skill. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/certification/distribution_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/distribution_info.py index a83f811c..8953d5ee 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/certification/distribution_info.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/distribution_info.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.certification.publication_failure import PublicationFailureV1 + from ask_smapi_model.v1.skill.certification.publication_failure import PublicationFailure as PublicationFailure_998813af class DistributionInfo(object): @@ -49,7 +49,7 @@ class DistributionInfo(object): supports_multiple_types = False def __init__(self, published_countries=None, publication_failures=None): - # type: (Optional[List[object]], Optional[List[PublicationFailureV1]]) -> None + # type: (Optional[List[object]], Optional[List[PublicationFailure_998813af]]) -> None """The distribution information for skill where Amazon distributed the skill :param published_countries: All countries where the skill was published in by Amazon. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/certification/estimation_update.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/estimation_update.py index 336394fc..61110802 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/certification/estimation_update.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/estimation_update.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/certification/list_certifications_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/list_certifications_response.py index dad7a374..a2de4f2b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/certification/list_certifications_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/list_certifications_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.certification.certification_summary import CertificationSummaryV1 - from ask_smapi_model.v1.links import LinksV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.skill.certification.certification_summary import CertificationSummary as CertificationSummary_96b78053 class ListCertificationsResponse(object): @@ -62,7 +62,7 @@ class ListCertificationsResponse(object): supports_multiple_types = False def __init__(self, links=None, is_truncated=None, next_token=None, total_count=None, items=None): - # type: (Optional[LinksV1], Optional[bool], Optional[str], Optional[int], Optional[List[CertificationSummaryV1]]) -> None + # type: (Optional[Links_bc43467b], Optional[bool], Optional[str], Optional[int], Optional[List[CertificationSummary_96b78053]]) -> None """List of certification summary for a skill. :param links: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/certification/publication_failure.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/publication_failure.py index d2d9e0b2..de3ab8de 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/certification/publication_failure.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/publication_failure.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/certification/review_tracking_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/review_tracking_info.py index d3c7ad4e..28b2d1dc 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/certification/review_tracking_info.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/review_tracking_info.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.certification.estimation_update import EstimationUpdateV1 + from ask_smapi_model.v1.skill.certification.estimation_update import EstimationUpdate as EstimationUpdate_39260d1f class ReviewTrackingInfo(object): @@ -57,7 +57,7 @@ class ReviewTrackingInfo(object): supports_multiple_types = False def __init__(self, estimated_completion_timestamp=None, actual_completion_timestamp=None, last_updated=None, estimation_updates=None): - # type: (Optional[datetime], Optional[datetime], Optional[datetime], Optional[List[EstimationUpdateV1]]) -> None + # type: (Optional[datetime], Optional[datetime], Optional[datetime], Optional[List[EstimationUpdate_39260d1f]]) -> None """Structure for review tracking information of the skill. :param estimated_completion_timestamp: Timestamp for estimated completion of certification review for the skill. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/certification/review_tracking_info_summary.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/review_tracking_info_summary.py index beec2c91..264c22ad 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/certification/review_tracking_info_summary.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/review_tracking_info_summary.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_request.py index 4eb8614d..2a40daa5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.overwrite_mode import OverwriteModeV1 + from ask_smapi_model.v1.skill.overwrite_mode import OverwriteMode as OverwriteMode_d847ef1d class CloneLocaleRequest(object): @@ -53,7 +53,7 @@ class CloneLocaleRequest(object): supports_multiple_types = False def __init__(self, source_locale=None, target_locales=None, overwrite_mode=None): - # type: (Optional[str], Optional[List[object]], Optional[OverwriteModeV1]) -> None + # type: (Optional[str], Optional[List[object]], Optional[OverwriteMode_d847ef1d]) -> None """Defines the request body for the cloneLocale API. :param source_locale: Locale with the assets that will be cloned. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_request_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_request_status.py index 99fe480b..190d0e3c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_request_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_request_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -42,7 +42,7 @@ class CloneLocaleRequestStatus(Enum): SUCCEEDED = "SUCCEEDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -58,7 +58,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CloneLocaleRequestStatus): return False @@ -66,6 +66,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_resource_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_resource_status.py index e7129ccc..adfc6204 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_resource_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_resource_status.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.clone_locale_status import CloneLocaleStatusV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 + from ask_smapi_model.v1.skill.clone_locale_status import CloneLocaleStatus as CloneLocaleStatus_404d88aa + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 class CloneLocaleResourceStatus(object): @@ -50,7 +50,7 @@ class CloneLocaleResourceStatus(object): supports_multiple_types = False def __init__(self, status=None, errors=None): - # type: (Optional[CloneLocaleStatusV1], Optional[List[StandardizedErrorV1]]) -> None + # type: (Optional[CloneLocaleStatus_404d88aa], Optional[List[StandardizedError_f5106a89]]) -> None """an object detailing the status of a locale clone request and if applicable the errors occurred when saving/building resources during clone process. :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_stage_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_stage_type.py index fcf769d7..60eec16a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_stage_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_stage_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -34,7 +34,7 @@ class CloneLocaleStageType(Enum): development = "development" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -50,7 +50,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CloneLocaleStageType): return False @@ -58,6 +58,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_status.py index ff9938ab..9e71e298 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -41,7 +41,7 @@ class CloneLocaleStatus(Enum): SUCCEEDED = "SUCCEEDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -57,7 +57,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CloneLocaleStatus): return False @@ -65,6 +65,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_status_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_status_response.py index 94e1119e..9135c14b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_status_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/clone_locale_status_response.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.clone_locale_resource_status import CloneLocaleResourceStatusV1 - from ask_smapi_model.v1.skill.clone_locale_request_status import CloneLocaleRequestStatusV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 + from ask_smapi_model.v1.skill.clone_locale_request_status import CloneLocaleRequestStatus as CloneLocaleRequestStatus_cb446f9 + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 + from ask_smapi_model.v1.skill.clone_locale_resource_status import CloneLocaleResourceStatus as CloneLocaleResourceStatus_60dd154f class CloneLocaleStatusResponse(object): @@ -59,7 +59,7 @@ class CloneLocaleStatusResponse(object): supports_multiple_types = False def __init__(self, status=None, errors=None, source_locale=None, target_locales=None): - # type: (Optional[CloneLocaleRequestStatusV1], Optional[List[StandardizedErrorV1]], Optional[str], Optional[Dict[str, CloneLocaleResourceStatusV1]]) -> None + # type: (Optional[CloneLocaleRequestStatus_cb446f9], Optional[List[StandardizedError_f5106a89]], Optional[str], Optional[Dict[str, CloneLocaleResourceStatus_60dd154f]]) -> None """A mapping of statuses per locale detailing progress of resource or error if encountered. :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/create_rollback_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/create_rollback_request.py index 62121dde..438356cf 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/create_rollback_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/create_rollback_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/create_rollback_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/create_rollback_response.py index bf9c6f98..a4ed6c08 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/create_rollback_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/create_rollback_response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_request.py index cc91a55a..e1223f0a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_request.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.skill_manifest import SkillManifestV1 - from ask_smapi_model.v1.skill.alexa_hosted.hosting_configuration import HostingConfigurationV1 + from ask_smapi_model.v1.skill.manifest.skill_manifest import SkillManifest as SkillManifest_312bea88 + from ask_smapi_model.v1.skill.alexa_hosted.hosting_configuration import HostingConfiguration as HostingConfiguration_695b9ede class CreateSkillRequest(object): @@ -52,7 +52,7 @@ class CreateSkillRequest(object): supports_multiple_types = False def __init__(self, vendor_id=None, manifest=None, hosting=None): - # type: (Optional[str], Optional[SkillManifestV1], Optional[HostingConfigurationV1]) -> None + # type: (Optional[str], Optional[SkillManifest_312bea88], Optional[HostingConfiguration_695b9ede]) -> None """ :param vendor_id: ID of the vendor owning the skill. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_response.py index 47818993..7207a266 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_with_package_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_with_package_request.py index 5d21a84d..28a700dc 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_with_package_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_with_package_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/__init__.py index c69509c2..e9434e09 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/__init__.py @@ -14,17 +14,17 @@ # from __future__ import absolute_import -from .resolutions_per_authority_items import ResolutionsPerAuthorityItems -from .profile_nlu_selected_intent import ProfileNluSelectedIntent -from .confirmation_status_type import ConfirmationStatusType -from .profile_nlu_request import ProfileNluRequest -from .dialog_act_type import DialogActType -from .slot_resolutions import SlotResolutions -from .slot import Slot -from .resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCode +from .resolutions_per_authority_value_items import ResolutionsPerAuthorityValueItems from .profile_nlu_response import ProfileNluResponse from .multi_turn import MultiTurn -from .resolutions_per_authority_value_items import ResolutionsPerAuthorityValueItems +from .resolutions_per_authority_items import ResolutionsPerAuthorityItems +from .slot import Slot from .dialog_act import DialogAct -from .resolutions_per_authority_status import ResolutionsPerAuthorityStatus +from .resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCode +from .profile_nlu_request import ProfileNluRequest from .intent import Intent +from .resolutions_per_authority_status import ResolutionsPerAuthorityStatus +from .confirmation_status_type import ConfirmationStatusType +from .profile_nlu_selected_intent import ProfileNluSelectedIntent +from .dialog_act_type import DialogActType +from .slot_resolutions import SlotResolutions diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/confirmation_status_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/confirmation_status_type.py index 034ee510..a6752a6d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/confirmation_status_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/confirmation_status_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ConfirmationStatusType(Enum): DENIED = "DENIED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ConfirmationStatusType): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act.py index 0bab3a7b..13acbe0c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.evaluations.dialog_act_type import DialogActTypeV1 + from ask_smapi_model.v1.skill.evaluations.dialog_act_type import DialogActType as DialogActType_3c2701d7 class DialogAct(object): @@ -49,7 +49,7 @@ class DialogAct(object): supports_multiple_types = False def __init__(self, object_type=None, target_slot=None): - # type: (Optional[DialogActTypeV1], Optional[str]) -> None + # type: (Optional[DialogActType_3c2701d7], Optional[str]) -> None """A representation of question prompts to the user for multi-turn, which requires user to fill a slot value, or confirm a slot value, or confirm an intent. :param object_type: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act_type.py index 58cbded9..24e905fb 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class DialogActType(Enum): Dialog_ConfirmIntent = "Dialog.ConfirmIntent" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, DialogActType): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/intent.py index a4295fe5..84133c3c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/intent.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/intent.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.evaluations.slot import SlotV1 - from ask_smapi_model.v1.skill.evaluations.confirmation_status_type import ConfirmationStatusTypeV1 + from ask_smapi_model.v1.skill.evaluations.confirmation_status_type import ConfirmationStatusType as ConfirmationStatusType_cfdd6bf5 + from ask_smapi_model.v1.skill.evaluations.slot import Slot as Slot_6c891311 class Intent(object): @@ -52,7 +52,7 @@ class Intent(object): supports_multiple_types = False def __init__(self, name=None, confirmation_status=None, slots=None): - # type: (Optional[str], Optional[ConfirmationStatusTypeV1], Optional[Dict[str, SlotV1]]) -> None + # type: (Optional[str], Optional[ConfirmationStatusType_cfdd6bf5], Optional[Dict[str, Slot_6c891311]]) -> None """ :param name: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/multi_turn.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/multi_turn.py index 1b39c9d8..0261e78b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/multi_turn.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/multi_turn.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.evaluations.dialog_act import DialogActV1 + from ask_smapi_model.v1.skill.evaluations.dialog_act import DialogAct as DialogAct_6e492614 class MultiTurn(object): @@ -53,7 +53,7 @@ class MultiTurn(object): supports_multiple_types = False def __init__(self, dialog_act=None, token=None, prompt=None): - # type: (Optional[DialogActV1], Optional[str], Optional[str]) -> None + # type: (Optional[DialogAct_6e492614], Optional[str], Optional[str]) -> None """Included when the selected intent has dialog defined and the dialog is not completed. To continue the dialog, provide the value of the token in the multiTurnToken field in the next request. :param dialog_act: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_request.py index 2341b273..9d0f90b8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_response.py index 6adc9d09..6f1d8bf7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_response.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.evaluations.profile_nlu_selected_intent import ProfileNluSelectedIntentV1 - from ask_smapi_model.v1.skill.evaluations.intent import IntentV1 - from ask_smapi_model.v1.skill.evaluations.multi_turn import MultiTurnV1 + from ask_smapi_model.v1.skill.evaluations.intent import Intent as Intent_c78fc7d1 + from ask_smapi_model.v1.skill.evaluations.profile_nlu_selected_intent import ProfileNluSelectedIntent as ProfileNluSelectedIntent_a1e7970e + from ask_smapi_model.v1.skill.evaluations.multi_turn import MultiTurn as MultiTurn_9de2d9e8 class ProfileNluResponse(object): @@ -57,7 +57,7 @@ class ProfileNluResponse(object): supports_multiple_types = False def __init__(self, session_ended=None, selected_intent=None, considered_intents=None, multi_turn=None): - # type: (Optional[bool], Optional[ProfileNluSelectedIntentV1], Optional[List[IntentV1]], Optional[MultiTurnV1]) -> None + # type: (Optional[bool], Optional[ProfileNluSelectedIntent_a1e7970e], Optional[List[Intent_c78fc7d1]], Optional[MultiTurn_9de2d9e8]) -> None """ :param session_ended: Represents when an utterance results in the skill exiting. It would be true when NLU selects 1P ExitAppIntent or GoHomeIntent, and false otherwise. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_selected_intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_selected_intent.py index df12f31a..ae92d545 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_selected_intent.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_selected_intent.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.evaluations.slot import SlotV1 - from ask_smapi_model.v1.skill.evaluations.confirmation_status_type import ConfirmationStatusTypeV1 + from ask_smapi_model.v1.skill.evaluations.confirmation_status_type import ConfirmationStatusType as ConfirmationStatusType_cfdd6bf5 + from ask_smapi_model.v1.skill.evaluations.slot import Slot as Slot_6c891311 class ProfileNluSelectedIntent(Intent): @@ -55,7 +55,7 @@ class ProfileNluSelectedIntent(Intent): supports_multiple_types = False def __init__(self, name=None, confirmation_status=None, slots=None): - # type: (Optional[str], Optional[ConfirmationStatusTypeV1], Optional[Dict[str, SlotV1]]) -> None + # type: (Optional[str], Optional[ConfirmationStatusType_cfdd6bf5], Optional[Dict[str, Slot_6c891311]]) -> None """The intent that Alexa selected for the utterance in the request. :param name: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_items.py index d396f010..f1ae96b9 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_items.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_items.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status import ResolutionsPerAuthorityStatusV1 - from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_value_items import ResolutionsPerAuthorityValueItemsV1 + from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_value_items import ResolutionsPerAuthorityValueItems as ResolutionsPerAuthorityValueItems_a0e0a4d + from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status import ResolutionsPerAuthorityStatus as ResolutionsPerAuthorityStatus_5e501476 class ResolutionsPerAuthorityItems(object): @@ -52,7 +52,7 @@ class ResolutionsPerAuthorityItems(object): supports_multiple_types = False def __init__(self, authority=None, status=None, values=None): - # type: (Optional[str], Optional[ResolutionsPerAuthorityStatusV1], Optional[List[ResolutionsPerAuthorityValueItemsV1]]) -> None + # type: (Optional[str], Optional[ResolutionsPerAuthorityStatus_5e501476], Optional[List[ResolutionsPerAuthorityValueItems_a0e0a4d]]) -> None """ :param authority: The name of the authority for the slot values. For custom slot types, this authority label incorporates your skill ID and the slot type name. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status.py index 3562fcba..a0472e80 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCodeV1 + from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCode as ResolutionsPerAuthorityStatusCode_bcfcdf25 class ResolutionsPerAuthorityStatus(object): @@ -45,7 +45,7 @@ class ResolutionsPerAuthorityStatus(object): supports_multiple_types = False def __init__(self, code=None): - # type: (Optional[ResolutionsPerAuthorityStatusCodeV1]) -> None + # type: (Optional[ResolutionsPerAuthorityStatusCode_bcfcdf25]) -> None """An object representing the status of entity resolution for the slot. :param code: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status_code.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status_code.py index 4eb4398a..08e06d20 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status_code.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status_code.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class ResolutionsPerAuthorityStatusCode(Enum): ER_ERROR_EXCEPTION = "ER_ERROR_EXCEPTION" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ResolutionsPerAuthorityStatusCode): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_value_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_value_items.py index 4f372328..a5aa939f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_value_items.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_value_items.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot.py index 2e0de56c..9560773f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.evaluations.slot_resolutions import SlotResolutionsV1 - from ask_smapi_model.v1.skill.evaluations.confirmation_status_type import ConfirmationStatusTypeV1 + from ask_smapi_model.v1.skill.evaluations.confirmation_status_type import ConfirmationStatusType as ConfirmationStatusType_cfdd6bf5 + from ask_smapi_model.v1.skill.evaluations.slot_resolutions import SlotResolutions as SlotResolutions_9471687e class Slot(object): @@ -56,7 +56,7 @@ class Slot(object): supports_multiple_types = False def __init__(self, name=None, value=None, confirmation_status=None, resolutions=None): - # type: (Optional[str], Optional[str], Optional[ConfirmationStatusTypeV1], Optional[SlotResolutionsV1]) -> None + # type: (Optional[str], Optional[str], Optional[ConfirmationStatusType_cfdd6bf5], Optional[SlotResolutions_9471687e]) -> None """ :param name: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot_resolutions.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot_resolutions.py index 6ce95f61..8b1f7ac2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot_resolutions.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot_resolutions.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_items import ResolutionsPerAuthorityItemsV1 + from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_items import ResolutionsPerAuthorityItems as ResolutionsPerAuthorityItems_3c8f9434 class SlotResolutions(object): @@ -45,7 +45,7 @@ class SlotResolutions(object): supports_multiple_types = False def __init__(self, resolutions_per_authority=None): - # type: (Optional[List[ResolutionsPerAuthorityItemsV1]]) -> None + # type: (Optional[List[ResolutionsPerAuthorityItems_3c8f9434]]) -> None """A resolutions object representing the results of resolving the words captured from the user's utterance. :param resolutions_per_authority: An array of objects representing each possible authority for entity resolution. An authority represents the source for the data provided for the slot. For a custom slot type, the authority is the slot type you defined. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/__init__.py new file mode 100644 index 00000000..f66d1621 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/__init__.py @@ -0,0 +1,52 @@ +# 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. +# +from __future__ import absolute_import + +from .experiment_history import ExperimentHistory +from .state_transition_error import StateTransitionError +from .create_experiment_request import CreateExperimentRequest +from .experiment_information import ExperimentInformation +from .manage_experiment_state_request import ManageExperimentStateRequest +from .state import State +from .target_state import TargetState +from .state_transition_status import StateTransitionStatus +from .metric import Metric +from .get_experiment_state_response import GetExperimentStateResponse +from .metric_configuration import MetricConfiguration +from .pagination_context import PaginationContext +from .experiment_type import ExperimentType +from .create_experiment_input import CreateExperimentInput +from .metric_snapshot import MetricSnapshot +from .metric_change_direction import MetricChangeDirection +from .source_state import SourceState +from .get_experiment_response import GetExperimentResponse +from .get_customer_treatment_override_response import GetCustomerTreatmentOverrideResponse +from .update_experiment_request import UpdateExperimentRequest +from .metric_type import MetricType +from .state_transition_error_type import StateTransitionErrorType +from .set_customer_treatment_override_request import SetCustomerTreatmentOverrideRequest +from .metric_snapshot_status import MetricSnapshotStatus +from .list_experiments_response import ListExperimentsResponse +from .get_experiment_metric_snapshot_response import GetExperimentMetricSnapshotResponse +from .list_experiment_metric_snapshots_response import ListExperimentMetricSnapshotsResponse +from .treatment_id import TreatmentId +from .experiment_stopped_reason import ExperimentStoppedReason +from .update_experiment_input import UpdateExperimentInput +from .experiment_summary import ExperimentSummary +from .update_exposure_request import UpdateExposureRequest +from .destination_state import DestinationState +from .experiment_last_state_transition import ExperimentLastStateTransition +from .experiment_trigger import ExperimentTrigger +from .metric_values import MetricValues diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/create_experiment_input.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/create_experiment_input.py new file mode 100644 index 00000000..dc1cf662 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/create_experiment_input.py @@ -0,0 +1,145 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.metric_configuration import MetricConfiguration as MetricConfiguration_7789320a + from ask_smapi_model.v1.skill.experiment.experiment_type import ExperimentType as ExperimentType_316e1574 + + +class CreateExperimentInput(object): + """ + Defines the Experiment body used for requesting an experiment creation. Only includes fields that are editable by the user. + + + :param name: Name that developer assigns to the experiment for easier identification. + :type name: (optional) str + :param description: Hypothesis that developer provides to describe the experiment's purpose. + :type description: (optional) str + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.experiment.experiment_type.ExperimentType + :param planned_duration: The number of weeks the skill builder intends to run the experiment. Used for documentation purposes and by metric platform as a reference. Does not impact experiment execution. Format uses ISO-8601 representation of duration. (Example: 4 weeks = \"P4W\") + :type planned_duration: (optional) str + :param exposure_percentage: The percentage of unique customers that will be part of the skill experiment while the experiment is running. + :type exposure_percentage: (optional) int + :param metric_configurations: List of metric configurations that determine which metrics are key/guardrail metrics and the expected metric direction. + :type metric_configurations: (optional) list[ask_smapi_model.v1.skill.experiment.metric_configuration.MetricConfiguration] + + """ + deserialized_types = { + 'name': 'str', + 'description': 'str', + 'object_type': 'ask_smapi_model.v1.skill.experiment.experiment_type.ExperimentType', + 'planned_duration': 'str', + 'exposure_percentage': 'int', + 'metric_configurations': 'list[ask_smapi_model.v1.skill.experiment.metric_configuration.MetricConfiguration]' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'object_type': 'type', + 'planned_duration': 'plannedDuration', + 'exposure_percentage': 'exposurePercentage', + 'metric_configurations': 'metricConfigurations' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, description=None, object_type=None, planned_duration=None, exposure_percentage=None, metric_configurations=None): + # type: (Optional[str], Optional[str], Optional[ExperimentType_316e1574], Optional[str], Optional[int], Optional[List[MetricConfiguration_7789320a]]) -> None + """Defines the Experiment body used for requesting an experiment creation. Only includes fields that are editable by the user. + + :param name: Name that developer assigns to the experiment for easier identification. + :type name: (optional) str + :param description: Hypothesis that developer provides to describe the experiment's purpose. + :type description: (optional) str + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.experiment.experiment_type.ExperimentType + :param planned_duration: The number of weeks the skill builder intends to run the experiment. Used for documentation purposes and by metric platform as a reference. Does not impact experiment execution. Format uses ISO-8601 representation of duration. (Example: 4 weeks = \"P4W\") + :type planned_duration: (optional) str + :param exposure_percentage: The percentage of unique customers that will be part of the skill experiment while the experiment is running. + :type exposure_percentage: (optional) int + :param metric_configurations: List of metric configurations that determine which metrics are key/guardrail metrics and the expected metric direction. + :type metric_configurations: (optional) list[ask_smapi_model.v1.skill.experiment.metric_configuration.MetricConfiguration] + """ + self.__discriminator_value = None # type: str + + self.name = name + self.description = description + self.object_type = object_type + self.planned_duration = planned_duration + self.exposure_percentage = exposure_percentage + self.metric_configurations = metric_configurations + + 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, CreateExperimentInput): + 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-smapi-model/ask_smapi_model/v1/skill/experiment/create_experiment_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/create_experiment_request.py new file mode 100644 index 00000000..53c31945 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/create_experiment_request.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.create_experiment_input import CreateExperimentInput as CreateExperimentInput_700f0363 + + +class CreateExperimentRequest(object): + """ + Defines the request body for creating an experiment. + + + :param experiment: + :type experiment: (optional) ask_smapi_model.v1.skill.experiment.create_experiment_input.CreateExperimentInput + + """ + deserialized_types = { + 'experiment': 'ask_smapi_model.v1.skill.experiment.create_experiment_input.CreateExperimentInput' + } # type: Dict + + attribute_map = { + 'experiment': 'experiment' + } # type: Dict + supports_multiple_types = False + + def __init__(self, experiment=None): + # type: (Optional[CreateExperimentInput_700f0363]) -> None + """Defines the request body for creating an experiment. + + :param experiment: + :type experiment: (optional) ask_smapi_model.v1.skill.experiment.create_experiment_input.CreateExperimentInput + """ + self.__discriminator_value = None # type: str + + self.experiment = experiment + + 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, CreateExperimentRequest): + 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-smapi-model/ask_smapi_model/v1/skill/experiment/destination_state.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/destination_state.py new file mode 100644 index 00000000..500b5ab3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/destination_state.py @@ -0,0 +1,68 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class DestinationState(Enum): + """ + These states are for recording the destination state from a transition action (Created, Pilot, Start, Stop) on the experiment. * `CREATED`: Result state for the 'Create' action. Experiment has been created. * `ENABLED`: Result state for the 'Pilot' action. Experiment configurations are deployed and customer overrides are activated. Actual experiment has not started yet. * `RUNNING`: Result state for the 'Start' action. Experiment has started with the configured exposure. Skill customers selected within the exposure are contributing to the metric data. * `STOPPED`: Result state for the 'Stop' action. Experiment has stopped and all experiment configurations have been removed. All customers will see the C behavior by default. + + + + Allowed enum values: [CREATED, ENABLED, RUNNING, STOPPED] + """ + CREATED = "CREATED" + ENABLED = "ENABLED" + RUNNING = "RUNNING" + STOPPED = "STOPPED" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DestinationState): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_history.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_history.py new file mode 100644 index 00000000..2b76bcb2 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_history.py @@ -0,0 +1,122 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ExperimentHistory(object): + """ + Defines historical properties of a skill experiment. + + + :param creation_time: + :type creation_time: (optional) datetime + :param start_time: + :type start_time: (optional) datetime + :param stopped_reason: The reason an experiment was stopped if experiment was stopped. + :type stopped_reason: (optional) str + + """ + deserialized_types = { + 'creation_time': 'datetime', + 'start_time': 'datetime', + 'stopped_reason': 'str' + } # type: Dict + + attribute_map = { + 'creation_time': 'creationTime', + 'start_time': 'startTime', + 'stopped_reason': 'stoppedReason' + } # type: Dict + supports_multiple_types = False + + def __init__(self, creation_time=None, start_time=None, stopped_reason=None): + # type: (Optional[datetime], Optional[datetime], Optional[str]) -> None + """Defines historical properties of a skill experiment. + + :param creation_time: + :type creation_time: (optional) datetime + :param start_time: + :type start_time: (optional) datetime + :param stopped_reason: The reason an experiment was stopped if experiment was stopped. + :type stopped_reason: (optional) str + """ + self.__discriminator_value = None # type: str + + self.creation_time = creation_time + self.start_time = start_time + self.stopped_reason = stopped_reason + + 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, ExperimentHistory): + 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-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_information.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_information.py new file mode 100644 index 00000000..ce90e643 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_information.py @@ -0,0 +1,176 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.state import State as State_1d082829 + from ask_smapi_model.v1.skill.experiment.experiment_trigger import ExperimentTrigger as ExperimentTrigger_634bacae + from ask_smapi_model.v1.skill.experiment.metric_configuration import MetricConfiguration as MetricConfiguration_7789320a + from ask_smapi_model.v1.skill.experiment.experiment_type import ExperimentType as ExperimentType_316e1574 + from ask_smapi_model.v1.skill.experiment.experiment_history import ExperimentHistory as ExperimentHistory_4dc94b66 + + +class ExperimentInformation(object): + """ + Defines the full Experiment body which would contain all experiment details. + + + :param name: Name that developer assigns to the experiment for easier identification. + :type name: (optional) str + :param description: Hypothesis that developer provides to describe the experiment's purpose. + :type description: (optional) str + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.experiment.experiment_type.ExperimentType + :param planned_duration: The number of weeks the skill builder intends to run the experiment. Used for documentation purposes and by metric platform as a reference. Does not impact experiment execution. Format uses ISO-8601 representation of duration. (Example: 4 weeks = \"P4W\") + :type planned_duration: (optional) str + :param exposure_percentage: The percentage of unique customers that will be part of the skill experiment while the experiment is running. + :type exposure_percentage: (optional) int + :param treatment_override_count: The number of overrides which currently exist for the experiment. + :type treatment_override_count: (optional) int + :param metric_configurations: List of metric configurations that determine which metrics are key/guardrail metrics and the expected metric direction. This is required by the system that collects metrics and generates the metric reports. + :type metric_configurations: (optional) list[ask_smapi_model.v1.skill.experiment.metric_configuration.MetricConfiguration] + :param state: + :type state: (optional) ask_smapi_model.v1.skill.experiment.state.State + :param history: + :type history: (optional) ask_smapi_model.v1.skill.experiment.experiment_history.ExperimentHistory + :param trigger: + :type trigger: (optional) ask_smapi_model.v1.skill.experiment.experiment_trigger.ExperimentTrigger + + """ + deserialized_types = { + 'name': 'str', + 'description': 'str', + 'object_type': 'ask_smapi_model.v1.skill.experiment.experiment_type.ExperimentType', + 'planned_duration': 'str', + 'exposure_percentage': 'int', + 'treatment_override_count': 'int', + 'metric_configurations': 'list[ask_smapi_model.v1.skill.experiment.metric_configuration.MetricConfiguration]', + 'state': 'ask_smapi_model.v1.skill.experiment.state.State', + 'history': 'ask_smapi_model.v1.skill.experiment.experiment_history.ExperimentHistory', + 'trigger': 'ask_smapi_model.v1.skill.experiment.experiment_trigger.ExperimentTrigger' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'object_type': 'type', + 'planned_duration': 'plannedDuration', + 'exposure_percentage': 'exposurePercentage', + 'treatment_override_count': 'treatmentOverrideCount', + 'metric_configurations': 'metricConfigurations', + 'state': 'state', + 'history': 'history', + 'trigger': 'trigger' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, description=None, object_type=None, planned_duration=None, exposure_percentage=None, treatment_override_count=None, metric_configurations=None, state=None, history=None, trigger=None): + # type: (Optional[str], Optional[str], Optional[ExperimentType_316e1574], Optional[str], Optional[int], Optional[int], Optional[List[MetricConfiguration_7789320a]], Optional[State_1d082829], Optional[ExperimentHistory_4dc94b66], Optional[ExperimentTrigger_634bacae]) -> None + """Defines the full Experiment body which would contain all experiment details. + + :param name: Name that developer assigns to the experiment for easier identification. + :type name: (optional) str + :param description: Hypothesis that developer provides to describe the experiment's purpose. + :type description: (optional) str + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.experiment.experiment_type.ExperimentType + :param planned_duration: The number of weeks the skill builder intends to run the experiment. Used for documentation purposes and by metric platform as a reference. Does not impact experiment execution. Format uses ISO-8601 representation of duration. (Example: 4 weeks = \"P4W\") + :type planned_duration: (optional) str + :param exposure_percentage: The percentage of unique customers that will be part of the skill experiment while the experiment is running. + :type exposure_percentage: (optional) int + :param treatment_override_count: The number of overrides which currently exist for the experiment. + :type treatment_override_count: (optional) int + :param metric_configurations: List of metric configurations that determine which metrics are key/guardrail metrics and the expected metric direction. This is required by the system that collects metrics and generates the metric reports. + :type metric_configurations: (optional) list[ask_smapi_model.v1.skill.experiment.metric_configuration.MetricConfiguration] + :param state: + :type state: (optional) ask_smapi_model.v1.skill.experiment.state.State + :param history: + :type history: (optional) ask_smapi_model.v1.skill.experiment.experiment_history.ExperimentHistory + :param trigger: + :type trigger: (optional) ask_smapi_model.v1.skill.experiment.experiment_trigger.ExperimentTrigger + """ + self.__discriminator_value = None # type: str + + self.name = name + self.description = description + self.object_type = object_type + self.planned_duration = planned_duration + self.exposure_percentage = exposure_percentage + self.treatment_override_count = treatment_override_count + self.metric_configurations = metric_configurations + self.state = state + self.history = history + self.trigger = trigger + + 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, ExperimentInformation): + 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-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_last_state_transition.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_last_state_transition.py new file mode 100644 index 00000000..ed171419 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_last_state_transition.py @@ -0,0 +1,147 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.destination_state import DestinationState as DestinationState_8dc8c95c + from ask_smapi_model.v1.skill.experiment.state_transition_status import StateTransitionStatus as StateTransitionStatus_53bf1e4d + from ask_smapi_model.v1.skill.experiment.source_state import SourceState as SourceState_88a676e0 + from ask_smapi_model.v1.skill.experiment.state_transition_error import StateTransitionError as StateTransitionError_990ec079 + + +class ExperimentLastStateTransition(object): + """ + Defines the last state transition information for the experiment. + + + :param source_state: + :type source_state: (optional) ask_smapi_model.v1.skill.experiment.source_state.SourceState + :param target_state: + :type target_state: (optional) ask_smapi_model.v1.skill.experiment.destination_state.DestinationState + :param status: + :type status: (optional) ask_smapi_model.v1.skill.experiment.state_transition_status.StateTransitionStatus + :param start_time: + :type start_time: (optional) datetime + :param end_time: + :type end_time: (optional) datetime + :param errors: List of error objects which define what errors caused the state transition failure. + :type errors: (optional) list[ask_smapi_model.v1.skill.experiment.state_transition_error.StateTransitionError] + + """ + deserialized_types = { + 'source_state': 'ask_smapi_model.v1.skill.experiment.source_state.SourceState', + 'target_state': 'ask_smapi_model.v1.skill.experiment.destination_state.DestinationState', + 'status': 'ask_smapi_model.v1.skill.experiment.state_transition_status.StateTransitionStatus', + 'start_time': 'datetime', + 'end_time': 'datetime', + 'errors': 'list[ask_smapi_model.v1.skill.experiment.state_transition_error.StateTransitionError]' + } # type: Dict + + attribute_map = { + 'source_state': 'sourceState', + 'target_state': 'targetState', + 'status': 'status', + 'start_time': 'startTime', + 'end_time': 'endTime', + 'errors': 'errors' + } # type: Dict + supports_multiple_types = False + + def __init__(self, source_state=None, target_state=None, status=None, start_time=None, end_time=None, errors=None): + # type: (Optional[SourceState_88a676e0], Optional[DestinationState_8dc8c95c], Optional[StateTransitionStatus_53bf1e4d], Optional[datetime], Optional[datetime], Optional[List[StateTransitionError_990ec079]]) -> None + """Defines the last state transition information for the experiment. + + :param source_state: + :type source_state: (optional) ask_smapi_model.v1.skill.experiment.source_state.SourceState + :param target_state: + :type target_state: (optional) ask_smapi_model.v1.skill.experiment.destination_state.DestinationState + :param status: + :type status: (optional) ask_smapi_model.v1.skill.experiment.state_transition_status.StateTransitionStatus + :param start_time: + :type start_time: (optional) datetime + :param end_time: + :type end_time: (optional) datetime + :param errors: List of error objects which define what errors caused the state transition failure. + :type errors: (optional) list[ask_smapi_model.v1.skill.experiment.state_transition_error.StateTransitionError] + """ + self.__discriminator_value = None # type: str + + self.source_state = source_state + self.target_state = target_state + self.status = status + self.start_time = start_time + self.end_time = end_time + self.errors = errors + + 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, ExperimentLastStateTransition): + 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-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_stopped_reason.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_stopped_reason.py new file mode 100644 index 00000000..74cfb1c3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_stopped_reason.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ExperimentStoppedReason(Enum): + """ + The reason indicating why an exerpiment was stopped. If none is chosen then default to DEVELOPER_REQUEST. Only used when putting experiment into STOPPED state. + + + + Allowed enum values: [EXPERIMENT_SUCCESS, EXPERIMENT_ISSUE] + """ + EXPERIMENT_SUCCESS = "EXPERIMENT_SUCCESS" + EXPERIMENT_ISSUE = "EXPERIMENT_ISSUE" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ExperimentStoppedReason): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_summary.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_summary.py new file mode 100644 index 00000000..fe599310 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_summary.py @@ -0,0 +1,131 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.state import State as State_1d082829 + from ask_smapi_model.v1.skill.experiment.experiment_history import ExperimentHistory as ExperimentHistory_4dc94b66 + + +class ExperimentSummary(object): + """ + Defines the shortened Experiment body which would contain a summary of experiment information. + + + :param experiment_id: Identifier for experiment within a skill. + :type experiment_id: (optional) str + :param name: Name that developer assigns to the experiment for easier identification. + :type name: (optional) str + :param state: + :type state: (optional) ask_smapi_model.v1.skill.experiment.state.State + :param experiment_history: + :type experiment_history: (optional) ask_smapi_model.v1.skill.experiment.experiment_history.ExperimentHistory + + """ + deserialized_types = { + 'experiment_id': 'str', + 'name': 'str', + 'state': 'ask_smapi_model.v1.skill.experiment.state.State', + 'experiment_history': 'ask_smapi_model.v1.skill.experiment.experiment_history.ExperimentHistory' + } # type: Dict + + attribute_map = { + 'experiment_id': 'experimentId', + 'name': 'name', + 'state': 'state', + 'experiment_history': 'experimentHistory' + } # type: Dict + supports_multiple_types = False + + def __init__(self, experiment_id=None, name=None, state=None, experiment_history=None): + # type: (Optional[str], Optional[str], Optional[State_1d082829], Optional[ExperimentHistory_4dc94b66]) -> None + """Defines the shortened Experiment body which would contain a summary of experiment information. + + :param experiment_id: Identifier for experiment within a skill. + :type experiment_id: (optional) str + :param name: Name that developer assigns to the experiment for easier identification. + :type name: (optional) str + :param state: + :type state: (optional) ask_smapi_model.v1.skill.experiment.state.State + :param experiment_history: + :type experiment_history: (optional) ask_smapi_model.v1.skill.experiment.experiment_history.ExperimentHistory + """ + self.__discriminator_value = None # type: str + + self.experiment_id = experiment_id + self.name = name + self.state = state + self.experiment_history = experiment_history + + 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, ExperimentSummary): + 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-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_trigger.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_trigger.py new file mode 100644 index 00000000..01f74a82 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_trigger.py @@ -0,0 +1,108 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ExperimentTrigger(object): + """ + Defines trigger properties of a skill experiment. + + + :param scheduled_end_time: + :type scheduled_end_time: (optional) datetime + + """ + deserialized_types = { + 'scheduled_end_time': 'datetime' + } # type: Dict + + attribute_map = { + 'scheduled_end_time': 'scheduledEndTime' + } # type: Dict + supports_multiple_types = False + + def __init__(self, scheduled_end_time=None): + # type: (Optional[datetime]) -> None + """Defines trigger properties of a skill experiment. + + :param scheduled_end_time: + :type scheduled_end_time: (optional) datetime + """ + self.__discriminator_value = None # type: str + + self.scheduled_end_time = scheduled_end_time + + 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, ExperimentTrigger): + 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-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_type.py new file mode 100644 index 00000000..7191e1ca --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/experiment_type.py @@ -0,0 +1,65 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ExperimentType(Enum): + """ + Type of the experiment which directly affects the skill version used for T1. C will always point to the skill version in the skill's LIVE stage regardless of experiment type. + + + + Allowed enum values: [ENDPOINT_BASED] + """ + ENDPOINT_BASED = "ENDPOINT_BASED" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ExperimentType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_customer_treatment_override_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_customer_treatment_override_response.py new file mode 100644 index 00000000..5454c93b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_customer_treatment_override_response.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.treatment_id import TreatmentId as TreatmentId_7e9594b2 + + +class GetCustomerTreatmentOverrideResponse(object): + """ + Defines the response body when this customer's treatment override information is requested. + + + :param treatment_id: + :type treatment_id: (optional) ask_smapi_model.v1.skill.experiment.treatment_id.TreatmentId + :param treatment_override_count: The number of overrides which currently exist for the experiment. + :type treatment_override_count: (optional) int + + """ + deserialized_types = { + 'treatment_id': 'ask_smapi_model.v1.skill.experiment.treatment_id.TreatmentId', + 'treatment_override_count': 'int' + } # type: Dict + + attribute_map = { + 'treatment_id': 'treatmentId', + 'treatment_override_count': 'treatmentOverrideCount' + } # type: Dict + supports_multiple_types = False + + def __init__(self, treatment_id=None, treatment_override_count=None): + # type: (Optional[TreatmentId_7e9594b2], Optional[int]) -> None + """Defines the response body when this customer's treatment override information is requested. + + :param treatment_id: + :type treatment_id: (optional) ask_smapi_model.v1.skill.experiment.treatment_id.TreatmentId + :param treatment_override_count: The number of overrides which currently exist for the experiment. + :type treatment_override_count: (optional) int + """ + self.__discriminator_value = None # type: str + + self.treatment_id = treatment_id + self.treatment_override_count = treatment_override_count + + 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, GetCustomerTreatmentOverrideResponse): + 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_metadata_result.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_experiment_metric_snapshot_response.py similarity index 60% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_metadata_result.py rename to ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_experiment_metric_snapshot_response.py index d9c9fac7..1da9a7f2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_metadata_result.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_experiment_metric_snapshot_response.py @@ -21,46 +21,53 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_status import EvaluationResultStatusV1 - from ask_smapi_model.v1.skill.asr.evaluations.metrics import MetricsV1 + from ask_smapi_model.v1.skill.experiment.metric_snapshot_status import MetricSnapshotStatus as MetricSnapshotStatus_92a961cb + from ask_smapi_model.v1.skill.experiment.metric import Metric as Metric_9f5de3 -class EvaluationMetadataResult(object): +class GetExperimentMetricSnapshotResponse(object): """ - indicate the result of the evaluation. This field would be present if the evaluation status is `COMPLETED` + Defines the response body for retrieving the experiment results. :param status: - :type status: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_status.EvaluationResultStatus - :param metrics: - :type metrics: (optional) ask_smapi_model.v1.skill.asr.evaluations.metrics.Metrics + :type status: (optional) ask_smapi_model.v1.skill.experiment.metric_snapshot_status.MetricSnapshotStatus + :param status_reason: The reason why the metric snapshot status is unreliable. + :type status_reason: (optional) str + :param metrics: List of actual experiment metrics represented by a metric snapshot. + :type metrics: (optional) list[ask_smapi_model.v1.skill.experiment.metric.Metric] """ deserialized_types = { - 'status': 'ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_status.EvaluationResultStatus', - 'metrics': 'ask_smapi_model.v1.skill.asr.evaluations.metrics.Metrics' + 'status': 'ask_smapi_model.v1.skill.experiment.metric_snapshot_status.MetricSnapshotStatus', + 'status_reason': 'str', + 'metrics': 'list[ask_smapi_model.v1.skill.experiment.metric.Metric]' } # type: Dict attribute_map = { 'status': 'status', + 'status_reason': 'statusReason', 'metrics': 'metrics' } # type: Dict supports_multiple_types = False - def __init__(self, status=None, metrics=None): - # type: (Optional[EvaluationResultStatusV1], Optional[MetricsV1]) -> None - """indicate the result of the evaluation. This field would be present if the evaluation status is `COMPLETED` + def __init__(self, status=None, status_reason=None, metrics=None): + # type: (Optional[MetricSnapshotStatus_92a961cb], Optional[str], Optional[List[Metric_9f5de3]]) -> None + """Defines the response body for retrieving the experiment results. :param status: - :type status: (optional) ask_smapi_model.v1.skill.asr.evaluations.evaluation_result_status.EvaluationResultStatus - :param metrics: - :type metrics: (optional) ask_smapi_model.v1.skill.asr.evaluations.metrics.Metrics + :type status: (optional) ask_smapi_model.v1.skill.experiment.metric_snapshot_status.MetricSnapshotStatus + :param status_reason: The reason why the metric snapshot status is unreliable. + :type status_reason: (optional) str + :param metrics: List of actual experiment metrics represented by a metric snapshot. + :type metrics: (optional) list[ask_smapi_model.v1.skill.experiment.metric.Metric] """ self.__discriminator_value = None # type: str self.status = status + self.status_reason = status_reason self.metrics = metrics def to_dict(self): @@ -106,7 +113,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, EvaluationMetadataResult): + if not isinstance(other, GetExperimentMetricSnapshotResponse): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/audio_asset.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_experiment_response.py similarity index 59% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/audio_asset.py rename to ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_experiment_response.py index 50299af2..5b7cc9ca 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/audio_asset.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_experiment_response.py @@ -21,47 +21,47 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset_download_url import AudioAssetDownloadUrlV1 - from ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset_download_url_expiry_time import AudioAssetDownloadUrlExpiryTimeV1 + from ask_smapi_model.v1.skill.experiment.experiment_last_state_transition import ExperimentLastStateTransition as ExperimentLastStateTransition_f996ed1a + from ask_smapi_model.v1.skill.experiment.experiment_information import ExperimentInformation as ExperimentInformation_60aa8516 -class AudioAsset(object): +class GetExperimentResponse(object): """ - Object containing information about downloading audio file + Defines the response body for retrieving an experiment. - :param download_url: - :type download_url: (optional) ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset_download_url.AudioAssetDownloadUrl - :param expiry_time: - :type expiry_time: (optional) ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset_download_url_expiry_time.AudioAssetDownloadUrlExpiryTime + :param experiment: + :type experiment: (optional) ask_smapi_model.v1.skill.experiment.experiment_information.ExperimentInformation + :param last_state_transition: + :type last_state_transition: (optional) ask_smapi_model.v1.skill.experiment.experiment_last_state_transition.ExperimentLastStateTransition """ deserialized_types = { - 'download_url': 'ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset_download_url.AudioAssetDownloadUrl', - 'expiry_time': 'ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset_download_url_expiry_time.AudioAssetDownloadUrlExpiryTime' + 'experiment': 'ask_smapi_model.v1.skill.experiment.experiment_information.ExperimentInformation', + 'last_state_transition': 'ask_smapi_model.v1.skill.experiment.experiment_last_state_transition.ExperimentLastStateTransition' } # type: Dict attribute_map = { - 'download_url': 'downloadUrl', - 'expiry_time': 'expiryTime' + 'experiment': 'experiment', + 'last_state_transition': 'lastStateTransition' } # type: Dict supports_multiple_types = False - def __init__(self, download_url=None, expiry_time=None): - # type: (Optional[AudioAssetDownloadUrlV1], Optional[AudioAssetDownloadUrlExpiryTimeV1]) -> None - """Object containing information about downloading audio file + def __init__(self, experiment=None, last_state_transition=None): + # type: (Optional[ExperimentInformation_60aa8516], Optional[ExperimentLastStateTransition_f996ed1a]) -> None + """Defines the response body for retrieving an experiment. - :param download_url: - :type download_url: (optional) ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset_download_url.AudioAssetDownloadUrl - :param expiry_time: - :type expiry_time: (optional) ask_smapi_model.v1.skill.asr.annotation_sets.audio_asset_download_url_expiry_time.AudioAssetDownloadUrlExpiryTime + :param experiment: + :type experiment: (optional) ask_smapi_model.v1.skill.experiment.experiment_information.ExperimentInformation + :param last_state_transition: + :type last_state_transition: (optional) ask_smapi_model.v1.skill.experiment.experiment_last_state_transition.ExperimentLastStateTransition """ self.__discriminator_value = None # type: str - self.download_url = download_url - self.expiry_time = expiry_time + self.experiment = experiment + self.last_state_transition = last_state_transition def to_dict(self): # type: () -> Dict[str, object] @@ -106,7 +106,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, AudioAsset): + if not isinstance(other, GetExperimentResponse): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_experiment_state_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_experiment_state_response.py new file mode 100644 index 00000000..4feb3b31 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/get_experiment_state_response.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.state import State as State_1d082829 + + +class GetExperimentStateResponse(object): + """ + Defines the response body for retrieving the current experiment state. + + + :param state: + :type state: (optional) ask_smapi_model.v1.skill.experiment.state.State + + """ + deserialized_types = { + 'state': 'ask_smapi_model.v1.skill.experiment.state.State' + } # type: Dict + + attribute_map = { + 'state': 'state' + } # type: Dict + supports_multiple_types = False + + def __init__(self, state=None): + # type: (Optional[State_1d082829]) -> None + """Defines the response body for retrieving the current experiment state. + + :param state: + :type state: (optional) ask_smapi_model.v1.skill.experiment.state.State + """ + self.__discriminator_value = None # type: str + + self.state = state + + 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, GetExperimentStateResponse): + 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/get_asr_evaluations_results_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/list_experiment_metric_snapshots_response.py similarity index 65% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/get_asr_evaluations_results_response.py rename to ask-smapi-model/ask_smapi_model/v1/skill/experiment/list_experiment_metric_snapshots_response.py index 17f4f2c3..1dc8457f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/get_asr_evaluations_results_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/list_experiment_metric_snapshots_response.py @@ -21,47 +21,47 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.asr.evaluations.evaluation_result import EvaluationResultV1 - from ask_smapi_model.v1.skill.asr.evaluations.pagination_context import PaginationContextV1 + from ask_smapi_model.v1.skill.experiment.pagination_context import PaginationContext as PaginationContext_caf5a7fc + from ask_smapi_model.v1.skill.experiment.metric_snapshot import MetricSnapshot as MetricSnapshot_9f57f21a -class GetAsrEvaluationsResultsResponse(object): +class ListExperimentMetricSnapshotsResponse(object): """ - response for GetAsrEvaluationsResults + Defines the response body for retrieving the experiment metric snapshots. - :param results: array containing all evaluation results. - :type results: (optional) list[ask_smapi_model.v1.skill.asr.evaluations.evaluation_result.EvaluationResult] :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.asr.evaluations.pagination_context.PaginationContext + :type pagination_context: (optional) ask_smapi_model.v1.skill.experiment.pagination_context.PaginationContext + :param metric_snapshots: List of experiment metric snapshots. + :type metric_snapshots: (optional) list[ask_smapi_model.v1.skill.experiment.metric_snapshot.MetricSnapshot] """ deserialized_types = { - 'results': 'list[ask_smapi_model.v1.skill.asr.evaluations.evaluation_result.EvaluationResult]', - 'pagination_context': 'ask_smapi_model.v1.skill.asr.evaluations.pagination_context.PaginationContext' + 'pagination_context': 'ask_smapi_model.v1.skill.experiment.pagination_context.PaginationContext', + 'metric_snapshots': 'list[ask_smapi_model.v1.skill.experiment.metric_snapshot.MetricSnapshot]' } # type: Dict attribute_map = { - 'results': 'results', - 'pagination_context': 'paginationContext' + 'pagination_context': 'paginationContext', + 'metric_snapshots': 'metricSnapshots' } # type: Dict supports_multiple_types = False - def __init__(self, results=None, pagination_context=None): - # type: (Optional[List[EvaluationResultV1]], Optional[PaginationContextV1]) -> None - """response for GetAsrEvaluationsResults + def __init__(self, pagination_context=None, metric_snapshots=None): + # type: (Optional[PaginationContext_caf5a7fc], Optional[List[MetricSnapshot_9f57f21a]]) -> None + """Defines the response body for retrieving the experiment metric snapshots. - :param results: array containing all evaluation results. - :type results: (optional) list[ask_smapi_model.v1.skill.asr.evaluations.evaluation_result.EvaluationResult] :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.asr.evaluations.pagination_context.PaginationContext + :type pagination_context: (optional) ask_smapi_model.v1.skill.experiment.pagination_context.PaginationContext + :param metric_snapshots: List of experiment metric snapshots. + :type metric_snapshots: (optional) list[ask_smapi_model.v1.skill.experiment.metric_snapshot.MetricSnapshot] """ self.__discriminator_value = None # type: str - self.results = results self.pagination_context = pagination_context + self.metric_snapshots = metric_snapshots def to_dict(self): # type: () -> Dict[str, object] @@ -106,7 +106,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, GetAsrEvaluationsResultsResponse): + if not isinstance(other, ListExperimentMetricSnapshotsResponse): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/list_asr_annotation_sets_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/list_experiments_response.py similarity index 65% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/list_asr_annotation_sets_response.py rename to ask-smapi-model/ask_smapi_model/v1/skill/experiment/list_experiments_response.py index f7abacb1..ecb3e103 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/list_asr_annotation_sets_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/list_experiments_response.py @@ -21,45 +21,47 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.asr.annotation_sets.annotation_set_items import AnnotationSetItemsV1 - from ask_smapi_model.v1.skill.asr.annotation_sets.pagination_context import PaginationContextV1 + from ask_smapi_model.v1.skill.experiment.pagination_context import PaginationContext as PaginationContext_caf5a7fc + from ask_smapi_model.v1.skill.experiment.experiment_summary import ExperimentSummary as ExperimentSummary_ac6f10a -class ListASRAnnotationSetsResponse(object): +class ListExperimentsResponse(object): """ + Defines the response body for retrieving all the experiments of a skill. + - :param annotation_sets: - :type annotation_sets: (optional) list[ask_smapi_model.v1.skill.asr.annotation_sets.annotation_set_items.AnnotationSetItems] :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.asr.annotation_sets.pagination_context.PaginationContext + :type pagination_context: (optional) ask_smapi_model.v1.skill.experiment.pagination_context.PaginationContext + :param experiments: List of experiments with select fields returned. + :type experiments: (optional) list[ask_smapi_model.v1.skill.experiment.experiment_summary.ExperimentSummary] """ deserialized_types = { - 'annotation_sets': 'list[ask_smapi_model.v1.skill.asr.annotation_sets.annotation_set_items.AnnotationSetItems]', - 'pagination_context': 'ask_smapi_model.v1.skill.asr.annotation_sets.pagination_context.PaginationContext' + 'pagination_context': 'ask_smapi_model.v1.skill.experiment.pagination_context.PaginationContext', + 'experiments': 'list[ask_smapi_model.v1.skill.experiment.experiment_summary.ExperimentSummary]' } # type: Dict attribute_map = { - 'annotation_sets': 'annotationSets', - 'pagination_context': 'paginationContext' + 'pagination_context': 'paginationContext', + 'experiments': 'experiments' } # type: Dict supports_multiple_types = False - def __init__(self, annotation_sets=None, pagination_context=None): - # type: (Optional[List[AnnotationSetItemsV1]], Optional[PaginationContextV1]) -> None - """ + def __init__(self, pagination_context=None, experiments=None): + # type: (Optional[PaginationContext_caf5a7fc], Optional[List[ExperimentSummary_ac6f10a]]) -> None + """Defines the response body for retrieving all the experiments of a skill. - :param annotation_sets: - :type annotation_sets: (optional) list[ask_smapi_model.v1.skill.asr.annotation_sets.annotation_set_items.AnnotationSetItems] :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.asr.annotation_sets.pagination_context.PaginationContext + :type pagination_context: (optional) ask_smapi_model.v1.skill.experiment.pagination_context.PaginationContext + :param experiments: List of experiments with select fields returned. + :type experiments: (optional) list[ask_smapi_model.v1.skill.experiment.experiment_summary.ExperimentSummary] """ self.__discriminator_value = None # type: str - self.annotation_sets = annotation_sets self.pagination_context = pagination_context + self.experiments = experiments def to_dict(self): # type: () -> Dict[str, object] @@ -104,7 +106,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, ListASRAnnotationSetsResponse): + if not isinstance(other, ListExperimentsResponse): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/manage_experiment_state_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/manage_experiment_state_request.py new file mode 100644 index 00000000..b9ee070b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/manage_experiment_state_request.py @@ -0,0 +1,117 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.experiment_stopped_reason import ExperimentStoppedReason as ExperimentStoppedReason_13db0673 + from ask_smapi_model.v1.skill.experiment.target_state import TargetState as TargetState_bcd8bf20 + + +class ManageExperimentStateRequest(object): + """ + Defines the request body for performing an experiment action to move it to a target state. + + + :param target_state: + :type target_state: (optional) ask_smapi_model.v1.skill.experiment.target_state.TargetState + :param stopped_reason: + :type stopped_reason: (optional) ask_smapi_model.v1.skill.experiment.experiment_stopped_reason.ExperimentStoppedReason + + """ + deserialized_types = { + 'target_state': 'ask_smapi_model.v1.skill.experiment.target_state.TargetState', + 'stopped_reason': 'ask_smapi_model.v1.skill.experiment.experiment_stopped_reason.ExperimentStoppedReason' + } # type: Dict + + attribute_map = { + 'target_state': 'targetState', + 'stopped_reason': 'stoppedReason' + } # type: Dict + supports_multiple_types = False + + def __init__(self, target_state=None, stopped_reason=None): + # type: (Optional[TargetState_bcd8bf20], Optional[ExperimentStoppedReason_13db0673]) -> None + """Defines the request body for performing an experiment action to move it to a target state. + + :param target_state: + :type target_state: (optional) ask_smapi_model.v1.skill.experiment.target_state.TargetState + :param stopped_reason: + :type stopped_reason: (optional) ask_smapi_model.v1.skill.experiment.experiment_stopped_reason.ExperimentStoppedReason + """ + self.__discriminator_value = None # type: str + + self.target_state = target_state + self.stopped_reason = stopped_reason + + 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, ManageExperimentStateRequest): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric.py similarity index 65% rename from ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_intent.py rename to ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric.py index 46ec5058..dadfb2ee 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_intent.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric.py @@ -21,44 +21,54 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_intent_slot import ConflictIntentSlotV1 + from ask_smapi_model.v1.skill.experiment.treatment_id import TreatmentId as TreatmentId_7e9594b2 + from ask_smapi_model.v1.skill.experiment.metric_values import MetricValues as MetricValues_681f475a -class ConflictIntent(object): +class Metric(object): """ + Defines the metrics body. - :param name: Conflict intent name + + :param name: Unique name that identifies experiment metric. :type name: (optional) str - :param slots: List of conflict intent slots - :type slots: (optional) dict(str, ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_intent_slot.ConflictIntentSlot) + :param treatment_id: + :type treatment_id: (optional) ask_smapi_model.v1.skill.experiment.treatment_id.TreatmentId + :param values: + :type values: (optional) ask_smapi_model.v1.skill.experiment.metric_values.MetricValues """ deserialized_types = { 'name': 'str', - 'slots': 'dict(str, ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_intent_slot.ConflictIntentSlot)' + 'treatment_id': 'ask_smapi_model.v1.skill.experiment.treatment_id.TreatmentId', + 'values': 'ask_smapi_model.v1.skill.experiment.metric_values.MetricValues' } # type: Dict attribute_map = { 'name': 'name', - 'slots': 'slots' + 'treatment_id': 'treatmentId', + 'values': 'values' } # type: Dict supports_multiple_types = False - def __init__(self, name=None, slots=None): - # type: (Optional[str], Optional[Dict[str, ConflictIntentSlotV1]]) -> None - """ + def __init__(self, name=None, treatment_id=None, values=None): + # type: (Optional[str], Optional[TreatmentId_7e9594b2], Optional[MetricValues_681f475a]) -> None + """Defines the metrics body. - :param name: Conflict intent name + :param name: Unique name that identifies experiment metric. :type name: (optional) str - :param slots: List of conflict intent slots - :type slots: (optional) dict(str, ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_intent_slot.ConflictIntentSlot) + :param treatment_id: + :type treatment_id: (optional) ask_smapi_model.v1.skill.experiment.treatment_id.TreatmentId + :param values: + :type values: (optional) ask_smapi_model.v1.skill.experiment.metric_values.MetricValues """ self.__discriminator_value = None # type: str self.name = name - self.slots = slots + self.treatment_id = treatment_id + self.values = values def to_dict(self): # type: () -> Dict[str, object] @@ -103,7 +113,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, ConflictIntent): + if not isinstance(other, Metric): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_change_direction.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_change_direction.py new file mode 100644 index 00000000..1683e512 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_change_direction.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class MetricChangeDirection(Enum): + """ + The direction that an experiment metric is expected to trend during the experiment. * `INCREASE` - An upward change in metric value. * `DECREASE` - A downward change in metric value. + + + + Allowed enum values: [INCREASE, DECREASE] + """ + INCREASE = "INCREASE" + DECREASE = "DECREASE" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, MetricChangeDirection): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation_set_metadata.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_configuration.py similarity index 57% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation_set_metadata.py rename to ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_configuration.py index 9049e07d..8e4d736e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation_set_metadata.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_configuration.py @@ -21,57 +21,54 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime + from ask_smapi_model.v1.skill.experiment.metric_change_direction import MetricChangeDirection as MetricChangeDirection_b2da5785 + from ask_smapi_model.v1.skill.experiment.metric_type import MetricType as MetricType_7b65055a -class AnnotationSetMetadata(object): +class MetricConfiguration(object): """ + Configures the metrics that will be captured for the skill experiment. This is required by the system that collects metrics and generates the metric reports. - :param name: Name of the ASR annotation set + + :param name: Unique name that identifies experiment metric. :type name: (optional) str - :param annotation_count: Number of annotations within an annotation set - :type annotation_count: (optional) int - :param last_updated_timestamp: The timestamp for the most recent update of ASR annotation set - :type last_updated_timestamp: (optional) datetime - :param eligible_for_evaluation: Indicates if the annotation set is eligible for evaluation. A set is not eligible for evaluation if any annotation within the set has a missing uploadId, filePathInUpload, expectedTranscription, or evaluationWeight. - :type eligible_for_evaluation: (optional) bool + :param metric_types: List of types that the metric has been assigned. + :type metric_types: (optional) list[ask_smapi_model.v1.skill.experiment.metric_type.MetricType] + :param expected_change: + :type expected_change: (optional) ask_smapi_model.v1.skill.experiment.metric_change_direction.MetricChangeDirection """ deserialized_types = { 'name': 'str', - 'annotation_count': 'int', - 'last_updated_timestamp': 'datetime', - 'eligible_for_evaluation': 'bool' + 'metric_types': 'list[ask_smapi_model.v1.skill.experiment.metric_type.MetricType]', + 'expected_change': 'ask_smapi_model.v1.skill.experiment.metric_change_direction.MetricChangeDirection' } # type: Dict attribute_map = { 'name': 'name', - 'annotation_count': 'annotationCount', - 'last_updated_timestamp': 'lastUpdatedTimestamp', - 'eligible_for_evaluation': 'eligibleForEvaluation' + 'metric_types': 'metricTypes', + 'expected_change': 'expectedChange' } # type: Dict supports_multiple_types = False - def __init__(self, name=None, annotation_count=None, last_updated_timestamp=None, eligible_for_evaluation=None): - # type: (Optional[str], Optional[int], Optional[datetime], Optional[bool]) -> None - """ + def __init__(self, name=None, metric_types=None, expected_change=None): + # type: (Optional[str], Optional[List[MetricType_7b65055a]], Optional[MetricChangeDirection_b2da5785]) -> None + """Configures the metrics that will be captured for the skill experiment. This is required by the system that collects metrics and generates the metric reports. - :param name: Name of the ASR annotation set + :param name: Unique name that identifies experiment metric. :type name: (optional) str - :param annotation_count: Number of annotations within an annotation set - :type annotation_count: (optional) int - :param last_updated_timestamp: The timestamp for the most recent update of ASR annotation set - :type last_updated_timestamp: (optional) datetime - :param eligible_for_evaluation: Indicates if the annotation set is eligible for evaluation. A set is not eligible for evaluation if any annotation within the set has a missing uploadId, filePathInUpload, expectedTranscription, or evaluationWeight. - :type eligible_for_evaluation: (optional) bool + :param metric_types: List of types that the metric has been assigned. + :type metric_types: (optional) list[ask_smapi_model.v1.skill.experiment.metric_type.MetricType] + :param expected_change: + :type expected_change: (optional) ask_smapi_model.v1.skill.experiment.metric_change_direction.MetricChangeDirection """ self.__discriminator_value = None # type: str self.name = name - self.annotation_count = annotation_count - self.last_updated_timestamp = last_updated_timestamp - self.eligible_for_evaluation = eligible_for_evaluation + self.metric_types = metric_types + self.expected_change = expected_change def to_dict(self): # type: () -> Dict[str, object] @@ -116,7 +113,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, AnnotationSetMetadata): + if not isinstance(other, MetricConfiguration): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_snapshot.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_snapshot.py new file mode 100644 index 00000000..ba7e9518 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_snapshot.py @@ -0,0 +1,122 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class MetricSnapshot(object): + """ + Defines the metric snapshot body with supplemental metadata properties. + + + :param metric_snapshot_id: Identifies the experiment metric snapshot in a skill experiment. + :type metric_snapshot_id: (optional) str + :param start_date: The start date of the metric snapshot. + :type start_date: (optional) datetime + :param end_date: The end date of the metric snapshot. + :type end_date: (optional) datetime + + """ + deserialized_types = { + 'metric_snapshot_id': 'str', + 'start_date': 'datetime', + 'end_date': 'datetime' + } # type: Dict + + attribute_map = { + 'metric_snapshot_id': 'metricSnapshotId', + 'start_date': 'startDate', + 'end_date': 'endDate' + } # type: Dict + supports_multiple_types = False + + def __init__(self, metric_snapshot_id=None, start_date=None, end_date=None): + # type: (Optional[str], Optional[datetime], Optional[datetime]) -> None + """Defines the metric snapshot body with supplemental metadata properties. + + :param metric_snapshot_id: Identifies the experiment metric snapshot in a skill experiment. + :type metric_snapshot_id: (optional) str + :param start_date: The start date of the metric snapshot. + :type start_date: (optional) datetime + :param end_date: The end date of the metric snapshot. + :type end_date: (optional) datetime + """ + self.__discriminator_value = None # type: str + + self.metric_snapshot_id = metric_snapshot_id + self.start_date = start_date + self.end_date = end_date + + 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, MetricSnapshot): + 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-smapi-model/ask_smapi_model/v1/skill/experiment/metric_snapshot_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_snapshot_status.py new file mode 100644 index 00000000..9f66eda9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_snapshot_status.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class MetricSnapshotStatus(Enum): + """ + The status of the metric snapshot, whether it's RELIABLE or UNRELIABLE. + + + + Allowed enum values: [RELIABLE, UNRELIABLE] + """ + RELIABLE = "RELIABLE" + UNRELIABLE = "UNRELIABLE" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, MetricSnapshotStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_type.py similarity index 69% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_status.py rename to ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_type.py index faa9a498..8586a193 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/evaluation_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_type.py @@ -21,24 +21,23 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class EvaluationStatus(Enum): +class MetricType(Enum): """ - Evaluation status: * `IN_PROGRESS` - indicate the evaluation is in progress. * `COMPLETED` - indicate the evaluation has been completed. * `FAILED` - indicate the evaluation has run into an error. + The metric types a specific metric can be assigned to. * `KEY` - Identified as a metric that should provide clear evidence of expected changes caused by the new treatment experience. * `GUARDRAIL` - Identified as a metric that would detect unexpected regressions caused by the new treatment experience. - Allowed enum values: [IN_PROGRESS, COMPLETED, FAILED] + Allowed enum values: [KEY, GUARDRAIL] """ - IN_PROGRESS = "IN_PROGRESS" - COMPLETED = "COMPLETED" - FAILED = "FAILED" + KEY = "KEY" + GUARDRAIL = "GUARDRAIL" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,14 +53,14 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" - if not isinstance(other, EvaluationStatus): + if not isinstance(other, MetricType): return False return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_values.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_values.py new file mode 100644 index 00000000..65ce2159 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/metric_values.py @@ -0,0 +1,143 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class MetricValues(object): + """ + Defines the body of the metric result values. + + + :param mean: The mean (average) of each sample (T1 or C group). + :type mean: (optional) float + :param percent_diff: The relative percent difference between the mean of the T1 group and the mean of the C group. + :type percent_diff: (optional) float + :param confidence_interval_lower: The lower limit number of the confidence interval range. Confidence interval measures the probability that the mean falls within a range. + :type confidence_interval_lower: (optional) float + :param confidence_interval_upper: The upper limit number of the confidence interval range. + :type confidence_interval_upper: (optional) float + :param p_value: The probability that the difference between the two means (from T1 and C) is due to random sampling error. + :type p_value: (optional) float + :param user_count: Count of users in the treatment sample. + :type user_count: (optional) int + + """ + deserialized_types = { + 'mean': 'float', + 'percent_diff': 'float', + 'confidence_interval_lower': 'float', + 'confidence_interval_upper': 'float', + 'p_value': 'float', + 'user_count': 'int' + } # type: Dict + + attribute_map = { + 'mean': 'mean', + 'percent_diff': 'percentDiff', + 'confidence_interval_lower': 'confidenceIntervalLower', + 'confidence_interval_upper': 'confidenceIntervalUpper', + 'p_value': 'pValue', + 'user_count': 'userCount' + } # type: Dict + supports_multiple_types = False + + def __init__(self, mean=None, percent_diff=None, confidence_interval_lower=None, confidence_interval_upper=None, p_value=None, user_count=None): + # type: (Optional[float], Optional[float], Optional[float], Optional[float], Optional[float], Optional[int]) -> None + """Defines the body of the metric result values. + + :param mean: The mean (average) of each sample (T1 or C group). + :type mean: (optional) float + :param percent_diff: The relative percent difference between the mean of the T1 group and the mean of the C group. + :type percent_diff: (optional) float + :param confidence_interval_lower: The lower limit number of the confidence interval range. Confidence interval measures the probability that the mean falls within a range. + :type confidence_interval_lower: (optional) float + :param confidence_interval_upper: The upper limit number of the confidence interval range. + :type confidence_interval_upper: (optional) float + :param p_value: The probability that the difference between the two means (from T1 and C) is due to random sampling error. + :type p_value: (optional) float + :param user_count: Count of users in the treatment sample. + :type user_count: (optional) int + """ + self.__discriminator_value = None # type: str + + self.mean = mean + self.percent_diff = percent_diff + self.confidence_interval_lower = confidence_interval_lower + self.confidence_interval_upper = confidence_interval_upper + self.p_value = p_value + self.user_count = user_count + + 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, MetricValues): + 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-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/pagination_context.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/pagination_context.py similarity index 77% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/pagination_context.py rename to ask-smapi-model/ask_smapi_model/v1/skill/experiment/pagination_context.py index f6d5a016..5b381265 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/pagination_context.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/pagination_context.py @@ -21,16 +21,16 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class PaginationContext(object): """ - This holds all data needed to control pagination from the user. + Defines the body that provides pagination-related properties in the operation response to indicate that additional paginated results are available. - :param next_token: The page token, this should be passed as a `nextToken` query parameter to the API to retrieve more items. If this field is not present the end of all of the items was reached. If a `maxResults` query parameter was specified then no more than `maxResults` items are returned. + :param next_token: Provided by server to retrieve the next set of paginated results. :type next_token: (optional) str """ @@ -45,9 +45,9 @@ class PaginationContext(object): def __init__(self, next_token=None): # type: (Optional[str]) -> None - """This holds all data needed to control pagination from the user. + """Defines the body that provides pagination-related properties in the operation response to indicate that additional paginated results are available. - :param next_token: The page token, this should be passed as a `nextToken` query parameter to the API to retrieve more items. If this field is not present the end of all of the items was reached. If a `maxResults` query parameter was specified then no more than `maxResults` items are returned. + :param next_token: Provided by server to retrieve the next set of paginated results. :type next_token: (optional) str """ self.__discriminator_value = None # type: str diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/set_customer_treatment_override_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/set_customer_treatment_override_request.py new file mode 100644 index 00000000..22d55998 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/set_customer_treatment_override_request.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.treatment_id import TreatmentId as TreatmentId_7e9594b2 + + +class SetCustomerTreatmentOverrideRequest(object): + """ + Defines the request body for adding this customer's treatment override to an experiment. + + + :param treatment_id: + :type treatment_id: (optional) ask_smapi_model.v1.skill.experiment.treatment_id.TreatmentId + + """ + deserialized_types = { + 'treatment_id': 'ask_smapi_model.v1.skill.experiment.treatment_id.TreatmentId' + } # type: Dict + + attribute_map = { + 'treatment_id': 'treatmentId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, treatment_id=None): + # type: (Optional[TreatmentId_7e9594b2]) -> None + """Defines the request body for adding this customer's treatment override to an experiment. + + :param treatment_id: + :type treatment_id: (optional) ask_smapi_model.v1.skill.experiment.treatment_id.TreatmentId + """ + self.__discriminator_value = None # type: str + + self.treatment_id = treatment_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, SetCustomerTreatmentOverrideRequest): + 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-smapi-model/ask_smapi_model/v1/skill/experiment/source_state.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/source_state.py new file mode 100644 index 00000000..de48fbd4 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/source_state.py @@ -0,0 +1,67 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SourceState(Enum): + """ + These states are for recording the previous state from a transition action (Created, Pilot, Start, Stop) on the experiment. * `CREATED`: Result state for the 'Create' action. Experiment has been created. * `ENABLED`: Result state for the 'Pilot' action. Experiment configurations are deployed and customer overrides are activated. Actual experiment has not started yet. * `RUNNING`: Result state for the 'Start' action. Experiment has started with the configured exposure. Skill customers selected within the exposure are contributing to the metric data. + + + + Allowed enum values: [CREATED, ENABLED, RUNNING] + """ + CREATED = "CREATED" + ENABLED = "ENABLED" + RUNNING = "RUNNING" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SourceState): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/state.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/state.py new file mode 100644 index 00000000..8345693e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/state.py @@ -0,0 +1,71 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class State(Enum): + """ + * `CREATED` - The experiment is successfully created but has not been enabled or started. * `ENABLING` - The experiment has initiated the transition to becoming \"ENABLED\". * `ENABLED` - The experiment configurations have been deployed but only customer treatment overrides set to T1 can view the T1 experience of a skill. No metrics are collected. * `RUNNING` - The experiment has started and a percentage of skill customers defined in the exposurePercentage will be entered into the experiment. Customers will randomly get assigned the T1 or C experience. Metric collection will begin. * `STOPPING` - The experiment has initated the transition to becoming \"STOPPED\". * `STOPPED` - The experiment has ended and all customers will experience the C behavior. Metrics will stop being collected. * `FAILED` - The experiment configurations have failed to deploy while enabling or starting the experiment. + + + + Allowed enum values: [CREATED, ENABLING, ENABLED, RUNNING, STOPPING, STOPPED, FAILED] + """ + CREATED = "CREATED" + ENABLING = "ENABLING" + ENABLED = "ENABLED" + RUNNING = "RUNNING" + STOPPING = "STOPPING" + STOPPED = "STOPPED" + FAILED = "FAILED" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, State): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/state_transition_error.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/state_transition_error.py new file mode 100644 index 00000000..af47eee4 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/state_transition_error.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.state_transition_error_type import StateTransitionErrorType as StateTransitionErrorType_84a26768 + + +class StateTransitionError(object): + """ + The errors which caused a state transition failure. + + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.experiment.state_transition_error_type.StateTransitionErrorType + :param message: The message associated with the state transition error. + :type message: (optional) str + + """ + deserialized_types = { + 'object_type': 'ask_smapi_model.v1.skill.experiment.state_transition_error_type.StateTransitionErrorType', + 'message': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'message': 'message' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, message=None): + # type: (Optional[StateTransitionErrorType_84a26768], Optional[str]) -> None + """The errors which caused a state transition failure. + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.experiment.state_transition_error_type.StateTransitionErrorType + :param message: The message associated with the state transition error. + :type message: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.message = message + + 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, StateTransitionError): + 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-smapi-model/ask_smapi_model/v1/skill/experiment/state_transition_error_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/state_transition_error_type.py new file mode 100644 index 00000000..fee382d0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/state_transition_error_type.py @@ -0,0 +1,65 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class StateTransitionErrorType(Enum): + """ + The error type which caused a state transition failure. + + + + Allowed enum values: [INELIGIBLITY] + """ + INELIGIBLITY = "INELIGIBLITY" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, StateTransitionErrorType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/state_transition_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/state_transition_status.py new file mode 100644 index 00000000..5daa35dc --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/state_transition_status.py @@ -0,0 +1,67 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class StateTransitionStatus(Enum): + """ + Status indiciating whether the state transiton was successful, in progress, or failed. + + + + Allowed enum values: [SUCCEEDED, IN_PROGRESS, FAILED] + """ + SUCCEEDED = "SUCCEEDED" + IN_PROGRESS = "IN_PROGRESS" + FAILED = "FAILED" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, StateTransitionStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/target_state.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/target_state.py new file mode 100644 index 00000000..cc4f5b36 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/target_state.py @@ -0,0 +1,67 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class TargetState(Enum): + """ + These states are used to perform a transition action (Pilot, Start, Stop, Conclude) on the experiment. * `ENABLED`: Target state for the 'Pilot' action. Experiment configurations are deployed and customer overrides are activated. Actual experiment has not started yet. * `RUNNING`: Target state for the 'Start' action. Experiment has started with the configured exposure. Skill customers selected within the exposure are contributing to the metric data. * `STOPPED`: Target state for the 'Stop' action. Experiment has stopped and all experiment configurations have been removed. All customers will see the C behavior by default. + + + + Allowed enum values: [ENABLED, RUNNING, STOPPED] + """ + ENABLED = "ENABLED" + RUNNING = "RUNNING" + STOPPED = "STOPPED" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, TargetState): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/treatment_id.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/treatment_id.py new file mode 100644 index 00000000..36a3312d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/treatment_id.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class TreatmentId(Enum): + """ + Treatment identifier for an experiment. * `C` - Control. The treatment that defines the existing skill experience. * `T1` - Treatment 1. The threatment that defines the experimental skill experience. + + + + Allowed enum values: [C, T1] + """ + C = "C" + T1 = "T1" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, TreatmentId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/experiment/update_experiment_input.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/update_experiment_input.py new file mode 100644 index 00000000..4d1002c4 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/update_experiment_input.py @@ -0,0 +1,130 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.metric_configuration import MetricConfiguration as MetricConfiguration_7789320a + + +class UpdateExperimentInput(object): + """ + Defines the Experiment body used for requesting an experiment update. Only includes fields that are editable by the user. + + + :param description: Hypothesis that developer provides to describe the experiment's purpose. + :type description: (optional) str + :param planned_duration: The number of weeks the skill builder intends to run the experiment. Used for documentation purposes and by metric platform as a reference. Does not impact experiment execution. Format uses ISO-8601 representation of duration. (Example: 4 weeks = \"P4W\") + :type planned_duration: (optional) str + :param exposure_percentage: The percentage of unique customers that will be part of the skill experiment while the experiment is running. + :type exposure_percentage: (optional) int + :param metric_configurations: List of metric configurations that determine which metrics are key/guardrail metrics and the expected metric direction. + :type metric_configurations: (optional) list[ask_smapi_model.v1.skill.experiment.metric_configuration.MetricConfiguration] + + """ + deserialized_types = { + 'description': 'str', + 'planned_duration': 'str', + 'exposure_percentage': 'int', + 'metric_configurations': 'list[ask_smapi_model.v1.skill.experiment.metric_configuration.MetricConfiguration]' + } # type: Dict + + attribute_map = { + 'description': 'description', + 'planned_duration': 'plannedDuration', + 'exposure_percentage': 'exposurePercentage', + 'metric_configurations': 'metricConfigurations' + } # type: Dict + supports_multiple_types = False + + def __init__(self, description=None, planned_duration=None, exposure_percentage=None, metric_configurations=None): + # type: (Optional[str], Optional[str], Optional[int], Optional[List[MetricConfiguration_7789320a]]) -> None + """Defines the Experiment body used for requesting an experiment update. Only includes fields that are editable by the user. + + :param description: Hypothesis that developer provides to describe the experiment's purpose. + :type description: (optional) str + :param planned_duration: The number of weeks the skill builder intends to run the experiment. Used for documentation purposes and by metric platform as a reference. Does not impact experiment execution. Format uses ISO-8601 representation of duration. (Example: 4 weeks = \"P4W\") + :type planned_duration: (optional) str + :param exposure_percentage: The percentage of unique customers that will be part of the skill experiment while the experiment is running. + :type exposure_percentage: (optional) int + :param metric_configurations: List of metric configurations that determine which metrics are key/guardrail metrics and the expected metric direction. + :type metric_configurations: (optional) list[ask_smapi_model.v1.skill.experiment.metric_configuration.MetricConfiguration] + """ + self.__discriminator_value = None # type: str + + self.description = description + self.planned_duration = planned_duration + self.exposure_percentage = exposure_percentage + self.metric_configurations = metric_configurations + + 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, UpdateExperimentInput): + 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-smapi-model/ask_smapi_model/v1/skill/experiment/update_experiment_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/update_experiment_request.py new file mode 100644 index 00000000..1a648dc8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/update_experiment_request.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.experiment.update_experiment_input import UpdateExperimentInput as UpdateExperimentInput_2a15a389 + + +class UpdateExperimentRequest(object): + """ + Defines the request body for updating an experiment. + + + :param experiment: + :type experiment: (optional) ask_smapi_model.v1.skill.experiment.update_experiment_input.UpdateExperimentInput + + """ + deserialized_types = { + 'experiment': 'ask_smapi_model.v1.skill.experiment.update_experiment_input.UpdateExperimentInput' + } # type: Dict + + attribute_map = { + 'experiment': 'experiment' + } # type: Dict + supports_multiple_types = False + + def __init__(self, experiment=None): + # type: (Optional[UpdateExperimentInput_2a15a389]) -> None + """Defines the request body for updating an experiment. + + :param experiment: + :type experiment: (optional) ask_smapi_model.v1.skill.experiment.update_experiment_input.UpdateExperimentInput + """ + self.__discriminator_value = None # type: str + + self.experiment = experiment + + 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, UpdateExperimentRequest): + 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-smapi-model/ask_smapi_model/v0/links.py b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/update_exposure_request.py similarity index 74% rename from ask-smapi-model/ask_smapi_model/v0/links.py rename to ask-smapi-model/ask_smapi_model/v1/skill/experiment/update_exposure_request.py index 563f1522..d3f86c3e 100644 --- a/ask-smapi-model/ask_smapi_model/v0/links.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/experiment/update_exposure_request.py @@ -21,46 +21,38 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v0.link import LinkV0 -class Links(object): +class UpdateExposureRequest(object): """ - Links for the API navigation. + Defines the request body for updating the exposure of an experiment. - :param object_self: - :type object_self: (optional) ask_smapi_model.v0.link.Link - :param next: - :type next: (optional) ask_smapi_model.v0.link.Link + :param exposure_percentage: The percentage of unique customers that will be part of the skill experiment while the experiment is running. + :type exposure_percentage: (optional) int """ deserialized_types = { - 'object_self': 'ask_smapi_model.v0.link.Link', - 'next': 'ask_smapi_model.v0.link.Link' + 'exposure_percentage': 'int' } # type: Dict attribute_map = { - 'object_self': 'self', - 'next': 'next' + 'exposure_percentage': 'exposurePercentage' } # type: Dict supports_multiple_types = False - def __init__(self, object_self=None, next=None): - # type: (Optional[LinkV0], Optional[LinkV0]) -> None - """Links for the API navigation. + def __init__(self, exposure_percentage=None): + # type: (Optional[int]) -> None + """Defines the request body for updating the exposure of an experiment. - :param object_self: - :type object_self: (optional) ask_smapi_model.v0.link.Link - :param next: - :type next: (optional) ask_smapi_model.v0.link.Link + :param exposure_percentage: The percentage of unique customers that will be part of the skill experiment while the experiment is running. + :type exposure_percentage: (optional) int """ self.__discriminator_value = None # type: str - self.object_self = object_self - self.next = next + self.exposure_percentage = exposure_percentage def to_dict(self): # type: () -> Dict[str, object] @@ -105,7 +97,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, Links): + if not isinstance(other, UpdateExposureRequest): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/export_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/export_response.py index 4e832fa6..c05b9e54 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/export_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/export_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.response_status import ResponseStatusV1 - from ask_smapi_model.v1.skill.export_response_skill import ExportResponseSkillV1 + from ask_smapi_model.v1.skill.response_status import ResponseStatus as ResponseStatus_95347977 + from ask_smapi_model.v1.skill.export_response_skill import ExportResponseSkill as ExportResponseSkill_66ce2c66 class ExportResponse(object): @@ -48,7 +48,7 @@ class ExportResponse(object): supports_multiple_types = False def __init__(self, status=None, skill=None): - # type: (Optional[ResponseStatusV1], Optional[ExportResponseSkillV1]) -> None + # type: (Optional[ResponseStatus_95347977], Optional[ExportResponseSkill_66ce2c66]) -> None """ :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/export_response_skill.py b/ask-smapi-model/ask_smapi_model/v1/skill/export_response_skill.py index b87a083c..02976ca1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/export_response_skill.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/export_response_skill.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/format.py b/ask-smapi-model/ask_smapi_model/v1/skill/format.py index 39c73e1d..19fed021 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/format.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/format.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class Format(Enum): URI = "URI" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Format): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/__init__.py index 4a31e398..894c729e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/__init__.py @@ -14,17 +14,17 @@ # from __future__ import absolute_import -from .confidence import Confidence from .intent_request import IntentRequest -from .intent_request_locales import IntentRequestLocales -from .locale_in_query import LocaleInQuery from .publication_status import PublicationStatus -from .slot import Slot -from .intent_confidence_bin import IntentConfidenceBin -from .intent_requests import IntentRequests -from .sort_field_for_intent_request_type import SortFieldForIntentRequestType -from .confidence_bin import ConfidenceBin -from .dialog_act import DialogAct from .dialog_act_name import DialogActName +from .sort_field_for_intent_request_type import SortFieldForIntentRequestType +from .slot import Slot from .interaction_type import InteractionType +from .dialog_act import DialogAct +from .locale_in_query import LocaleInQuery +from .confidence_bin import ConfidenceBin +from .intent_requests import IntentRequests from .intent import Intent +from .intent_request_locales import IntentRequestLocales +from .intent_confidence_bin import IntentConfidenceBin +from .confidence import Confidence diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/confidence.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/confidence.py index 5f9b8eec..db07d1bf 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/confidence.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/confidence.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.history.confidence_bin import ConfidenceBinV1 + from ask_smapi_model.v1.skill.history.confidence_bin import ConfidenceBin as ConfidenceBin_b5468f41 class Confidence(object): @@ -45,7 +45,7 @@ class Confidence(object): supports_multiple_types = False def __init__(self, bin=None): - # type: (Optional[ConfidenceBinV1]) -> None + # type: (Optional[ConfidenceBin_b5468f41]) -> None """The hypothesized confidence for this interaction. :param bin: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/confidence_bin.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/confidence_bin.py index 99143dd6..9120bb2d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/confidence_bin.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/confidence_bin.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ConfidenceBin(Enum): LOW = "LOW" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ConfidenceBin): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act.py index c3635c82..6a6957cd 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.history.dialog_act_name import DialogActNameV1 + from ask_smapi_model.v1.skill.history.dialog_act_name import DialogActName as DialogActName_df8326d6 class DialogAct(object): @@ -45,7 +45,7 @@ class DialogAct(object): supports_multiple_types = False def __init__(self, name=None): - # type: (Optional[DialogActNameV1]) -> None + # type: (Optional[DialogActName_df8326d6]) -> None """The dialog act used in the interaction. :param name: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act_name.py index bec91c69..6ed4e08e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act_name.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act_name.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class DialogActName(Enum): Dialog_ConfirmIntent = "Dialog.ConfirmIntent" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, DialogActName): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent.py index 410caf16..76a7c38e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/intent.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.history.slot import SlotV1 - from ask_smapi_model.v1.skill.history.confidence import ConfidenceV1 + from ask_smapi_model.v1.skill.history.slot import Slot as Slot_9d1773ae + from ask_smapi_model.v1.skill.history.confidence import Confidence as Confidence_e1f5282e class Intent(object): @@ -54,7 +54,7 @@ class Intent(object): supports_multiple_types = False def __init__(self, name=None, confidence=None, slots=None): - # type: (Optional[str], Optional[ConfidenceV1], Optional[Dict[str, SlotV1]]) -> None + # type: (Optional[str], Optional[Confidence_e1f5282e], Optional[Dict[str, Slot_9d1773ae]]) -> None """Provides the intent name, slots and confidence of the intent used in this interaction. :param name: The hypothesized intent for this utterance. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_confidence_bin.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_confidence_bin.py index 1bed71f5..5425e34d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_confidence_bin.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_confidence_bin.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class IntentConfidenceBin(Enum): LOW = "LOW" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, IntentConfidenceBin): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request.py index 3f381b47..88b7e83e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request.py @@ -21,14 +21,14 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.stage_type import StageTypeV1 - from ask_smapi_model.v1.skill.history.intent_request_locales import IntentRequestLocalesV1 - from ask_smapi_model.v1.skill.history.dialog_act import DialogActV1 - from ask_smapi_model.v1.skill.history.interaction_type import InteractionTypeV1 - from ask_smapi_model.v1.skill.history.intent import IntentV1 - from ask_smapi_model.v1.skill.history.publication_status import PublicationStatusV1 + from ask_smapi_model.v1.skill.history.dialog_act import DialogAct as DialogAct_4ef13157 + from ask_smapi_model.v1.skill.history.intent_request_locales import IntentRequestLocales as IntentRequestLocales_e5c9ca2e + from ask_smapi_model.v1.skill.history.publication_status import PublicationStatus as PublicationStatus_af1ce535 + from ask_smapi_model.v1.skill.history.intent import Intent as Intent_529291ee + from ask_smapi_model.v1.stage_type import StageType as StageType_700be16e + from ask_smapi_model.v1.skill.history.interaction_type import InteractionType as InteractionType_80494a05 class IntentRequest(object): @@ -72,7 +72,7 @@ class IntentRequest(object): supports_multiple_types = False def __init__(self, dialog_act=None, intent=None, interaction_type=None, locale=None, publication_status=None, stage=None, utterance_text=None): - # type: (Optional[DialogActV1], Optional[IntentV1], Optional[InteractionTypeV1], Optional[IntentRequestLocalesV1], Optional[PublicationStatusV1], Optional[StageTypeV1], Optional[str]) -> None + # type: (Optional[DialogAct_4ef13157], Optional[Intent_529291ee], Optional[InteractionType_80494a05], Optional[IntentRequestLocales_e5c9ca2e], Optional[PublicationStatus_af1ce535], Optional[StageType_700be16e], Optional[str]) -> None """ :param dialog_act: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request_locales.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request_locales.py index a9559cfe..1722d04f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request_locales.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request_locales.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -42,7 +42,7 @@ class IntentRequestLocales(Enum): ja_JP = "ja-JP" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -58,7 +58,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, IntentRequestLocales): return False @@ -66,6 +66,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_requests.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_requests.py index beea6227..7dd977b9 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_requests.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_requests.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 - from ask_smapi_model.v1.skill.history.intent_request import IntentRequestV1 + from ask_smapi_model.v1.skill.history.intent_request import IntentRequest as IntentRequest_f6fbe211 + from ask_smapi_model.v1.links import Links as Links_bc43467b class IntentRequests(object): @@ -70,7 +70,7 @@ class IntentRequests(object): supports_multiple_types = False def __init__(self, links=None, next_token=None, is_truncated=None, total_count=None, start_index=None, skill_id=None, items=None): - # type: (Optional[LinksV1], Optional[str], Optional[bool], Optional[float], Optional[float], Optional[str], Optional[List[IntentRequestV1]]) -> None + # type: (Optional[Links_bc43467b], Optional[str], Optional[bool], Optional[float], Optional[float], Optional[str], Optional[List[IntentRequest_f6fbe211]]) -> None """Response to the GET Intent Request History API. It contains the collection of utterances for the skill, nextToken and other metadata related to the search query. :param links: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/interaction_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/interaction_type.py index fbf4c655..55aa3a23 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/interaction_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/interaction_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class InteractionType(Enum): MODAL = "MODAL" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, InteractionType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/locale_in_query.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/locale_in_query.py index 0fb9ad96..6a1f2d9d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/locale_in_query.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/locale_in_query.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -42,7 +42,7 @@ class LocaleInQuery(Enum): ja_JP = "ja-JP" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -58,7 +58,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, LocaleInQuery): return False @@ -66,6 +66,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/publication_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/publication_status.py index 9d241006..0e116f69 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/publication_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/publication_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PublicationStatus(Enum): Certification = "Certification" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PublicationStatus): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/slot.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/slot.py index 742f876c..adcd245d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/slot.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/slot.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/history/sort_field_for_intent_request_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/sort_field_for_intent_request_type.py index 9c808cc1..cb80b1c0 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/history/sort_field_for_intent_request_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/sort_field_for_intent_request_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -42,7 +42,7 @@ class SortFieldForIntentRequestType(Enum): interactionType = "interactionType" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -58,7 +58,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SortFieldForIntentRequestType): return False @@ -66,6 +66,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_details.py b/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_details.py index 566546df..94d21794 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_details.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_details.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_status.py index 3d829ee4..b05a4d52 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.hosted_skill_deployment_status_last_update_request import HostedSkillDeploymentStatusLastUpdateRequestV1 + from ask_smapi_model.v1.skill.hosted_skill_deployment_status_last_update_request import HostedSkillDeploymentStatusLastUpdateRequest as HostedSkillDeploymentStatusLastUpdateRequest_4ef7ab8e class HostedSkillDeploymentStatus(object): @@ -45,7 +45,7 @@ class HostedSkillDeploymentStatus(object): supports_multiple_types = False def __init__(self, last_update_request=None): - # type: (Optional[HostedSkillDeploymentStatusLastUpdateRequestV1]) -> None + # type: (Optional[HostedSkillDeploymentStatusLastUpdateRequest_4ef7ab8e]) -> None """Defines the most recent deployment status for the Alexa hosted skill. :param last_update_request: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_status_last_update_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_status_last_update_request.py index 9fc31ef5..6a01f8c7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_status_last_update_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_deployment_status_last_update_request.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.hosted_skill_deployment_details import HostedSkillDeploymentDetailsV1 - from ask_smapi_model.v1.skill.status import StatusV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 + from ask_smapi_model.v1.skill.status import Status as Status_585d1308 + from ask_smapi_model.v1.skill.hosted_skill_deployment_details import HostedSkillDeploymentDetails as HostedSkillDeploymentDetails_874bf779 + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 class HostedSkillDeploymentStatusLastUpdateRequest(object): @@ -59,7 +59,7 @@ class HostedSkillDeploymentStatusLastUpdateRequest(object): supports_multiple_types = False def __init__(self, status=None, errors=None, warnings=None, deployment_details=None): - # type: (Optional[StatusV1], Optional[List[StandardizedErrorV1]], Optional[List[StandardizedErrorV1]], Optional[HostedSkillDeploymentDetailsV1]) -> None + # type: (Optional[Status_585d1308], Optional[List[StandardizedError_f5106a89]], Optional[List[StandardizedError_f5106a89]], Optional[HostedSkillDeploymentDetails_874bf779]) -> None """Contains attributes related to last modification request of a hosted skill deployment resource. :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_provisioning_last_update_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_provisioning_last_update_request.py index ef3c69f6..c5f704ba 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_provisioning_last_update_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_provisioning_last_update_request.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.status import StatusV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 + from ask_smapi_model.v1.skill.status import Status as Status_585d1308 + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 class HostedSkillProvisioningLastUpdateRequest(object): @@ -54,7 +54,7 @@ class HostedSkillProvisioningLastUpdateRequest(object): supports_multiple_types = False def __init__(self, status=None, errors=None, warnings=None): - # type: (Optional[StatusV1], Optional[List[StandardizedErrorV1]], Optional[List[StandardizedErrorV1]]) -> None + # type: (Optional[Status_585d1308], Optional[List[StandardizedError_f5106a89]], Optional[List[StandardizedError_f5106a89]]) -> None """Contains attributes related to last modification request of a hosted skill provisioning resource. :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_provisioning_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_provisioning_status.py index 48cd8bf1..3ed8080d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_provisioning_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/hosted_skill_provisioning_status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.hosted_skill_provisioning_last_update_request import HostedSkillProvisioningLastUpdateRequestV1 + from ask_smapi_model.v1.skill.hosted_skill_provisioning_last_update_request import HostedSkillProvisioningLastUpdateRequest as HostedSkillProvisioningLastUpdateRequest_93921317 class HostedSkillProvisioningStatus(object): @@ -45,7 +45,7 @@ class HostedSkillProvisioningStatus(object): supports_multiple_types = False def __init__(self, last_update_request=None): - # type: (Optional[HostedSkillProvisioningLastUpdateRequestV1]) -> None + # type: (Optional[HostedSkillProvisioningLastUpdateRequest_93921317]) -> None """Defines the provisioning status for hosted skill. :param last_update_request: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/image_attributes.py b/ask-smapi-model/ask_smapi_model/v1/skill/image_attributes.py index c84ef866..b7f906b8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/image_attributes.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/image_attributes.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.image_dimension import ImageDimensionV1 - from ask_smapi_model.v1.skill.image_size import ImageSizeV1 + from ask_smapi_model.v1.skill.image_dimension import ImageDimension as ImageDimension_4f87c1d + from ask_smapi_model.v1.skill.image_size import ImageSize as ImageSize_f2e12ed9 class ImageAttributes(object): @@ -36,32 +36,39 @@ class ImageAttributes(object): :type dimension: (optional) ask_smapi_model.v1.skill.image_dimension.ImageDimension :param size: :type size: (optional) ask_smapi_model.v1.skill.image_size.ImageSize + :param maximum_size: + :type maximum_size: (optional) ask_smapi_model.v1.skill.image_size.ImageSize """ deserialized_types = { 'dimension': 'ask_smapi_model.v1.skill.image_dimension.ImageDimension', - 'size': 'ask_smapi_model.v1.skill.image_size.ImageSize' + 'size': 'ask_smapi_model.v1.skill.image_size.ImageSize', + 'maximum_size': 'ask_smapi_model.v1.skill.image_size.ImageSize' } # type: Dict attribute_map = { 'dimension': 'dimension', - 'size': 'size' + 'size': 'size', + 'maximum_size': 'maximumSize' } # type: Dict supports_multiple_types = False - def __init__(self, dimension=None, size=None): - # type: (Optional[ImageDimensionV1], Optional[ImageSizeV1]) -> None + def __init__(self, dimension=None, size=None, maximum_size=None): + # type: (Optional[ImageDimension_4f87c1d], Optional[ImageSize_f2e12ed9], Optional[ImageSize_f2e12ed9]) -> None """Set of properties of the image provided by the customer. :param dimension: :type dimension: (optional) ask_smapi_model.v1.skill.image_dimension.ImageDimension :param size: :type size: (optional) ask_smapi_model.v1.skill.image_size.ImageSize + :param maximum_size: + :type maximum_size: (optional) ask_smapi_model.v1.skill.image_size.ImageSize """ self.__discriminator_value = None # type: str self.dimension = dimension self.size = size + self.maximum_size = maximum_size def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/image_dimension.py b/ask-smapi-model/ask_smapi_model/v1/skill/image_dimension.py index c17b6c3a..133bae85 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/image_dimension.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/image_dimension.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/image_size.py b/ask-smapi-model/ask_smapi_model/v1/skill/image_size.py index ad60db92..8b87ba1e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/image_size.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/image_size.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.image_size_unit import ImageSizeUnitV1 + from ask_smapi_model.v1.skill.image_size_unit import ImageSizeUnit as ImageSizeUnit_6d76202a class ImageSize(object): @@ -49,7 +49,7 @@ class ImageSize(object): supports_multiple_types = False def __init__(self, value=None, unit=None): - # type: (Optional[float], Optional[ImageSizeUnitV1]) -> None + # type: (Optional[float], Optional[ImageSizeUnit_6d76202a]) -> None """On disk storage size of image. :param value: Value measuring the size of the image. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/image_size_unit.py b/ask-smapi-model/ask_smapi_model/v1/skill/image_size_unit.py index b672c1e0..5ba28293 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/image_size_unit.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/image_size_unit.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class ImageSizeUnit(Enum): MB = "MB" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ImageSizeUnit): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/import_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/import_response.py index 1bd5fe3f..239381e6 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/import_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/import_response.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.response_status import ResponseStatusV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 - from ask_smapi_model.v1.skill.import_response_skill import ImportResponseSkillV1 + from ask_smapi_model.v1.skill.response_status import ResponseStatus as ResponseStatus_95347977 + from ask_smapi_model.v1.skill.import_response_skill import ImportResponseSkill as ImportResponseSkill_9f6a4e84 + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 class ImportResponse(object): @@ -57,7 +57,7 @@ class ImportResponse(object): supports_multiple_types = False def __init__(self, status=None, errors=None, warnings=None, skill=None): - # type: (Optional[ResponseStatusV1], Optional[List[StandardizedErrorV1]], Optional[List[StandardizedErrorV1]], Optional[ImportResponseSkillV1]) -> None + # type: (Optional[ResponseStatus_95347977], Optional[List[StandardizedError_f5106a89]], Optional[List[StandardizedError_f5106a89]], Optional[ImportResponseSkill_9f6a4e84]) -> None """ :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/import_response_skill.py b/ask-smapi-model/ask_smapi_model/v1/skill/import_response_skill.py index 5b2b83e3..8a2e4ba9 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/import_response_skill.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/import_response_skill.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.resource_import_status import ResourceImportStatusV1 + from ask_smapi_model.v1.skill.resource_import_status import ResourceImportStatus as ResourceImportStatus_5e5873f2 class ImportResponseSkill(object): @@ -51,7 +51,7 @@ class ImportResponseSkill(object): supports_multiple_types = False def __init__(self, skill_id=None, e_tag=None, resources=None): - # type: (Optional[str], Optional[str], Optional[List[ResourceImportStatusV1]]) -> None + # type: (Optional[str], Optional[str], Optional[List[ResourceImportStatus_5e5873f2]]) -> None """ :param skill_id: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/instance.py b/ask-smapi-model/ask_smapi_model/v1/skill/instance.py index f244d314..6a174aea 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/instance.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/instance.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.validation_data_types import ValidationDataTypesV1 + from ask_smapi_model.v1.skill.validation_data_types import ValidationDataTypes as ValidationDataTypes_30c76c0c class Instance(object): @@ -53,7 +53,7 @@ class Instance(object): supports_multiple_types = False def __init__(self, property_path=None, data_type=None, value=None): - # type: (Optional[str], Optional[ValidationDataTypesV1], Optional[str]) -> None + # type: (Optional[str], Optional[ValidationDataTypes_30c76c0c], Optional[str]) -> None """Structure representing properties of an instance of data. Definition will be either one of a booleanInstance, stringInstance, integerInstance, or compoundInstance. :param property_path: Path that uniquely identifies the instance in the resource. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/__init__.py index b2dc5306..0f9af1ff 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/__init__.py @@ -14,38 +14,38 @@ # from __future__ import absolute_import -from .dialog_prompts import DialogPrompts -from .prompt_items import PromptItems -from .has_entity_resolution_match import HasEntityResolutionMatch +from .prompt_items_type import PromptItemsType +from .slot_validation import SlotValidation from .multiple_values_config import MultipleValuesConfig -from .is_less_than import IsLessThan -from .is_not_in_set import IsNotInSet +from .type_value_object import TypeValueObject from .dialog_intents import DialogIntents -from .interaction_model_schema import InteractionModelSchema -from .value_catalog import ValueCatalog -from .is_greater_than import IsGreaterThan -from .fallback_intent_sensitivity import FallbackIntentSensitivity from .is_greater_than_or_equal_to import IsGreaterThanOrEqualTo -from .fallback_intent_sensitivity_level import FallbackIntentSensitivityLevel -from .slot_definition import SlotDefinition +from .dialog_slot_items import DialogSlotItems from .interaction_model_data import InteractionModelData -from .inline_value_supplier import InlineValueSupplier +from .is_greater_than import IsGreaterThan +from .model_configuration import ModelConfiguration +from .is_less_than import IsLessThan +from .dialog import Dialog +from .fallback_intent_sensitivity import FallbackIntentSensitivity from .dialog_intents_prompts import DialogIntentsPrompts -from .is_less_than_or_equal_to import IsLessThanOrEqualTo -from .catalog_value_supplier import CatalogValueSupplier +from .value_catalog import ValueCatalog from .slot_type import SlotType -from .model_configuration import ModelConfiguration -from .type_value import TypeValue +from .prompt import Prompt +from .inline_value_supplier import InlineValueSupplier +from .catalog_value_supplier import CatalogValueSupplier +from .is_not_in_set import IsNotInSet +from .slot_definition import SlotDefinition +from .is_not_in_duration import IsNotInDuration from .is_in_set import IsInSet from .is_in_duration import IsInDuration -from .is_not_in_duration import IsNotInDuration -from .value_supplier import ValueSupplier -from .prompt_items_type import PromptItemsType +from .type_value import TypeValue +from .intent import Intent +from .dialog_prompts import DialogPrompts +from .interaction_model_schema import InteractionModelSchema from .language_model import LanguageModel -from .dialog_slot_items import DialogSlotItems -from .dialog import Dialog -from .prompt import Prompt -from .type_value_object import TypeValueObject -from .slot_validation import SlotValidation +from .fallback_intent_sensitivity_level import FallbackIntentSensitivityLevel +from .has_entity_resolution_match import HasEntityResolutionMatch +from .value_supplier import ValueSupplier from .delegation_strategy_type import DelegationStrategyType -from .intent import Intent +from .is_less_than_or_equal_to import IsLessThanOrEqualTo +from .prompt_items import PromptItems diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/__init__.py index 64161838..eebd362b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/__init__.py @@ -14,14 +14,14 @@ # from __future__ import absolute_import -from .catalog_response import CatalogResponse -from .catalog_input import CatalogInput from .catalog_definition_output import CatalogDefinitionOutput -from .list_catalog_response import ListCatalogResponse from .update_request import UpdateRequest +from .definition_data import DefinitionData +from .catalog_status import CatalogStatus +from .catalog_input import CatalogInput from .catalog_status_type import CatalogStatusType +from .catalog_response import CatalogResponse +from .catalog_item import CatalogItem from .last_update_request import LastUpdateRequest from .catalog_entity import CatalogEntity -from .catalog_item import CatalogItem -from .catalog_status import CatalogStatus -from .definition_data import DefinitionData +from .list_catalog_response import ListCatalogResponse diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_definition_output.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_definition_output.py index 0ff520b3..26cf4cd7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_definition_output.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_definition_output.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_entity import CatalogEntityV1 + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_entity import CatalogEntity as CatalogEntity_8b1d9044 class CatalogDefinitionOutput(object): @@ -53,7 +53,7 @@ class CatalogDefinitionOutput(object): supports_multiple_types = False def __init__(self, catalog=None, creation_time=None, total_versions=None): - # type: (Optional[CatalogEntityV1], Optional[str], Optional[str]) -> None + # type: (Optional[CatalogEntity_8b1d9044], Optional[str], Optional[str]) -> None """Catalog request definitions. :param catalog: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_entity.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_entity.py index cdeb0d5b..d114bf50 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_entity.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_entity.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_input.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_input.py index 28a28a58..871ba767 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_input.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_input.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_item.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_item.py index 384054b1..53ac3f56 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_item.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_item.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b class CatalogItem(object): @@ -57,7 +57,7 @@ class CatalogItem(object): supports_multiple_types = False def __init__(self, name=None, description=None, catalog_id=None, links=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[LinksV1]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[Links_bc43467b]) -> None """Definition for catalog entity. :param name: Name of the catalog. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_response.py index e31d1390..80cfb377 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status.py index 42b51370..b1425696 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.catalog.last_update_request import LastUpdateRequestV1 + from ask_smapi_model.v1.skill.interaction_model.catalog.last_update_request import LastUpdateRequest as LastUpdateRequest_c40c7e97 class CatalogStatus(object): @@ -45,7 +45,7 @@ class CatalogStatus(object): supports_multiple_types = False def __init__(self, last_update_request=None): - # type: (Optional[LastUpdateRequestV1]) -> None + # type: (Optional[LastUpdateRequest_c40c7e97]) -> None """Defines the structure for catalog status response. :param last_update_request: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status_type.py index 1f0ca4b5..062a9a1c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class CatalogStatusType(Enum): SUCCEEDED = "SUCCEEDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, CatalogStatusType): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/definition_data.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/definition_data.py index 17e3bac9..1e54985c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/definition_data.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/definition_data.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_input import CatalogInputV1 + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_input import CatalogInput as CatalogInput_948a7988 class DefinitionData(object): @@ -49,7 +49,7 @@ class DefinitionData(object): supports_multiple_types = False def __init__(self, catalog=None, vendor_id=None): - # type: (Optional[CatalogInputV1], Optional[str]) -> None + # type: (Optional[CatalogInput_948a7988], Optional[str]) -> None """Catalog request definitions. :param catalog: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/last_update_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/last_update_request.py index 82d6d83f..78511bfb 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/last_update_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/last_update_request.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_status_type import CatalogStatusTypeV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_status_type import CatalogStatusType as CatalogStatusType_67605beb class LastUpdateRequest(object): @@ -54,7 +54,7 @@ class LastUpdateRequest(object): supports_multiple_types = False def __init__(self, status=None, version=None, errors=None): - # type: (Optional[CatalogStatusTypeV1], Optional[str], Optional[List[StandardizedErrorV1]]) -> None + # type: (Optional[CatalogStatusType_67605beb], Optional[str], Optional[List[StandardizedError_f5106a89]]) -> None """Contains attributes related to last modification request of a resource. :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/list_catalog_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/list_catalog_response.py index 61f5684f..147bdd24 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/list_catalog_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/list_catalog_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 - from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_item import CatalogItemV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_item import CatalogItem as CatalogItem_63fca3a4 class ListCatalogResponse(object): @@ -62,7 +62,7 @@ class ListCatalogResponse(object): supports_multiple_types = False def __init__(self, links=None, catalogs=None, is_truncated=None, next_token=None, total_count=None): - # type: (Optional[LinksV1], Optional[List[CatalogItemV1]], Optional[bool], Optional[str], Optional[int]) -> None + # type: (Optional[Links_bc43467b], Optional[List[CatalogItem_63fca3a4]], Optional[bool], Optional[str], Optional[int]) -> None """List of catalog versions of a skill for the vendor. :param links: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/update_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/update_request.py index db2fd0a9..9749203b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/update_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/update_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog_value_supplier.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog_value_supplier.py index 03f3ff23..176a64c5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog_value_supplier.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog_value_supplier.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.value_catalog import ValueCatalogV1 + from ask_smapi_model.v1.skill.interaction_model.value_catalog import ValueCatalog as ValueCatalog_7d792103 class CatalogValueSupplier(ValueSupplier): @@ -48,7 +48,7 @@ class CatalogValueSupplier(ValueSupplier): supports_multiple_types = False def __init__(self, value_catalog=None): - # type: (Optional[ValueCatalogV1]) -> None + # type: (Optional[ValueCatalog_7d792103]) -> None """Supply slot values from catalog(s). :param value_catalog: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/delegation_strategy_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/delegation_strategy_type.py index 82e6cd98..58688433 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/delegation_strategy_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/delegation_strategy_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class DelegationStrategyType(Enum): SKILL_RESPONSE = "SKILL_RESPONSE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, DelegationStrategyType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog.py index a654ed09..04d7dcb8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.dialog_intents import DialogIntentsV1 - from ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type import DelegationStrategyTypeV1 + from ask_smapi_model.v1.skill.interaction_model.dialog_intents import DialogIntents as DialogIntents_30175679 + from ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type import DelegationStrategyType as DelegationStrategyType_41525f1c class Dialog(object): @@ -50,7 +50,7 @@ class Dialog(object): supports_multiple_types = False def __init__(self, delegation_strategy=None, intents=None): - # type: (Optional[DelegationStrategyTypeV1], Optional[List[DialogIntentsV1]]) -> None + # type: (Optional[DelegationStrategyType_41525f1c], Optional[List[DialogIntents_30175679]]) -> None """Defines dialog rules e.g. slot elicitation and validation, intent chaining etc. :param delegation_strategy: Defines a delegation strategy for the dialogs in this dialog model. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents.py index 6d9effe9..d2b18b94 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.dialog_intents_prompts import DialogIntentsPromptsV1 - from ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type import DelegationStrategyTypeV1 - from ask_smapi_model.v1.skill.interaction_model.dialog_slot_items import DialogSlotItemsV1 + from ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type import DelegationStrategyType as DelegationStrategyType_41525f1c + from ask_smapi_model.v1.skill.interaction_model.dialog_intents_prompts import DialogIntentsPrompts as DialogIntentsPrompts_21433a86 + from ask_smapi_model.v1.skill.interaction_model.dialog_slot_items import DialogSlotItems as DialogSlotItems_b80f42ca class DialogIntents(object): @@ -61,7 +61,7 @@ class DialogIntents(object): supports_multiple_types = False def __init__(self, name=None, delegation_strategy=None, slots=None, confirmation_required=None, prompts=None): - # type: (Optional[str], Optional[DelegationStrategyTypeV1], Optional[List[DialogSlotItemsV1]], Optional[bool], Optional[DialogIntentsPromptsV1]) -> None + # type: (Optional[str], Optional[DelegationStrategyType_41525f1c], Optional[List[DialogSlotItems_b80f42ca]], Optional[bool], Optional[DialogIntentsPrompts_21433a86]) -> None """ :param name: Name of the intent that has a dialog specification. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents_prompts.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents_prompts.py index c055d42f..1478ab74 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents_prompts.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents_prompts.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_prompts.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_prompts.py index b6b5cc1c..c8da5f77 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_prompts.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_prompts.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_slot_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_slot_items.py index 18bc1558..67f98bf8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_slot_items.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_slot_items.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.slot_validation import SlotValidationV1 - from ask_smapi_model.v1.skill.interaction_model.dialog_prompts import DialogPromptsV1 + from ask_smapi_model.v1.skill.interaction_model.dialog_prompts import DialogPrompts as DialogPrompts_613880e9 + from ask_smapi_model.v1.skill.interaction_model.slot_validation import SlotValidation as SlotValidation_a707da03 class DialogSlotItems(object): @@ -64,7 +64,7 @@ class DialogSlotItems(object): supports_multiple_types = False def __init__(self, name=None, object_type=None, elicitation_required=None, confirmation_required=None, prompts=None, validations=None): - # type: (Optional[str], Optional[str], Optional[bool], Optional[bool], Optional[DialogPromptsV1], Optional[List[SlotValidationV1]]) -> None + # type: (Optional[str], Optional[str], Optional[bool], Optional[bool], Optional[DialogPrompts_613880e9], Optional[List[SlotValidation_a707da03]]) -> None """ :param name: The name of the slot that has dialog rules associated with it. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/fallback_intent_sensitivity.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/fallback_intent_sensitivity.py index 9247cab4..5fe919c0 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/fallback_intent_sensitivity.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/fallback_intent_sensitivity.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.fallback_intent_sensitivity_level import FallbackIntentSensitivityLevelV1 + from ask_smapi_model.v1.skill.interaction_model.fallback_intent_sensitivity_level import FallbackIntentSensitivityLevel as FallbackIntentSensitivityLevel_f253866b class FallbackIntentSensitivity(object): @@ -45,7 +45,7 @@ class FallbackIntentSensitivity(object): supports_multiple_types = False def __init__(self, level=None): - # type: (Optional[FallbackIntentSensitivityLevelV1]) -> None + # type: (Optional[FallbackIntentSensitivityLevel_f253866b]) -> None """Denotes skill's sensitivity for out-of-domain utterances. :param level: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/fallback_intent_sensitivity_level.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/fallback_intent_sensitivity_level.py index 0e3dc9a1..cffc5194 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/fallback_intent_sensitivity_level.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/fallback_intent_sensitivity_level.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class FallbackIntentSensitivityLevel(Enum): LOW = "LOW" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, FallbackIntentSensitivityLevel): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/has_entity_resolution_match.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/has_entity_resolution_match.py index 37741a30..f052bc5f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/has_entity_resolution_match.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/has_entity_resolution_match.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/inline_value_supplier.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/inline_value_supplier.py index dea5e9ea..01505e35 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/inline_value_supplier.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/inline_value_supplier.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.type_value import TypeValueV1 + from ask_smapi_model.v1.skill.interaction_model.type_value import TypeValue as TypeValue_6d4bbead class InlineValueSupplier(ValueSupplier): @@ -48,7 +48,7 @@ class InlineValueSupplier(ValueSupplier): supports_multiple_types = False def __init__(self, values=None): - # type: (Optional[List[TypeValueV1]]) -> None + # type: (Optional[List[TypeValue_6d4bbead]]) -> None """Supplies inline slot type values. :param values: The list of slot type values. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/intent.py index 12948f70..40f4f73d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/intent.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/intent.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.slot_definition import SlotDefinitionV1 + from ask_smapi_model.v1.skill.interaction_model.slot_definition import SlotDefinition as SlotDefinition_fa94ac3 class Intent(object): @@ -33,6 +33,8 @@ class Intent(object): :param name: Name to identify the intent. :type name: (optional) str + :param generated_by: Name of the generator used to generate this object. + :type generated_by: (optional) str :param slots: List of slots within the intent. :type slots: (optional) list[ask_smapi_model.v1.skill.interaction_model.slot_definition.SlotDefinition] :param samples: Phrases the user can speak e.g. to trigger an intent or provide value for a slot elicitation. @@ -41,23 +43,27 @@ class Intent(object): """ deserialized_types = { 'name': 'str', + 'generated_by': 'str', 'slots': 'list[ask_smapi_model.v1.skill.interaction_model.slot_definition.SlotDefinition]', 'samples': 'list[str]' } # type: Dict attribute_map = { 'name': 'name', + 'generated_by': 'generatedBy', 'slots': 'slots', 'samples': 'samples' } # type: Dict supports_multiple_types = False - def __init__(self, name=None, slots=None, samples=None): - # type: (Optional[str], Optional[List[SlotDefinitionV1]], Optional[List[object]]) -> None + def __init__(self, name=None, generated_by=None, slots=None, samples=None): + # type: (Optional[str], Optional[str], Optional[List[SlotDefinition_fa94ac3]], Optional[List[object]]) -> None """The set of intents your service can accept and process. :param name: Name to identify the intent. :type name: (optional) str + :param generated_by: Name of the generator used to generate this object. + :type generated_by: (optional) str :param slots: List of slots within the intent. :type slots: (optional) list[ask_smapi_model.v1.skill.interaction_model.slot_definition.SlotDefinition] :param samples: Phrases the user can speak e.g. to trigger an intent or provide value for a slot elicitation. @@ -66,6 +72,7 @@ def __init__(self, name=None, slots=None, samples=None): self.__discriminator_value = None # type: str self.name = name + self.generated_by = generated_by self.slots = slots self.samples = samples diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_data.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_data.py index f4ad364f..e3ab486a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_data.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_data.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.interaction_model_schema import InteractionModelSchemaV1 + from ask_smapi_model.v1.skill.interaction_model.interaction_model_schema import InteractionModelSchema as InteractionModelSchema_63fd76ca class InteractionModelData(object): @@ -51,7 +51,7 @@ class InteractionModelData(object): supports_multiple_types = False def __init__(self, version=None, description=None, interaction_model=None): - # type: (Optional[str], Optional[str], Optional[InteractionModelSchemaV1]) -> None + # type: (Optional[str], Optional[str], Optional[InteractionModelSchema_63fd76ca]) -> None """ :param version: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_schema.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_schema.py index a409a0b1..1714b9ab 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_schema.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_schema.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.dialog import DialogV1 - from ask_smapi_model.v1.skill.interaction_model.language_model import LanguageModelV1 - from ask_smapi_model.v1.skill.interaction_model.prompt import PromptV1 + from ask_smapi_model.v1.skill.interaction_model.dialog import Dialog as Dialog_57cb7416 + from ask_smapi_model.v1.skill.interaction_model.language_model import LanguageModel as LanguageModel_70c320dd + from ask_smapi_model.v1.skill.interaction_model.prompt import Prompt as Prompt_d3acdc96 class InteractionModelSchema(object): @@ -53,7 +53,7 @@ class InteractionModelSchema(object): supports_multiple_types = False def __init__(self, language_model=None, dialog=None, prompts=None): - # type: (Optional[LanguageModelV1], Optional[DialogV1], Optional[List[PromptV1]]) -> None + # type: (Optional[LanguageModel_70c320dd], Optional[Dialog_57cb7416], Optional[List[Prompt_d3acdc96]]) -> None """ :param language_model: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_greater_than.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_greater_than.py index cc5e4690..c87c15d3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_greater_than.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_greater_than.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_greater_than_or_equal_to.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_greater_than_or_equal_to.py index 18338742..3fda417f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_greater_than_or_equal_to.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_greater_than_or_equal_to.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_duration.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_duration.py index 4df83b7b..276bb4bd 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_duration.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_duration.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_set.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_set.py index cc449ccb..efaf16b9 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_set.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_set.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_less_than.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_less_than.py index 2486309c..e0b702e8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_less_than.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_less_than.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_less_than_or_equal_to.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_less_than_or_equal_to.py index 63adb510..05064b89 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_less_than_or_equal_to.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_less_than_or_equal_to.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_duration.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_duration.py index 26405c62..883981db 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_duration.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_duration.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_set.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_set.py index 43ab3fac..e2c136b8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_set.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_set.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/__init__.py new file mode 100644 index 00000000..fcf2dc62 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/__init__.py @@ -0,0 +1,39 @@ +# 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. +# +from __future__ import absolute_import + +from .create_job_definition_response import CreateJobDefinitionResponse +from .validation_errors import ValidationErrors +from .slot_type_reference import SlotTypeReference +from .reference_version_update import ReferenceVersionUpdate +from .create_job_definition_request import CreateJobDefinitionRequest +from .update_job_status_request import UpdateJobStatusRequest +from .execution_metadata import ExecutionMetadata +from .list_job_definitions_response import ListJobDefinitionsResponse +from .get_executions_response import GetExecutionsResponse +from .referenced_resource_jobs_complete import ReferencedResourceJobsComplete +from .catalog_auto_refresh import CatalogAutoRefresh +from .resource_object import ResourceObject +from .job_error_details import JobErrorDetails +from .catalog import Catalog +from .execution import Execution +from .job_definition import JobDefinition +from .job_api_pagination_context import JobAPIPaginationContext +from .interaction_model import InteractionModel +from .job_definition_metadata import JobDefinitionMetadata +from .scheduled import Scheduled +from .dynamic_update_error import DynamicUpdateError +from .job_definition_status import JobDefinitionStatus +from .trigger import Trigger diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/catalog.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/catalog.py new file mode 100644 index 00000000..99a534c2 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/catalog.py @@ -0,0 +1,113 @@ +# 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_smapi_model.v1.skill.interaction_model.jobs.resource_object import ResourceObject + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Catalog(ResourceObject): + """ + Catalog the job is applied on. + + + :param id: Catalog identifier. + :type id: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'id': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'id': 'id' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None): + # type: (Optional[str]) -> None + """Catalog the job is applied on. + + :param id: Catalog identifier. + :type id: (optional) str + """ + self.__discriminator_value = "Catalog" # type: str + + self.object_type = self.__discriminator_value + super(Catalog, self).__init__(object_type=self.__discriminator_value) + self.id = 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, Catalog): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/catalog_auto_refresh.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/catalog_auto_refresh.py new file mode 100644 index 00000000..a6cfc1b0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/catalog_auto_refresh.py @@ -0,0 +1,128 @@ +# 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_smapi_model.v1.skill.interaction_model.jobs.job_definition import JobDefinition + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.jobs.catalog import Catalog as Catalog_5d01e944 + from ask_smapi_model.v1.skill.interaction_model.jobs.scheduled import Scheduled as Scheduled_efc5aac + + +class CatalogAutoRefresh(JobDefinition): + """ + Definition for CatalogAutoRefresh job. + + + :param trigger: CatalogAutoRefresh can only have CatalogAutoRefresh trigger. + :type trigger: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.scheduled.Scheduled + :param status: Current status of the job definition. + :type status: (optional) str + :param resource: The resource that the job is act on. Only catalog is allowed. + :type resource: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.catalog.Catalog + + """ + deserialized_types = { + 'object_type': 'str', + 'trigger': 'ask_smapi_model.v1.skill.interaction_model.jobs.scheduled.Scheduled', + 'status': 'str', + 'resource': 'ask_smapi_model.v1.skill.interaction_model.jobs.catalog.Catalog' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'trigger': 'trigger', + 'status': 'status', + 'resource': 'resource' + } # type: Dict + supports_multiple_types = False + + def __init__(self, trigger=None, status=None, resource=None): + # type: (Optional[Scheduled_efc5aac], Optional[str], Optional[Catalog_5d01e944]) -> None + """Definition for CatalogAutoRefresh job. + + :param trigger: CatalogAutoRefresh can only have CatalogAutoRefresh trigger. + :type trigger: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.scheduled.Scheduled + :param status: Current status of the job definition. + :type status: (optional) str + :param resource: The resource that the job is act on. Only catalog is allowed. + :type resource: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.catalog.Catalog + """ + self.__discriminator_value = "CatalogAutoRefresh" # type: str + + self.object_type = self.__discriminator_value + super(CatalogAutoRefresh, self).__init__(object_type=self.__discriminator_value, trigger=trigger, status=status) + self.trigger = trigger + self.resource = resource + + 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, CatalogAutoRefresh): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/create_job_definition_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/create_job_definition_request.py new file mode 100644 index 00000000..fa94b01c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/create_job_definition_request.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.jobs.job_definition import JobDefinition as JobDefinition_ee5db797 + + +class CreateJobDefinitionRequest(object): + """ + Request to create job definitions. + + + :param vendor_id: ID of the vendor owning the skill. + :type vendor_id: (optional) str + :param job_definition: + :type job_definition: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_definition.JobDefinition + + """ + deserialized_types = { + 'vendor_id': 'str', + 'job_definition': 'ask_smapi_model.v1.skill.interaction_model.jobs.job_definition.JobDefinition' + } # type: Dict + + attribute_map = { + 'vendor_id': 'vendorId', + 'job_definition': 'jobDefinition' + } # type: Dict + supports_multiple_types = False + + def __init__(self, vendor_id=None, job_definition=None): + # type: (Optional[str], Optional[JobDefinition_ee5db797]) -> None + """Request to create job definitions. + + :param vendor_id: ID of the vendor owning the skill. + :type vendor_id: (optional) str + :param job_definition: + :type job_definition: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_definition.JobDefinition + """ + self.__discriminator_value = None # type: str + + self.vendor_id = vendor_id + self.job_definition = job_definition + + 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, CreateJobDefinitionRequest): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/create_job_definition_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/create_job_definition_response.py new file mode 100644 index 00000000..6d0f2b1a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/create_job_definition_response.py @@ -0,0 +1,108 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class CreateJobDefinitionResponse(object): + """ + The response of create job definition. + + + :param job_id: Idenitifier of the job definition. + :type job_id: (optional) str + + """ + deserialized_types = { + 'job_id': 'str' + } # type: Dict + + attribute_map = { + 'job_id': 'jobId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, job_id=None): + # type: (Optional[str]) -> None + """The response of create job definition. + + :param job_id: Idenitifier of the job definition. + :type job_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.job_id = job_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, CreateJobDefinitionResponse): + 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/error_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/dynamic_update_error.py similarity index 78% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/error_object.py rename to ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/dynamic_update_error.py index 50282b66..288363b5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/error_object.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/dynamic_update_error.py @@ -21,45 +21,45 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class ErrorObject(object): +class DynamicUpdateError(object): """ - Object containing information about the error occurred during an evaluation run. This filed would present if an unexpected error occurred during an evaluatin run. + Error schema for dynamic update. - :param message: human-readable error message - :type message: (optional) str - :param code: machine-readable error code + :param code: Dynamic update error code. :type code: (optional) str + :param message: Readable description of error. + :type message: (optional) str """ deserialized_types = { - 'message': 'str', - 'code': 'str' + 'code': 'str', + 'message': 'str' } # type: Dict attribute_map = { - 'message': 'message', - 'code': 'code' + 'code': 'code', + 'message': 'message' } # type: Dict supports_multiple_types = False - def __init__(self, message=None, code=None): + def __init__(self, code=None, message=None): # type: (Optional[str], Optional[str]) -> None - """Object containing information about the error occurred during an evaluation run. This filed would present if an unexpected error occurred during an evaluatin run. + """Error schema for dynamic update. - :param message: human-readable error message - :type message: (optional) str - :param code: machine-readable error code + :param code: Dynamic update error code. :type code: (optional) str + :param message: Readable description of error. + :type message: (optional) str """ self.__discriminator_value = None # type: str - self.message = message self.code = code + self.message = message def to_dict(self): # type: () -> Dict[str, object] @@ -104,7 +104,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, ErrorObject): + if not isinstance(other, DynamicUpdateError): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/execution.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/execution.py new file mode 100644 index 00000000..251bcb4f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/execution.py @@ -0,0 +1,137 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.jobs.job_error_details import JobErrorDetails as JobErrorDetails_b4176392 + + +class Execution(object): + """ + Execution data. + + + :param execution_id: Identifier of the execution. + :type execution_id: (optional) str + :param timestamp: ISO date-time timestamp when the execution starts. + :type timestamp: (optional) datetime + :param error_code: ErrorCode to explain what went wrong in case of FAILUREs. + :type error_code: (optional) str + :param status: Current status of the job execution. + :type status: (optional) str + :param error_details: + :type error_details: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_error_details.JobErrorDetails + + """ + deserialized_types = { + 'execution_id': 'str', + 'timestamp': 'datetime', + 'error_code': 'str', + 'status': 'str', + 'error_details': 'ask_smapi_model.v1.skill.interaction_model.jobs.job_error_details.JobErrorDetails' + } # type: Dict + + attribute_map = { + 'execution_id': 'executionId', + 'timestamp': 'timestamp', + 'error_code': 'errorCode', + 'status': 'status', + 'error_details': 'errorDetails' + } # type: Dict + supports_multiple_types = False + + def __init__(self, execution_id=None, timestamp=None, error_code=None, status=None, error_details=None): + # type: (Optional[str], Optional[datetime], Optional[str], Optional[str], Optional[JobErrorDetails_b4176392]) -> None + """Execution data. + + :param execution_id: Identifier of the execution. + :type execution_id: (optional) str + :param timestamp: ISO date-time timestamp when the execution starts. + :type timestamp: (optional) datetime + :param error_code: ErrorCode to explain what went wrong in case of FAILUREs. + :type error_code: (optional) str + :param status: Current status of the job execution. + :type status: (optional) str + :param error_details: + :type error_details: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_error_details.JobErrorDetails + """ + self.__discriminator_value = None # type: str + + self.execution_id = execution_id + self.timestamp = timestamp + self.error_code = error_code + self.status = status + self.error_details = error_details + + 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, Execution): + 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/post_asr_evaluations_request_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/execution_metadata.py similarity index 68% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/post_asr_evaluations_request_object.py rename to ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/execution_metadata.py index e34661ed..6b6d1a0d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/post_asr_evaluations_request_object.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/execution_metadata.py @@ -21,44 +21,52 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.asr.evaluations.skill import SkillV1 -class PostAsrEvaluationsRequestObject(object): +class ExecutionMetadata(object): """ + ExecutionMetadata for executions. - :param skill: - :type skill: (optional) ask_smapi_model.v1.skill.asr.evaluations.skill.Skill - :param annotation_set_id: ID for annotation set - :type annotation_set_id: (optional) str + + :param job_id: Identifier of the job. + :type job_id: (optional) str + :param error_code: ErrorCode to explain what went wrong in case of FAILUREs. + :type error_code: (optional) str + :param status: Current status of the job execution. + :type status: (optional) str """ deserialized_types = { - 'skill': 'ask_smapi_model.v1.skill.asr.evaluations.skill.Skill', - 'annotation_set_id': 'str' + 'job_id': 'str', + 'error_code': 'str', + 'status': 'str' } # type: Dict attribute_map = { - 'skill': 'skill', - 'annotation_set_id': 'annotationSetId' + 'job_id': 'jobId', + 'error_code': 'errorCode', + 'status': 'status' } # type: Dict supports_multiple_types = False - def __init__(self, skill=None, annotation_set_id=None): - # type: (Optional[SkillV1], Optional[str]) -> None - """ + def __init__(self, job_id=None, error_code=None, status=None): + # type: (Optional[str], Optional[str], Optional[str]) -> None + """ExecutionMetadata for executions. - :param skill: - :type skill: (optional) ask_smapi_model.v1.skill.asr.evaluations.skill.Skill - :param annotation_set_id: ID for annotation set - :type annotation_set_id: (optional) str + :param job_id: Identifier of the job. + :type job_id: (optional) str + :param error_code: ErrorCode to explain what went wrong in case of FAILUREs. + :type error_code: (optional) str + :param status: Current status of the job execution. + :type status: (optional) str """ self.__discriminator_value = None # type: str - self.skill = skill - self.annotation_set_id = annotation_set_id + self.job_id = job_id + self.error_code = error_code + self.status = status def to_dict(self): # type: () -> Dict[str, object] @@ -103,7 +111,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, PostAsrEvaluationsRequestObject): + if not isinstance(other, ExecutionMetadata): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/paged_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/get_executions_response.py similarity index 68% rename from ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/paged_response.py rename to ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/get_executions_response.py index e107c0d8..77fadf0c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/paged_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/get_executions_response.py @@ -21,45 +21,55 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.conflict_detection.pagination_context import PaginationContextV1 - from ask_smapi_model.v1.links import LinksV1 + from ask_smapi_model.v1.skill.interaction_model.jobs.job_api_pagination_context import JobAPIPaginationContext as JobAPIPaginationContext_8ba512fb + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.skill.interaction_model.jobs.execution import Execution as Execution_6b1925c2 -class PagedResponse(object): +class GetExecutionsResponse(object): """ + The response of get execution history. + :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.interaction_model.conflict_detection.pagination_context.PaginationContext + :type pagination_context: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_api_pagination_context.JobAPIPaginationContext :param links: :type links: (optional) ask_smapi_model.v1.links.Links + :param executions: + :type executions: (optional) list[ask_smapi_model.v1.skill.interaction_model.jobs.execution.Execution] """ deserialized_types = { - 'pagination_context': 'ask_smapi_model.v1.skill.interaction_model.conflict_detection.pagination_context.PaginationContext', - 'links': 'ask_smapi_model.v1.links.Links' + 'pagination_context': 'ask_smapi_model.v1.skill.interaction_model.jobs.job_api_pagination_context.JobAPIPaginationContext', + 'links': 'ask_smapi_model.v1.links.Links', + 'executions': 'list[ask_smapi_model.v1.skill.interaction_model.jobs.execution.Execution]' } # type: Dict attribute_map = { 'pagination_context': 'paginationContext', - 'links': '_links' + 'links': '_links', + 'executions': 'executions' } # type: Dict supports_multiple_types = False - def __init__(self, pagination_context=None, links=None): - # type: (Optional[PaginationContextV1], Optional[LinksV1]) -> None - """ + def __init__(self, pagination_context=None, links=None, executions=None): + # type: (Optional[JobAPIPaginationContext_8ba512fb], Optional[Links_bc43467b], Optional[List[Execution_6b1925c2]]) -> None + """The response of get execution history. :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.interaction_model.conflict_detection.pagination_context.PaginationContext + :type pagination_context: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_api_pagination_context.JobAPIPaginationContext :param links: :type links: (optional) ask_smapi_model.v1.links.Links + :param executions: + :type executions: (optional) list[ask_smapi_model.v1.skill.interaction_model.jobs.execution.Execution] """ self.__discriminator_value = None # type: str self.pagination_context = pagination_context self.links = links + self.executions = executions def to_dict(self): # type: () -> Dict[str, object] @@ -104,7 +114,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, PagedResponse): + if not isinstance(other, GetExecutionsResponse): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/interaction_model.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/interaction_model.py new file mode 100644 index 00000000..1b5cbfab --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/interaction_model.py @@ -0,0 +1,120 @@ +# 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_smapi_model.v1.skill.interaction_model.jobs.resource_object import ResourceObject + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class InteractionModel(ResourceObject): + """ + Interaction model the job is applied on. + + + :param id: Skill identifier. + :type id: (optional) str + :param locales: Locale identifier and default is empty list which means all available locales. + :type locales: (optional) list[str] + + """ + deserialized_types = { + 'object_type': 'str', + 'id': 'str', + 'locales': 'list[str]' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'id': 'id', + 'locales': 'locales' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None, locales=None): + # type: (Optional[str], Optional[List[object]]) -> None + """Interaction model the job is applied on. + + :param id: Skill identifier. + :type id: (optional) str + :param locales: Locale identifier and default is empty list which means all available locales. + :type locales: (optional) list[str] + """ + self.__discriminator_value = "InteractionModel" # type: str + + self.object_type = self.__discriminator_value + super(InteractionModel, self).__init__(object_type=self.__discriminator_value) + self.id = id + self.locales = locales + + 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, InteractionModel): + 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-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/post_asr_evaluations_response_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_api_pagination_context.py similarity index 85% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/post_asr_evaluations_response_object.py rename to ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_api_pagination_context.py index e6d65281..a442985b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/post_asr_evaluations_response_object.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_api_pagination_context.py @@ -21,36 +21,36 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class PostAsrEvaluationsResponseObject(object): +class JobAPIPaginationContext(object): """ - :param id: ID used to retrieve the evaluation status/results later. - :type id: (optional) str + :param next_token: + :type next_token: (optional) str """ deserialized_types = { - 'id': 'str' + 'next_token': 'str' } # type: Dict attribute_map = { - 'id': 'id' + 'next_token': 'nextToken' } # type: Dict supports_multiple_types = False - def __init__(self, id=None): + def __init__(self, next_token=None): # type: (Optional[str]) -> None """ - :param id: ID used to retrieve the evaluation status/results later. - :type id: (optional) str + :param next_token: + :type next_token: (optional) str """ self.__discriminator_value = None # type: str - self.id = id + self.next_token = next_token def to_dict(self): # type: () -> Dict[str, object] @@ -95,7 +95,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, PostAsrEvaluationsResponseObject): + if not isinstance(other, JobAPIPaginationContext): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_definition.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_definition.py new file mode 100644 index 00000000..7c215cc0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_definition.py @@ -0,0 +1,150 @@ +# 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 abc import ABCMeta, abstractmethod + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.jobs.trigger import Trigger as Trigger_ce25c582 + + +class JobDefinition(object): + """ + Definition for dynamic job. + + + :param object_type: Polymorphic type of the job + :type object_type: (optional) str + :param trigger: + :type trigger: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.trigger.Trigger + :param status: Current status of the job definition. + :type status: (optional) str + + .. note:: + + This is an abstract class. Use the following mapping, to figure out + the model class to be instantiated, that sets ``type`` variable. + + | ReferenceVersionUpdate: :py:class:`ask_smapi_model.v1.skill.interaction_model.jobs.reference_version_update.ReferenceVersionUpdate`, + | + | CatalogAutoRefresh: :py:class:`ask_smapi_model.v1.skill.interaction_model.jobs.catalog_auto_refresh.CatalogAutoRefresh` + + """ + deserialized_types = { + 'object_type': 'str', + 'trigger': 'ask_smapi_model.v1.skill.interaction_model.jobs.trigger.Trigger', + 'status': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'trigger': 'trigger', + 'status': 'status' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'ReferenceVersionUpdate': 'ask_smapi_model.v1.skill.interaction_model.jobs.reference_version_update.ReferenceVersionUpdate', + 'CatalogAutoRefresh': 'ask_smapi_model.v1.skill.interaction_model.jobs.catalog_auto_refresh.CatalogAutoRefresh' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None, trigger=None, status=None): + # type: (Optional[str], Optional[Trigger_ce25c582], Optional[str]) -> None + """Definition for dynamic job. + + :param object_type: Polymorphic type of the job + :type object_type: (optional) str + :param trigger: + :type trigger: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.trigger.Trigger + :param status: Current status of the job definition. + :type status: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.trigger = trigger + self.status = status + + @classmethod + def get_real_child_model(cls, data): + # type: (Dict[str, str]) -> Optional[str] + """Returns the real base class specified by the discriminator""" + discriminator_value = data[cls.json_discriminator_key] + return cls.discriminator_value_class_map.get(discriminator_value) + + 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, JobDefinition): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/get_conflict_detection_job_status_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_definition_metadata.py similarity index 69% rename from ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/get_conflict_detection_job_status_response.py rename to ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_definition_metadata.py index a67498f1..1dc74de1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/get_conflict_detection_job_status_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_definition_metadata.py @@ -21,44 +21,53 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_detection_job_status import ConflictDetectionJobStatusV1 + from ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_status import JobDefinitionStatus as JobDefinitionStatus_2d026a70 -class GetConflictDetectionJobStatusResponse(object): +class JobDefinitionMetadata(object): """ + Metadata of the job definition. + + :param id: Job identifier. + :type id: (optional) str + :param object_type: Polymorphic type of the job. + :type object_type: (optional) str :param status: - :type status: (optional) ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_detection_job_status.ConflictDetectionJobStatus - :param total_conflicts: The total number of conflicts within skill model. - :type total_conflicts: (optional) float + :type status: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_status.JobDefinitionStatus """ deserialized_types = { - 'status': 'ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_detection_job_status.ConflictDetectionJobStatus', - 'total_conflicts': 'float' + 'id': 'str', + 'object_type': 'str', + 'status': 'ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_status.JobDefinitionStatus' } # type: Dict attribute_map = { - 'status': 'status', - 'total_conflicts': 'totalConflicts' + 'id': 'id', + 'object_type': 'type', + 'status': 'status' } # type: Dict supports_multiple_types = False - def __init__(self, status=None, total_conflicts=None): - # type: (Optional[ConflictDetectionJobStatusV1], Optional[float]) -> None - """ + def __init__(self, id=None, object_type=None, status=None): + # type: (Optional[str], Optional[str], Optional[JobDefinitionStatus_2d026a70]) -> None + """Metadata of the job definition. + :param id: Job identifier. + :type id: (optional) str + :param object_type: Polymorphic type of the job. + :type object_type: (optional) str :param status: - :type status: (optional) ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_detection_job_status.ConflictDetectionJobStatus - :param total_conflicts: The total number of conflicts within skill model. - :type total_conflicts: (optional) float + :type status: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_status.JobDefinitionStatus """ self.__discriminator_value = None # type: str + self.id = id + self.object_type = object_type self.status = status - self.total_conflicts = total_conflicts def to_dict(self): # type: () -> Dict[str, object] @@ -103,7 +112,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, GetConflictDetectionJobStatusResponse): + if not isinstance(other, JobDefinitionMetadata): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_definition_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_definition_status.py new file mode 100644 index 00000000..1a8f8a18 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_definition_status.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class JobDefinitionStatus(Enum): + """ + Current status of the job definition. + + + + Allowed enum values: [DISABLED, ENALBED] + """ + DISABLED = "DISABLED" + ENALBED = "ENALBED" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, JobDefinitionStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_error_details.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_error_details.py new file mode 100644 index 00000000..75abb8a5 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/job_error_details.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.jobs.execution_metadata import ExecutionMetadata as ExecutionMetadata_cbbdc8af + + +class JobErrorDetails(object): + """ + Optional details if the execution is depending on other executions. + + + :param execution_metadata: + :type execution_metadata: (optional) list[ask_smapi_model.v1.skill.interaction_model.jobs.execution_metadata.ExecutionMetadata] + + """ + deserialized_types = { + 'execution_metadata': 'list[ask_smapi_model.v1.skill.interaction_model.jobs.execution_metadata.ExecutionMetadata]' + } # type: Dict + + attribute_map = { + 'execution_metadata': 'executionMetadata' + } # type: Dict + supports_multiple_types = False + + def __init__(self, execution_metadata=None): + # type: (Optional[List[ExecutionMetadata_cbbdc8af]]) -> None + """Optional details if the execution is depending on other executions. + + :param execution_metadata: + :type execution_metadata: (optional) list[ask_smapi_model.v1.skill.interaction_model.jobs.execution_metadata.ExecutionMetadata] + """ + self.__discriminator_value = None # type: str + + self.execution_metadata = execution_metadata + + 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, JobErrorDetails): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/get_conflicts_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/list_job_definitions_response.py similarity index 66% rename from ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/get_conflicts_response.py rename to ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/list_job_definitions_response.py index cf4ad9a1..aaae1741 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/get_conflicts_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/list_job_definitions_response.py @@ -18,48 +18,58 @@ import six import typing from enum import Enum -from ask_smapi_model.v1.skill.interaction_model.conflict_detection.paged_response import PagedResponse if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.conflict_detection.pagination_context import PaginationContextV1 - from ask_smapi_model.v1.links import LinksV1 + from ask_smapi_model.v1.skill.interaction_model.jobs.job_api_pagination_context import JobAPIPaginationContext as JobAPIPaginationContext_8ba512fb + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_metadata import JobDefinitionMetadata as JobDefinitionMetadata_c4abc32a -class GetConflictsResponse(PagedResponse): +class ListJobDefinitionsResponse(object): """ + The response of list job definitions. + :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.interaction_model.conflict_detection.pagination_context.PaginationContext + :type pagination_context: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_api_pagination_context.JobAPIPaginationContext :param links: :type links: (optional) ask_smapi_model.v1.links.Links + :param jobs: + :type jobs: (optional) list[ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_metadata.JobDefinitionMetadata] """ deserialized_types = { - 'pagination_context': 'ask_smapi_model.v1.skill.interaction_model.conflict_detection.pagination_context.PaginationContext', - 'links': 'ask_smapi_model.v1.links.Links' + 'pagination_context': 'ask_smapi_model.v1.skill.interaction_model.jobs.job_api_pagination_context.JobAPIPaginationContext', + 'links': 'ask_smapi_model.v1.links.Links', + 'jobs': 'list[ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_metadata.JobDefinitionMetadata]' } # type: Dict attribute_map = { 'pagination_context': 'paginationContext', - 'links': '_links' + 'links': '_links', + 'jobs': 'jobs' } # type: Dict supports_multiple_types = False - def __init__(self, pagination_context=None, links=None): - # type: (Optional[PaginationContextV1], Optional[LinksV1]) -> None - """ + def __init__(self, pagination_context=None, links=None, jobs=None): + # type: (Optional[JobAPIPaginationContext_8ba512fb], Optional[Links_bc43467b], Optional[List[JobDefinitionMetadata_c4abc32a]]) -> None + """The response of list job definitions. :param pagination_context: - :type pagination_context: (optional) ask_smapi_model.v1.skill.interaction_model.conflict_detection.pagination_context.PaginationContext + :type pagination_context: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_api_pagination_context.JobAPIPaginationContext :param links: :type links: (optional) ask_smapi_model.v1.links.Links + :param jobs: + :type jobs: (optional) list[ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_metadata.JobDefinitionMetadata] """ self.__discriminator_value = None # type: str - super(GetConflictsResponse, self).__init__(pagination_context=pagination_context, links=links) + self.pagination_context = pagination_context + self.links = links + self.jobs = jobs def to_dict(self): # type: () -> Dict[str, object] @@ -104,7 +114,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, GetConflictsResponse): + if not isinstance(other, ListJobDefinitionsResponse): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/reference_version_update.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/reference_version_update.py new file mode 100644 index 00000000..b5946ed0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/reference_version_update.py @@ -0,0 +1,142 @@ +# 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_smapi_model.v1.skill.interaction_model.jobs.job_definition import JobDefinition + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.jobs.resource_object import ResourceObject as ResourceObject_91e8440b + from ask_smapi_model.v1.skill.interaction_model.jobs.referenced_resource_jobs_complete import ReferencedResourceJobsComplete as ReferencedResourceJobsComplete_fb43acad + + +class ReferenceVersionUpdate(JobDefinition): + """ + Definition for ReferenceVersionUpdate job. + + + :param trigger: Can only have ReferencedResourceJobsComplete trigger. + :type trigger: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.referenced_resource_jobs_complete.ReferencedResourceJobsComplete + :param status: Current status of the job definition. + :type status: (optional) str + :param resource: The resource that the job is act on. Only slot and interactionModel are allowed. + :type resource: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.resource_object.ResourceObject + :param references: Referenced resources working with ReferencedResourceJobsComplete trigger. + :type references: (optional) list[ask_smapi_model.v1.skill.interaction_model.jobs.resource_object.ResourceObject] + :param publish_to_live: Whether publish development stage to live after the updates. + :type publish_to_live: (optional) bool + + """ + deserialized_types = { + 'object_type': 'str', + 'trigger': 'ask_smapi_model.v1.skill.interaction_model.jobs.referenced_resource_jobs_complete.ReferencedResourceJobsComplete', + 'status': 'str', + 'resource': 'ask_smapi_model.v1.skill.interaction_model.jobs.resource_object.ResourceObject', + 'references': 'list[ask_smapi_model.v1.skill.interaction_model.jobs.resource_object.ResourceObject]', + 'publish_to_live': 'bool' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'trigger': 'trigger', + 'status': 'status', + 'resource': 'resource', + 'references': 'references', + 'publish_to_live': 'publishToLive' + } # type: Dict + supports_multiple_types = False + + def __init__(self, trigger=None, status=None, resource=None, references=None, publish_to_live=None): + # type: (Optional[ReferencedResourceJobsComplete_fb43acad], Optional[str], Optional[ResourceObject_91e8440b], Optional[List[ResourceObject_91e8440b]], Optional[bool]) -> None + """Definition for ReferenceVersionUpdate job. + + :param trigger: Can only have ReferencedResourceJobsComplete trigger. + :type trigger: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.referenced_resource_jobs_complete.ReferencedResourceJobsComplete + :param status: Current status of the job definition. + :type status: (optional) str + :param resource: The resource that the job is act on. Only slot and interactionModel are allowed. + :type resource: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.resource_object.ResourceObject + :param references: Referenced resources working with ReferencedResourceJobsComplete trigger. + :type references: (optional) list[ask_smapi_model.v1.skill.interaction_model.jobs.resource_object.ResourceObject] + :param publish_to_live: Whether publish development stage to live after the updates. + :type publish_to_live: (optional) bool + """ + self.__discriminator_value = "ReferenceVersionUpdate" # type: str + + self.object_type = self.__discriminator_value + super(ReferenceVersionUpdate, self).__init__(object_type=self.__discriminator_value, trigger=trigger, status=status) + self.trigger = trigger + self.resource = resource + self.references = references + self.publish_to_live = publish_to_live + + 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, ReferenceVersionUpdate): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/referenced_resource_jobs_complete.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/referenced_resource_jobs_complete.py new file mode 100644 index 00000000..b16491a6 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/referenced_resource_jobs_complete.py @@ -0,0 +1,106 @@ +# 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_smapi_model.v1.skill.interaction_model.jobs.trigger import Trigger + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ReferencedResourceJobsComplete(Trigger): + """ + Dependent job condition when jobs will be executed. + + + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """Dependent job condition when jobs will be executed. + + """ + self.__discriminator_value = "ReferencedResourceJobsComplete" # type: str + + self.object_type = self.__discriminator_value + super(ReferencedResourceJobsComplete, self).__init__(object_type=self.__discriminator_value) + + 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, ReferencedResourceJobsComplete): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/resource_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/resource_object.py new file mode 100644 index 00000000..bb8d7e38 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/resource_object.py @@ -0,0 +1,138 @@ +# 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 abc import ABCMeta, abstractmethod + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ResourceObject(object): + """ + Resource object where the job is applied on. + + + :param object_type: Polymorphic type of the ResourceObject. + :type object_type: (optional) str + + .. note:: + + This is an abstract class. Use the following mapping, to figure out + the model class to be instantiated, that sets ``type`` variable. + + | InteractionModel: :py:class:`ask_smapi_model.v1.skill.interaction_model.jobs.interaction_model.InteractionModel`, + | + | Catalog: :py:class:`ask_smapi_model.v1.skill.interaction_model.jobs.catalog.Catalog`, + | + | SlotTypeReference: :py:class:`ask_smapi_model.v1.skill.interaction_model.jobs.slot_type_reference.SlotTypeReference` + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'InteractionModel': 'ask_smapi_model.v1.skill.interaction_model.jobs.interaction_model.InteractionModel', + 'Catalog': 'ask_smapi_model.v1.skill.interaction_model.jobs.catalog.Catalog', + 'SlotTypeReference': 'ask_smapi_model.v1.skill.interaction_model.jobs.slot_type_reference.SlotTypeReference' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None): + # type: (Optional[str]) -> None + """Resource object where the job is applied on. + + :param object_type: Polymorphic type of the ResourceObject. + :type object_type: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + + @classmethod + def get_real_child_model(cls, data): + # type: (Dict[str, str]) -> Optional[str] + """Returns the real base class specified by the discriminator""" + discriminator_value = data[cls.json_discriminator_key] + return cls.discriminator_value_class_map.get(discriminator_value) + + 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, ResourceObject): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/scheduled.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/scheduled.py new file mode 100644 index 00000000..d546fbf3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/scheduled.py @@ -0,0 +1,120 @@ +# 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_smapi_model.v1.skill.interaction_model.jobs.trigger import Trigger + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Scheduled(Trigger): + """ + Time-based condition when jobs will be executed. + + + :param hour: The cron-like attribute in UTC time to describe the hour of the day and currently can only be 0,4,8,12,16,20. + :type hour: (optional) int + :param day_of_week: If not null, this means the scheudule is weekly. the cron-like attribute in UTC time to describe the day of the week (0-6). + :type day_of_week: (optional) int + + """ + deserialized_types = { + 'object_type': 'str', + 'hour': 'int', + 'day_of_week': 'int' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'hour': 'hour', + 'day_of_week': 'dayOfWeek' + } # type: Dict + supports_multiple_types = False + + def __init__(self, hour=None, day_of_week=None): + # type: (Optional[int], Optional[int]) -> None + """Time-based condition when jobs will be executed. + + :param hour: The cron-like attribute in UTC time to describe the hour of the day and currently can only be 0,4,8,12,16,20. + :type hour: (optional) int + :param day_of_week: If not null, this means the scheudule is weekly. the cron-like attribute in UTC time to describe the day of the week (0-6). + :type day_of_week: (optional) int + """ + self.__discriminator_value = "Scheduled" # type: str + + self.object_type = self.__discriminator_value + super(Scheduled, self).__init__(object_type=self.__discriminator_value) + self.hour = hour + self.day_of_week = day_of_week + + 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, Scheduled): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/slot_type_reference.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/slot_type_reference.py new file mode 100644 index 00000000..519e1bbe --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/slot_type_reference.py @@ -0,0 +1,113 @@ +# 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_smapi_model.v1.skill.interaction_model.jobs.resource_object import ResourceObject + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SlotTypeReference(ResourceObject): + """ + Slot type reference the job is applied on. + + + :param id: SlotTypeReference identifier. + :type id: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'id': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'id': 'id' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None): + # type: (Optional[str]) -> None + """Slot type reference the job is applied on. + + :param id: SlotTypeReference identifier. + :type id: (optional) str + """ + self.__discriminator_value = "SlotTypeReference" # type: str + + self.object_type = self.__discriminator_value + super(SlotTypeReference, self).__init__(object_type=self.__discriminator_value) + self.id = 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, SlotTypeReference): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/trigger.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/trigger.py new file mode 100644 index 00000000..d16d3b83 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/trigger.py @@ -0,0 +1,135 @@ +# 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 abc import ABCMeta, abstractmethod + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Trigger(object): + """ + Condition when jobs will be executed. + + + :param object_type: Polymorphic type of the trigger + :type object_type: (optional) str + + .. note:: + + This is an abstract class. Use the following mapping, to figure out + the model class to be instantiated, that sets ``type`` variable. + + | ReferencedResourceJobsComplete: :py:class:`ask_smapi_model.v1.skill.interaction_model.jobs.referenced_resource_jobs_complete.ReferencedResourceJobsComplete`, + | + | Scheduled: :py:class:`ask_smapi_model.v1.skill.interaction_model.jobs.scheduled.Scheduled` + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'ReferencedResourceJobsComplete': 'ask_smapi_model.v1.skill.interaction_model.jobs.referenced_resource_jobs_complete.ReferencedResourceJobsComplete', + 'Scheduled': 'ask_smapi_model.v1.skill.interaction_model.jobs.scheduled.Scheduled' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None): + # type: (Optional[str]) -> None + """Condition when jobs will be executed. + + :param object_type: Polymorphic type of the trigger + :type object_type: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + + @classmethod + def get_real_child_model(cls, data): + # type: (Dict[str, str]) -> Optional[str] + """Returns the real base class specified by the discriminator""" + discriminator_value = data[cls.json_discriminator_key] + return cls.discriminator_value_class_map.get(discriminator_value) + + 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, Trigger): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/update_job_status_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/update_job_status_request.py new file mode 100644 index 00000000..f1c692ba --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/update_job_status_request.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_status import JobDefinitionStatus as JobDefinitionStatus_2d026a70 + + +class UpdateJobStatusRequest(object): + """ + Update job status. + + + :param status: + :type status: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_status.JobDefinitionStatus + + """ + deserialized_types = { + 'status': 'ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_status.JobDefinitionStatus' + } # type: Dict + + attribute_map = { + 'status': 'status' + } # type: Dict + supports_multiple_types = False + + def __init__(self, status=None): + # type: (Optional[JobDefinitionStatus_2d026a70]) -> None + """Update job status. + + :param status: + :type status: (optional) ask_smapi_model.v1.skill.interaction_model.jobs.job_definition_status.JobDefinitionStatus + """ + self.__discriminator_value = None # type: str + + self.status = status + + 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, UpdateJobStatusRequest): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/validation_errors.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/validation_errors.py new file mode 100644 index 00000000..09fe96d8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/jobs/validation_errors.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.jobs.dynamic_update_error import DynamicUpdateError as DynamicUpdateError_da9be79c + + +class ValidationErrors(object): + """ + The list of errors. + + + :param errors: The list of errors. + :type errors: (optional) list[ask_smapi_model.v1.skill.interaction_model.jobs.dynamic_update_error.DynamicUpdateError] + + """ + deserialized_types = { + 'errors': 'list[ask_smapi_model.v1.skill.interaction_model.jobs.dynamic_update_error.DynamicUpdateError]' + } # type: Dict + + attribute_map = { + 'errors': 'errors' + } # type: Dict + supports_multiple_types = False + + def __init__(self, errors=None): + # type: (Optional[List[DynamicUpdateError_da9be79c]]) -> None + """The list of errors. + + :param errors: The list of errors. + :type errors: (optional) list[ask_smapi_model.v1.skill.interaction_model.jobs.dynamic_update_error.DynamicUpdateError] + """ + self.__discriminator_value = None # type: str + + self.errors = errors + + 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, ValidationErrors): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/language_model.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/language_model.py index fba4674d..68ebc6da 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/language_model.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/language_model.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.model_configuration import ModelConfigurationV1 - from ask_smapi_model.v1.skill.interaction_model.slot_type import SlotTypeV1 - from ask_smapi_model.v1.skill.interaction_model.intent import IntentV1 + from ask_smapi_model.v1.skill.interaction_model.intent import Intent as Intent_40cc0d96 + from ask_smapi_model.v1.skill.interaction_model.model_configuration import ModelConfiguration as ModelConfiguration_8fc09c73 + from ask_smapi_model.v1.skill.interaction_model.slot_type import SlotType as SlotType_4f0557e3 class LanguageModel(object): @@ -59,7 +59,7 @@ class LanguageModel(object): supports_multiple_types = False def __init__(self, invocation_name=None, types=None, intents=None, model_configuration=None): - # type: (Optional[str], Optional[List[SlotTypeV1]], Optional[List[IntentV1]], Optional[ModelConfigurationV1]) -> None + # type: (Optional[str], Optional[List[SlotType_4f0557e3]], Optional[List[Intent_40cc0d96]], Optional[ModelConfiguration_8fc09c73]) -> None """Define the language model. :param invocation_name: Invocation name of the skill. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_configuration.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_configuration.py index 8bfde1d6..f2856e5c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_configuration.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_configuration.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.fallback_intent_sensitivity import FallbackIntentSensitivityV1 + from ask_smapi_model.v1.skill.interaction_model.fallback_intent_sensitivity import FallbackIntentSensitivity as FallbackIntentSensitivity_b18daf14 class ModelConfiguration(object): @@ -45,7 +45,7 @@ class ModelConfiguration(object): supports_multiple_types = False def __init__(self, fallback_intent_sensitivity=None): - # type: (Optional[FallbackIntentSensitivityV1]) -> None + # type: (Optional[FallbackIntentSensitivity_b18daf14]) -> None """Global configurations applicable to a skill's model. :param fallback_intent_sensitivity: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/__init__.py index 8b8d324c..d5adbcb1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/__init__.py @@ -14,17 +14,17 @@ # from __future__ import absolute_import -from .slot_type_response import SlotTypeResponse -from .error import Error -from .warning import Warning +from .slot_type_status_type import SlotTypeStatusType from .slot_type_item import SlotTypeItem -from .slot_type_status import SlotTypeStatus -from .slot_type_update_definition import SlotTypeUpdateDefinition -from .slot_type_definition_output import SlotTypeDefinitionOutput from .update_request import UpdateRequest -from .last_update_request import LastUpdateRequest -from .slot_type_status_type import SlotTypeStatusType +from .slot_type_definition_output import SlotTypeDefinitionOutput +from .definition_data import DefinitionData +from .error import Error +from .warning import Warning from .slot_type_input import SlotTypeInput from .list_slot_type_response import ListSlotTypeResponse +from .slot_type_update_definition import SlotTypeUpdateDefinition +from .slot_type_status import SlotTypeStatus +from .last_update_request import LastUpdateRequest +from .slot_type_response import SlotTypeResponse from .slot_type_response_entity import SlotTypeResponseEntity -from .definition_data import DefinitionData diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/definition_data.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/definition_data.py index 702e16ce..73680479 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/definition_data.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/definition_data.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_input import SlotTypeInputV1 + from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_input import SlotTypeInput as SlotTypeInput_adfe084 class DefinitionData(object): @@ -49,7 +49,7 @@ class DefinitionData(object): supports_multiple_types = False def __init__(self, slot_type=None, vendor_id=None): - # type: (Optional[SlotTypeInputV1], Optional[str]) -> None + # type: (Optional[SlotTypeInput_adfe084], Optional[str]) -> None """Slot type request definitions. :param slot_type: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/error.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/error.py index bb77324f..c25fc899 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/error.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/last_update_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/last_update_request.py index 5eb65bb8..018974ac 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/last_update_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/last_update_request.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.model_type.error import ErrorV1 - from ask_smapi_model.v1.skill.interaction_model.model_type.warning import WarningV1 - from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_status_type import SlotTypeStatusTypeV1 + from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_status_type import SlotTypeStatusType as SlotTypeStatusType_7b04d795 + from ask_smapi_model.v1.skill.interaction_model.model_type.warning import Warning as Warning_e65df984 + from ask_smapi_model.v1.skill.interaction_model.model_type.error import Error as Error_bf6a85dc class LastUpdateRequest(object): @@ -59,7 +59,7 @@ class LastUpdateRequest(object): supports_multiple_types = False def __init__(self, status=None, version=None, errors=None, warnings=None): - # type: (Optional[SlotTypeStatusTypeV1], Optional[str], Optional[List[ErrorV1]], Optional[List[WarningV1]]) -> None + # type: (Optional[SlotTypeStatusType_7b04d795], Optional[str], Optional[List[Error_bf6a85dc]], Optional[List[Warning_e65df984]]) -> None """Contains attributes related to last modification request of a resource. :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/list_slot_type_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/list_slot_type_response.py index 85577db2..a118106a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/list_slot_type_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/list_slot_type_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_item import SlotTypeItemV1 - from ask_smapi_model.v1.links import LinksV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_item import SlotTypeItem as SlotTypeItem_2093a99c class ListSlotTypeResponse(object): @@ -54,7 +54,7 @@ class ListSlotTypeResponse(object): supports_multiple_types = False def __init__(self, links=None, slot_types=None, next_token=None): - # type: (Optional[LinksV1], Optional[List[SlotTypeItemV1]], Optional[str]) -> None + # type: (Optional[Links_bc43467b], Optional[List[SlotTypeItem_2093a99c]], Optional[str]) -> None """List of slot types of a skill for the vendor. :param links: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_definition_output.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_definition_output.py index 5a60b842..6c7c52ce 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_definition_output.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_definition_output.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_input import SlotTypeInputV1 + from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_input import SlotTypeInput as SlotTypeInput_adfe084 class SlotTypeDefinitionOutput(object): @@ -49,7 +49,7 @@ class SlotTypeDefinitionOutput(object): supports_multiple_types = False def __init__(self, slot_type=None, total_versions=None): - # type: (Optional[SlotTypeInputV1], Optional[str]) -> None + # type: (Optional[SlotTypeInput_adfe084], Optional[str]) -> None """Slot Type request definitions. :param slot_type: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_input.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_input.py index 400598b9..ce92e99a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_input.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_input.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_item.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_item.py index 6da0585d..259d4713 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_item.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_item.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b class SlotTypeItem(object): @@ -57,7 +57,7 @@ class SlotTypeItem(object): supports_multiple_types = False def __init__(self, name=None, description=None, id=None, links=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[LinksV1]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[Links_bc43467b]) -> None """Definition for slot type entity. :param name: Name of the slot type. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_response.py index ff57ac37..5844639e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_response_entity import SlotTypeResponseEntityV1 + from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_response_entity import SlotTypeResponseEntity as SlotTypeResponseEntity_31d87d3 class SlotTypeResponse(object): @@ -45,7 +45,7 @@ class SlotTypeResponse(object): supports_multiple_types = False def __init__(self, slot_type=None): - # type: (Optional[SlotTypeResponseEntityV1]) -> None + # type: (Optional[SlotTypeResponseEntity_31d87d3]) -> None """Slot Type information. :param slot_type: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_response_entity.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_response_entity.py index d9bd8b52..39e444d0 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_response_entity.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_response_entity.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_status.py index db1650a2..c792947a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.model_type.last_update_request import LastUpdateRequestV1 + from ask_smapi_model.v1.skill.interaction_model.model_type.last_update_request import LastUpdateRequest as LastUpdateRequest_a39ac03e class SlotTypeStatus(object): @@ -45,7 +45,7 @@ class SlotTypeStatus(object): supports_multiple_types = False def __init__(self, update_request=None): - # type: (Optional[LastUpdateRequestV1]) -> None + # type: (Optional[LastUpdateRequest_a39ac03e]) -> None """Defines the structure for slot type status response. :param update_request: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_status_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_status_type.py index 52213c0a..90a91de4 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_status_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_status_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class SlotTypeStatusType(Enum): SUCCEEDED = "SUCCEEDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SlotTypeStatusType): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_update_definition.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_update_definition.py index 842a7732..0efa5c9f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_update_definition.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/slot_type_update_definition.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/update_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/update_request.py index 1bbe36c4..a7fa69de 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/update_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/update_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_update_definition import SlotTypeUpdateDefinitionV1 + from ask_smapi_model.v1.skill.interaction_model.model_type.slot_type_update_definition import SlotTypeUpdateDefinition as SlotTypeUpdateDefinition_cc57d523 class UpdateRequest(object): @@ -45,7 +45,7 @@ class UpdateRequest(object): supports_multiple_types = False def __init__(self, slot_type=None): - # type: (Optional[SlotTypeUpdateDefinitionV1]) -> None + # type: (Optional[SlotTypeUpdateDefinition_cc57d523]) -> None """Slot type update request object. :param slot_type: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/warning.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/warning.py index c3d19ced..ea32b3e0 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/warning.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/model_type/warning.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/multiple_values_config.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/multiple_values_config.py index cee503cd..d56aa72b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/multiple_values_config.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/multiple_values_config.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt.py index 3a951466..a9c9f270 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.prompt_items import PromptItemsV1 + from ask_smapi_model.v1.skill.interaction_model.prompt_items import PromptItems as PromptItems_cab2750b class Prompt(object): @@ -47,7 +47,7 @@ class Prompt(object): supports_multiple_types = False def __init__(self, id=None, variations=None): - # type: (Optional[str], Optional[List[PromptItemsV1]]) -> None + # type: (Optional[str], Optional[List[PromptItems_cab2750b]]) -> None """ :param id: The prompt id, this id can be used from dialog definitions. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items.py index 5aee0802..53b4edf2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.prompt_items_type import PromptItemsTypeV1 + from ask_smapi_model.v1.skill.interaction_model.prompt_items_type import PromptItemsType as PromptItemsType_ab40ad64 class PromptItems(object): @@ -47,7 +47,7 @@ class PromptItems(object): supports_multiple_types = False def __init__(self, object_type=None, value=None): - # type: (Optional[PromptItemsTypeV1], Optional[str]) -> None + # type: (Optional[PromptItemsType_ab40ad64], Optional[str]) -> None """ :param object_type: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items_type.py index 96ef7148..c9008e32 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PromptItemsType(Enum): PlainText = "PlainText" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PromptItemsType): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_definition.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_definition.py index a57277d6..a5e920f3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_definition.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_definition.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.multiple_values_config import MultipleValuesConfigV1 + from ask_smapi_model.v1.skill.interaction_model.multiple_values_config import MultipleValuesConfig as MultipleValuesConfig_83acc8ba class SlotDefinition(object): @@ -57,7 +57,7 @@ class SlotDefinition(object): supports_multiple_types = False def __init__(self, name=None, object_type=None, multiple_values=None, samples=None): - # type: (Optional[str], Optional[str], Optional[MultipleValuesConfigV1], Optional[List[object]]) -> None + # type: (Optional[str], Optional[str], Optional[MultipleValuesConfig_83acc8ba], Optional[List[object]]) -> None """Slot definition. :param name: The name of the slot. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_type.py index a19086f6..992e3bef 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_type.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.type_value import TypeValueV1 - from ask_smapi_model.v1.skill.interaction_model.value_supplier import ValueSupplierV1 + from ask_smapi_model.v1.skill.interaction_model.type_value import TypeValue as TypeValue_6d4bbead + from ask_smapi_model.v1.skill.interaction_model.value_supplier import ValueSupplier as ValueSupplier_88bf9fe1 class SlotType(object): @@ -34,6 +34,8 @@ class SlotType(object): :param name: The name of the custom slot type. :type name: (optional) str + :param generated_by: Name of the generator used to generate this object. + :type generated_by: (optional) str :param values: List of expected values. Values outside the list are still returned. :type values: (optional) list[ask_smapi_model.v1.skill.interaction_model.type_value.TypeValue] :param value_supplier: @@ -42,23 +44,27 @@ class SlotType(object): """ deserialized_types = { 'name': 'str', + 'generated_by': 'str', 'values': 'list[ask_smapi_model.v1.skill.interaction_model.type_value.TypeValue]', 'value_supplier': 'ask_smapi_model.v1.skill.interaction_model.value_supplier.ValueSupplier' } # type: Dict attribute_map = { 'name': 'name', + 'generated_by': 'generatedBy', 'values': 'values', 'value_supplier': 'valueSupplier' } # type: Dict supports_multiple_types = False - def __init__(self, name=None, values=None, value_supplier=None): - # type: (Optional[str], Optional[List[TypeValueV1]], Optional[ValueSupplierV1]) -> None + def __init__(self, name=None, generated_by=None, values=None, value_supplier=None): + # type: (Optional[str], Optional[str], Optional[List[TypeValue_6d4bbead]], Optional[ValueSupplier_88bf9fe1]) -> None """Custom slot type to define a list of possible values for a slot. Used for items that are not covered by Amazon's built-in slot types. :param name: The name of the custom slot type. :type name: (optional) str + :param generated_by: Name of the generator used to generate this object. + :type generated_by: (optional) str :param values: List of expected values. Values outside the list are still returned. :type values: (optional) list[ask_smapi_model.v1.skill.interaction_model.type_value.TypeValue] :param value_supplier: @@ -67,6 +73,7 @@ def __init__(self, name=None, values=None, value_supplier=None): self.__discriminator_value = None # type: str self.name = name + self.generated_by = generated_by self.values = values self.value_supplier = value_supplier diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_validation.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_validation.py index 3bb3fc6f..356b2c3e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_validation.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_validation.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_value.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_value.py index 0eb2733e..8be943ca 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_value.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_value.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.type_value_object import TypeValueObjectV1 + from ask_smapi_model.v1.skill.interaction_model.type_value_object import TypeValueObject as TypeValueObject_a6f9c062 class TypeValue(object): @@ -49,7 +49,7 @@ class TypeValue(object): supports_multiple_types = False def __init__(self, id=None, name=None): - # type: (Optional[str], Optional[TypeValueObjectV1]) -> None + # type: (Optional[str], Optional[TypeValueObject_a6f9c062]) -> None """The value schema in type object of interaction model. :param id: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_value_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_value_object.py index 701d5708..470e5a94 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_value_object.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_value_object.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/__init__.py index f853ff42..eed4bdf3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/__init__.py @@ -14,12 +14,12 @@ # from __future__ import absolute_import +from .value_supplier_object import ValueSupplierObject +from .slot_type_version_item import SlotTypeVersionItem +from .slot_type_version_data import SlotTypeVersionData +from .slot_type_update_object import SlotTypeUpdateObject from .version_data_object import VersionDataObject +from .slot_type_version_data_object import SlotTypeVersionDataObject from .version_data import VersionData from .list_slot_type_version_response import ListSlotTypeVersionResponse from .slot_type_update import SlotTypeUpdate -from .slot_type_update_object import SlotTypeUpdateObject -from .value_supplier_object import ValueSupplierObject -from .slot_type_version_data_object import SlotTypeVersionDataObject -from .slot_type_version_item import SlotTypeVersionItem -from .slot_type_version_data import SlotTypeVersionData diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/list_slot_type_version_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/list_slot_type_version_response.py index 7ef7dac5..4519218f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/list_slot_type_version_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/list_slot_type_version_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 - from ask_smapi_model.v1.skill.interaction_model.type_version.slot_type_version_item import SlotTypeVersionItemV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.skill.interaction_model.type_version.slot_type_version_item import SlotTypeVersionItem as SlotTypeVersionItem_424d2cc6 class ListSlotTypeVersionResponse(object): @@ -54,7 +54,7 @@ class ListSlotTypeVersionResponse(object): supports_multiple_types = False def __init__(self, links=None, slot_type_versions=None, next_token=None): - # type: (Optional[LinksV1], Optional[List[SlotTypeVersionItemV1]], Optional[str]) -> None + # type: (Optional[Links_bc43467b], Optional[List[SlotTypeVersionItem_424d2cc6]], Optional[str]) -> None """List of slot type versions of a skill for the vendor. :param links: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_update.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_update.py index d5040cad..9a107164 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_update.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_update.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.type_version.slot_type_update_object import SlotTypeUpdateObjectV1 + from ask_smapi_model.v1.skill.interaction_model.type_version.slot_type_update_object import SlotTypeUpdateObject as SlotTypeUpdateObject_f14eb740 class SlotTypeUpdate(object): @@ -45,7 +45,7 @@ class SlotTypeUpdate(object): supports_multiple_types = False def __init__(self, slot_type=None): - # type: (Optional[SlotTypeUpdateObjectV1]) -> None + # type: (Optional[SlotTypeUpdateObject_f14eb740]) -> None """Slot Type update description wrapper. :param slot_type: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_update_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_update_object.py index 11ea5bc8..4473f0fb 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_update_object.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_update_object.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_data.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_data.py index c8999fb4..242e3176 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_data.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_data.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.type_version.slot_type_version_data_object import SlotTypeVersionDataObjectV1 + from ask_smapi_model.v1.skill.interaction_model.type_version.slot_type_version_data_object import SlotTypeVersionDataObject as SlotTypeVersionDataObject_9bb98401 class SlotTypeVersionData(object): @@ -45,7 +45,7 @@ class SlotTypeVersionData(object): supports_multiple_types = False def __init__(self, slot_type=None): - # type: (Optional[SlotTypeVersionDataObjectV1]) -> None + # type: (Optional[SlotTypeVersionDataObject_9bb98401]) -> None """Slot Type version data with metadata. :param slot_type: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_data_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_data_object.py index 04144d4a..40edda71 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_data_object.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_data_object.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.type_version.value_supplier_object import ValueSupplierObjectV1 + from ask_smapi_model.v1.skill.interaction_model.type_version.value_supplier_object import ValueSupplierObject as ValueSupplierObject_922aef8f class SlotTypeVersionDataObject(object): @@ -57,7 +57,7 @@ class SlotTypeVersionDataObject(object): supports_multiple_types = False def __init__(self, id=None, definition=None, description=None, version=None): - # type: (Optional[str], Optional[ValueSupplierObjectV1], Optional[str], Optional[str]) -> None + # type: (Optional[str], Optional[ValueSupplierObject_922aef8f], Optional[str], Optional[str]) -> None """Slot Type version fields with metadata. :param id: Slot type id associated with the slot type version. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_item.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_item.py index 3538ec90..1872d68f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_item.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/slot_type_version_item.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b class SlotTypeVersionItem(object): @@ -53,7 +53,7 @@ class SlotTypeVersionItem(object): supports_multiple_types = False def __init__(self, version=None, description=None, links=None): - # type: (Optional[str], Optional[str], Optional[LinksV1]) -> None + # type: (Optional[str], Optional[str], Optional[Links_bc43467b]) -> None """Definition for slot type entity. :param version: Version number of slot type. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/value_supplier_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/value_supplier_object.py index eb94a5d0..a6dfb58e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/value_supplier_object.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/value_supplier_object.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.value_supplier import ValueSupplierV1 + from ask_smapi_model.v1.skill.interaction_model.value_supplier import ValueSupplier as ValueSupplier_88bf9fe1 class ValueSupplierObject(object): @@ -45,7 +45,7 @@ class ValueSupplierObject(object): supports_multiple_types = False def __init__(self, value_supplier=None): - # type: (Optional[ValueSupplierV1]) -> None + # type: (Optional[ValueSupplier_88bf9fe1]) -> None """Value supplier object for slot definition. :param value_supplier: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/version_data.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/version_data.py index f2c1fc4d..84821611 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/version_data.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/version_data.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.type_version.version_data_object import VersionDataObjectV1 + from ask_smapi_model.v1.skill.interaction_model.type_version.version_data_object import VersionDataObject as VersionDataObject_21c8201d class VersionData(object): @@ -45,7 +45,7 @@ class VersionData(object): supports_multiple_types = False def __init__(self, slot_type=None): - # type: (Optional[VersionDataObjectV1]) -> None + # type: (Optional[VersionDataObject_21c8201d]) -> None """Slot Type version specific data. :param slot_type: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/version_data_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/version_data_object.py index 8e062db1..9f037c60 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/version_data_object.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/type_version/version_data_object.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.type_version.value_supplier_object import ValueSupplierObjectV1 + from ask_smapi_model.v1.skill.interaction_model.type_version.value_supplier_object import ValueSupplierObject as ValueSupplierObject_922aef8f class VersionDataObject(object): @@ -49,7 +49,7 @@ class VersionDataObject(object): supports_multiple_types = False def __init__(self, definition=None, description=None): - # type: (Optional[ValueSupplierObjectV1], Optional[str]) -> None + # type: (Optional[ValueSupplierObject_922aef8f], Optional[str]) -> None """Slot Type version fields with specific data. :param definition: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_catalog.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_catalog.py index fd96597d..f1b7dfa5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_catalog.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_catalog.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_supplier.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_supplier.py index cfb15e78..0b6f6f54 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_supplier.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_supplier.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/__init__.py index 856a794f..886576f4 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/__init__.py @@ -14,15 +14,15 @@ # from __future__ import absolute_import +from .catalog_update import CatalogUpdate from .list_catalog_entity_versions_response import ListCatalogEntityVersionsResponse -from .list_response import ListResponse -from .version_data import VersionData -from .catalog_entity_version import CatalogEntityVersion -from .value_schema_name import ValueSchemaName -from .value_schema import ValueSchema -from .catalog_values import CatalogValues +from .input_source import InputSource from .links import Links -from .catalog_update import CatalogUpdate +from .catalog_values import CatalogValues +from .catalog_entity_version import CatalogEntityVersion +from .list_response import ListResponse from .catalog_version_data import CatalogVersionData +from .version_data import VersionData from .version_items import VersionItems -from .input_source import InputSource +from .value_schema import ValueSchema +from .value_schema_name import ValueSchemaName diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_entity_version.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_entity_version.py index a60b4890..2dc8c085 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_entity_version.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_entity_version.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.version.links import LinksV1 + from ask_smapi_model.v1.skill.interaction_model.version.links import Links as Links_7f14ca56 class CatalogEntityVersion(object): @@ -57,7 +57,7 @@ class CatalogEntityVersion(object): supports_multiple_types = False def __init__(self, version=None, creation_time=None, description=None, links=None): - # type: (Optional[str], Optional[datetime], Optional[str], Optional[LinksV1]) -> None + # type: (Optional[str], Optional[datetime], Optional[str], Optional[Links_7f14ca56]) -> None """Version metadata about the catalog entity version. :param version: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_update.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_update.py index 4b093f10..0ed81680 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_update.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_update.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_values.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_values.py index b5b82f5d..5339a718 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_values.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_values.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 - from ask_smapi_model.v1.skill.interaction_model.version.value_schema import ValueSchemaV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.skill.interaction_model.version.value_schema import ValueSchema as ValueSchema_5ad1df21 class CatalogValues(object): @@ -62,7 +62,7 @@ class CatalogValues(object): supports_multiple_types = False def __init__(self, is_truncated=None, next_token=None, total_count=None, links=None, values=None): - # type: (Optional[bool], Optional[str], Optional[int], Optional[LinksV1], Optional[List[ValueSchemaV1]]) -> None + # type: (Optional[bool], Optional[str], Optional[int], Optional[Links_bc43467b], Optional[List[ValueSchema_5ad1df21]]) -> None """List of catalog values. :param is_truncated: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_version_data.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_version_data.py index acc5521a..f425a7e1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_version_data.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_version_data.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.version.input_source import InputSourceV1 + from ask_smapi_model.v1.skill.interaction_model.version.input_source import InputSource as InputSource_f7163db5 class CatalogVersionData(object): @@ -53,7 +53,7 @@ class CatalogVersionData(object): supports_multiple_types = False def __init__(self, source=None, description=None, version=None): - # type: (Optional[InputSourceV1], Optional[str], Optional[str]) -> None + # type: (Optional[InputSource_f7163db5], Optional[str], Optional[str]) -> None """Catalog version data with metadata. :param source: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/input_source.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/input_source.py index 811a98d2..31a0e6a2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/input_source.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/input_source.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/links.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/links.py index 458977c0..d851707b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/links.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/links.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.link import LinkV1 + from ask_smapi_model.v1.link import Link as Link_5c161ca5 class Links(object): @@ -43,7 +43,7 @@ class Links(object): supports_multiple_types = False def __init__(self, object_self=None): - # type: (Optional[LinkV1]) -> None + # type: (Optional[Link_5c161ca5]) -> None """ :param object_self: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/list_catalog_entity_versions_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/list_catalog_entity_versions_response.py index d8bcb953..5153d2f5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/list_catalog_entity_versions_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/list_catalog_entity_versions_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.version.links import LinksV1 - from ask_smapi_model.v1.skill.interaction_model.version.catalog_entity_version import CatalogEntityVersionV1 + from ask_smapi_model.v1.skill.interaction_model.version.links import Links as Links_7f14ca56 + from ask_smapi_model.v1.skill.interaction_model.version.catalog_entity_version import CatalogEntityVersion as CatalogEntityVersion_3888263a class ListCatalogEntityVersionsResponse(object): @@ -62,7 +62,7 @@ class ListCatalogEntityVersionsResponse(object): supports_multiple_types = False def __init__(self, links=None, catalog_versions=None, is_truncated=None, next_token=None, total_count=None): - # type: (Optional[LinksV1], Optional[List[CatalogEntityVersionV1]], Optional[bool], Optional[str], Optional[int]) -> None + # type: (Optional[Links_7f14ca56], Optional[List[CatalogEntityVersion_3888263a]], Optional[bool], Optional[str], Optional[int]) -> None """List of catalog versions of a catalog for the vendor in sortDirection order, descending as default. :param links: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/list_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/list_response.py index 0ba6a34a..3e95748f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/list_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/list_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.version.version_items import VersionItemsV1 - from ask_smapi_model.v1.links import LinksV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.skill.interaction_model.version.version_items import VersionItems as VersionItems_678f4ab class ListResponse(object): @@ -58,7 +58,7 @@ class ListResponse(object): supports_multiple_types = False def __init__(self, links=None, skill_model_versions=None, is_truncated=None, next_token=None): - # type: (Optional[LinksV1], Optional[List[VersionItemsV1]], Optional[bool], Optional[str]) -> None + # type: (Optional[Links_bc43467b], Optional[List[VersionItems_678f4ab]], Optional[bool], Optional[str]) -> None """List of interactionModel versions of a skill for the vendor :param links: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/value_schema.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/value_schema.py index e571f029..8d6af11f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/value_schema.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/value_schema.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.version.value_schema_name import ValueSchemaNameV1 + from ask_smapi_model.v1.skill.interaction_model.version.value_schema_name import ValueSchemaName as ValueSchemaName_bf76f45c class ValueSchema(object): @@ -49,7 +49,7 @@ class ValueSchema(object): supports_multiple_types = False def __init__(self, id=None, name=None): - # type: (Optional[str], Optional[ValueSchemaNameV1]) -> None + # type: (Optional[str], Optional[ValueSchemaName_bf76f45c]) -> None """The value schema in type object of interaction model. :param id: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/value_schema_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/value_schema_name.py index dfdabe0e..73a5bbbd 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/value_schema_name.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/value_schema_name.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_data.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_data.py index 57681441..83537987 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_data.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_data.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.version.input_source import InputSourceV1 + from ask_smapi_model.v1.skill.interaction_model.version.input_source import InputSource as InputSource_f7163db5 class VersionData(object): @@ -49,7 +49,7 @@ class VersionData(object): supports_multiple_types = False def __init__(self, source=None, description=None): - # type: (Optional[InputSourceV1], Optional[str]) -> None + # type: (Optional[InputSource_f7163db5], Optional[str]) -> None """Catalog version specific data. :param source: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_items.py index 8cdbeafc..ae4dd2ee 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_items.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_items.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.version.links import LinksV1 + from ask_smapi_model.v1.skill.interaction_model.version.links import Links as Links_7f14ca56 class VersionItems(object): @@ -57,7 +57,7 @@ class VersionItems(object): supports_multiple_types = False def __init__(self, version=None, creation_time=None, description=None, links=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[LinksV1]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[Links_7f14ca56]) -> None """Version metadata about the entity. :param version: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model_last_update_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model_last_update_request.py index 44f1fb3a..1535149b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model_last_update_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model_last_update_request.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.build_details import BuildDetailsV1 - from ask_smapi_model.v1.skill.status import StatusV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 + from ask_smapi_model.v1.skill.status import Status as Status_585d1308 + from ask_smapi_model.v1.skill.build_details import BuildDetails as BuildDetails_e31a9a37 + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 class InteractionModelLastUpdateRequest(object): @@ -59,7 +59,7 @@ class InteractionModelLastUpdateRequest(object): supports_multiple_types = False def __init__(self, status=None, errors=None, warnings=None, build_details=None): - # type: (Optional[StatusV1], Optional[List[StandardizedErrorV1]], Optional[List[StandardizedErrorV1]], Optional[BuildDetailsV1]) -> None + # type: (Optional[Status_585d1308], Optional[List[StandardizedError_f5106a89]], Optional[List[StandardizedError_f5106a89]], Optional[BuildDetails_e31a9a37]) -> None """Contains attributes related to last modification (create/update) request of a resource. :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/__init__.py index dfe7888f..1567398f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/__init__.py @@ -14,13 +14,13 @@ # from __future__ import absolute_import -from .invocation_response_status import InvocationResponseStatus -from .end_point_regions import EndPointRegions -from .invoke_skill_response import InvokeSkillResponse -from .invocation_response_result import InvocationResponseResult -from .response import Response -from .metrics import Metrics from .invoke_skill_request import InvokeSkillRequest +from .invocation_response_result import InvocationResponseResult +from .end_point_regions import EndPointRegions from .skill_request import SkillRequest +from .invoke_skill_response import InvokeSkillResponse from .request import Request from .skill_execution_info import SkillExecutionInfo +from .metrics import Metrics +from .response import Response +from .invocation_response_status import InvocationResponseStatus diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/end_point_regions.py b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/end_point_regions.py index 06727ba2..7ce8c932 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/end_point_regions.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/end_point_regions.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class EndPointRegions(Enum): FE = "FE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, EndPointRegions): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invocation_response_result.py b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invocation_response_result.py index a84d9a3e..6f2b847b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invocation_response_result.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invocation_response_result.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.invocations.skill_execution_info import SkillExecutionInfoV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 + from ask_smapi_model.v1.skill.invocations.skill_execution_info import SkillExecutionInfo as SkillExecutionInfo_a72238cf + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 class InvocationResponseResult(object): @@ -48,7 +48,7 @@ class InvocationResponseResult(object): supports_multiple_types = False def __init__(self, skill_execution_info=None, error=None): - # type: (Optional[SkillExecutionInfoV1], Optional[StandardizedErrorV1]) -> None + # type: (Optional[SkillExecutionInfo_a72238cf], Optional[StandardizedError_f5106a89]) -> None """ :param skill_execution_info: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invocation_response_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invocation_response_status.py index 46cdc3d6..2267aaea 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invocation_response_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invocation_response_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class InvocationResponseStatus(Enum): FAILED = "FAILED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, InvocationResponseStatus): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invoke_skill_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invoke_skill_request.py index 5b6b348f..e0496ee7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invoke_skill_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invoke_skill_request.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.invocations.skill_request import SkillRequestV1 - from ask_smapi_model.v1.skill.invocations.end_point_regions import EndPointRegionsV1 + from ask_smapi_model.v1.skill.invocations.skill_request import SkillRequest as SkillRequest_354d57fc + from ask_smapi_model.v1.skill.invocations.end_point_regions import EndPointRegions as EndPointRegions_fe2fd2d7 class InvokeSkillRequest(object): @@ -48,7 +48,7 @@ class InvokeSkillRequest(object): supports_multiple_types = False def __init__(self, endpoint_region=None, skill_request=None): - # type: (Optional[EndPointRegionsV1], Optional[SkillRequestV1]) -> None + # type: (Optional[EndPointRegions_fe2fd2d7], Optional[SkillRequest_354d57fc]) -> None """ :param endpoint_region: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invoke_skill_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invoke_skill_response.py index 88851b35..28c8bfcf 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invoke_skill_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/invoke_skill_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.invocations.invocation_response_result import InvocationResponseResultV1 - from ask_smapi_model.v1.skill.invocations.invocation_response_status import InvocationResponseStatusV1 + from ask_smapi_model.v1.skill.invocations.invocation_response_result import InvocationResponseResult as InvocationResponseResult_8c0a7a7f + from ask_smapi_model.v1.skill.invocations.invocation_response_status import InvocationResponseStatus as InvocationResponseStatus_d722841f class InvokeSkillResponse(object): @@ -48,7 +48,7 @@ class InvokeSkillResponse(object): supports_multiple_types = False def __init__(self, status=None, result=None): - # type: (Optional[InvocationResponseStatusV1], Optional[InvocationResponseResultV1]) -> None + # type: (Optional[InvocationResponseStatus_d722841f], Optional[InvocationResponseResult_8c0a7a7f]) -> None """ :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/metrics.py b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/metrics.py index b474c621..1dd68344 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/metrics.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/metrics.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/request.py b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/request.py index b68a06bd..ca019d72 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/response.py b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/response.py index 6db7aada..a1b0d435 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/skill_execution_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/skill_execution_info.py index a699875f..44ab450c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/skill_execution_info.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/skill_execution_info.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.invocations.metrics import MetricsV1 - from ask_smapi_model.v1.skill.invocations.request import RequestV1 - from ask_smapi_model.v1.skill.invocations.response import ResponseV1 + from ask_smapi_model.v1.skill.invocations.response import Response as Response_fc63f99d + from ask_smapi_model.v1.skill.invocations.metrics import Metrics as Metrics_5e44e067 + from ask_smapi_model.v1.skill.invocations.request import Request as Request_f8b8b7ff class SkillExecutionInfo(object): @@ -53,7 +53,7 @@ class SkillExecutionInfo(object): supports_multiple_types = False def __init__(self, invocation_request=None, invocation_response=None, metrics=None): - # type: (Optional[Dict[str, RequestV1]], Optional[Dict[str, ResponseV1]], Optional[Dict[str, MetricsV1]]) -> None + # type: (Optional[Dict[str, Request_f8b8b7ff]], Optional[Dict[str, Response_fc63f99d]], Optional[Dict[str, Metrics_5e44e067]]) -> None """ :param invocation_request: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/skill_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/skill_request.py index ce65870c..51322922 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/invocations/skill_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/invocations/skill_request.py @@ -21,14 +21,14 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class SkillRequest(object): """ - :param body: ASK request body schema as defined in the public facing documentation (https://tiny.amazon.com/1h8keglep/deveamazpublsolualexalexdocs) + :param body: ASK request body schema as defined in the public facing documentation (https://developer.amazon.com/en-US/docs/alexa/custom-skills/request-and-response-json-reference.html#request-body-syntax) :type body: (optional) object """ @@ -45,7 +45,7 @@ def __init__(self, body=None): # type: (Optional[object]) -> None """ - :param body: ASK request body schema as defined in the public facing documentation (https://tiny.amazon.com/1h8keglep/deveamazpublsolualexalexdocs) + :param body: ASK request body schema as defined in the public facing documentation (https://developer.amazon.com/en-US/docs/alexa/custom-skills/request-and-response-json-reference.html#request-body-syntax) :type body: (optional) object """ self.__discriminator_value = None # type: str diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/list_skill_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/list_skill_response.py index f2c506af..bfd764a8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/list_skill_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/list_skill_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.skill_summary import SkillSummaryV1 - from ask_smapi_model.v1.links import LinksV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.skill.skill_summary import SkillSummary as SkillSummary_610b3b71 class ListSkillResponse(object): @@ -58,7 +58,7 @@ class ListSkillResponse(object): supports_multiple_types = False def __init__(self, links=None, skills=None, is_truncated=None, next_token=None): - # type: (Optional[LinksV1], Optional[List[SkillSummaryV1]], Optional[bool], Optional[str]) -> None + # type: (Optional[Links_bc43467b], Optional[List[SkillSummary_610b3b71]], Optional[bool], Optional[str]) -> None """List of skills for the vendor. :param links: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/list_skill_versions_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/list_skill_versions_response.py index 82dc6a3a..651adab0 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/list_skill_versions_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/list_skill_versions_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 - from ask_smapi_model.v1.skill.skill_version import SkillVersionV1 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.skill.skill_version import SkillVersion as SkillVersion_c642bcb1 class ListSkillVersionsResponse(object): @@ -58,7 +58,7 @@ class ListSkillVersionsResponse(object): supports_multiple_types = False def __init__(self, links=None, skill_versions=None, is_truncated=None, next_token=None): - # type: (Optional[LinksV1], Optional[List[SkillVersionV1]], Optional[bool], Optional[str]) -> None + # type: (Optional[Links_bc43467b], Optional[List[SkillVersion_c642bcb1]], Optional[bool], Optional[str]) -> None """List of all skill versions :param links: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/__init__.py index 4dc6ed0b..b2bd35eb 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/__init__.py @@ -14,80 +14,133 @@ # from __future__ import absolute_import -from .connections_payload import ConnectionsPayload -from .flash_briefing_update_frequency import FlashBriefingUpdateFrequency +from .audio_interface import AudioInterface +from .interface import Interface +from .free_trial_information import FreeTrialInformation +from .localized_flash_briefing_info import LocalizedFlashBriefingInfo +from .demand_response_apis import DemandResponseApis +from .automatic_distribution import AutomaticDistribution +from .video_region import VideoRegion +from .authorized_client_lwa_application_android import AuthorizedClientLwaApplicationAndroid +from .music_content_name import MusicContentName +from .custom_product_prompts import CustomProductPrompts +from .event_name_type import EventNameType from .skill_manifest_localized_privacy_and_compliance import SkillManifestLocalizedPrivacyAndCompliance -from .music_feature import MusicFeature -from .skill_manifest_endpoint import SkillManifestEndpoint -from .health_apis import HealthApis -from .ssl_certificate_type import SSLCertificateType -from .viewport_mode import ViewportMode -from .skill_manifest_events import SkillManifestEvents -from .flash_briefing_content_type import FlashBriefingContentType -from .health_alias import HealthAlias -from .skill_manifest_privacy_and_compliance import SkillManifestPrivacyAndCompliance -from .music_apis import MusicApis -from .distribution_mode import DistributionMode -from .custom_connections import CustomConnections -from .music_capability import MusicCapability -from .display_interface_apml_version import DisplayInterfaceApmlVersion -from .event_name import EventName +from .video_fire_tv_catalog_ingestion import VideoFireTvCatalogIngestion +from .friendly_name import FriendlyName from .up_channel_items import UpChannelItems -from .house_hold_list import HouseHoldList -from .music_interfaces import MusicInterfaces -from .permission_name import PermissionName -from .interface import Interface from .health_interface import HealthInterface -from .region import Region -from .skill_manifest_envelope import SkillManifestEnvelope -from .skill_manifest_apis import SkillManifestApis -from .connections import Connections +from .subscription_payment_frequency import SubscriptionPaymentFrequency +from .source_language_for_locales import SourceLanguageForLocales +from .flash_briefing_update_frequency import FlashBriefingUpdateFrequency +from .smart_home_protocol import SmartHomeProtocol from .lambda_endpoint import LambdaEndpoint -from .viewport_specification import ViewportSpecification -from .music_alias import MusicAlias -from .request_name import RequestName +from .video_prompt_name import VideoPromptName +from .event_name import EventName from .music_content_type import MusicContentType +from .music_apis import MusicApis +from .music_alias import MusicAlias +from .knowledge_apis import KnowledgeApis from .manifest_gadget_support import ManifestGadgetSupport -from .custom_interface import CustomInterface -from .distribution_countries import DistributionCountries -from .skill_manifest_publishing_information import SkillManifestPublishingInformation -from .health_protocol_version import HealthProtocolVersion -from .video_app_interface import VideoAppInterface +from .dialog_management import DialogManagement +from .offer_type import OfferType +from .house_hold_list import HouseHoldList +from .linked_common_schemes import LinkedCommonSchemes +from .interface_type import InterfaceType +from .authorized_client_lwa import AuthorizedClientLwa +from .lambda_region import LambdaRegion +from .video_catalog_info import VideoCatalogInfo +from .extension_initialization_request import ExtensionInitializationRequest +from .dialog_manager import DialogManager from .custom_apis import CustomApis -from .flash_briefing_genre import FlashBriefingGenre -from .localized_flash_briefing_info_items import LocalizedFlashBriefingInfoItems -from .music_wordmark import MusicWordmark -from .video_apis_locale import VideoApisLocale -from .health_request import HealthRequest +from .voice_profile_feature import VoiceProfileFeature +from .skill_manifest import SkillManifest +from .data_store_package import DataStorePackage +from .alexa_data_store_package_manager_interface import AlexaDataStorePackageManagerInterface +from .automatic_cloned_locale import AutomaticClonedLocale +from .marketplace_pricing import MarketplacePricing +from .alexa_presentation_apl_interface import AlexaPresentationAplInterface +from .alexa_presentation_html_interface import AlexaPresentationHtmlInterface +from .tax_information import TaxInformation +from .viewport_specification import ViewportSpecification +from .skill_manifest_privacy_and_compliance import SkillManifestPrivacyAndCompliance +from .authorized_client import AuthorizedClient +from .permission_items import PermissionItems from .alexa_for_business_interface import AlexaForBusinessInterface -from .game_engine_interface import GameEngineInterface -from .gadget_controller_interface import GadgetControllerInterface -from .smart_home_protocol import SmartHomeProtocol -from .skill_manifest_localized_publishing_information import SkillManifestLocalizedPublishingInformation from .version import Version +from .app_link import AppLink +from .alexa_search import AlexaSearch +from .music_interfaces import MusicInterfaces +from .region import Region +from .alexa_for_business_apis import AlexaForBusinessApis +from .authorized_client_lwa_application import AuthorizedClientLwaApplication +from .supported_controls_type import SupportedControlsType +from .skill_manifest_events import SkillManifestEvents +from .custom_connections import CustomConnections +from .extension_request import ExtensionRequest +from .flash_briefing_genre import FlashBriefingGenre +from .alexa_for_business_interface_request import AlexaForBusinessInterfaceRequest +from .smart_home_apis import SmartHomeApis +from .localized_music_info import LocalizedMusicInfo +from .video_prompt_name_type import VideoPromptNameType +from .amazon_conversations_dialog_manager import AMAZONConversationsDialogManager +from .play_store_common_scheme_name import PlayStoreCommonSchemeName +from .catalog_type import CatalogType +from .knowledge_apis_enablement_channel import KnowledgeApisEnablementChannel +from .app_link_interface import AppLinkInterface from .music_request import MusicRequest +from .permission_name import PermissionName +from .display_interface_template_version import DisplayInterfaceTemplateVersion +from .skill_manifest_localized_publishing_information import SkillManifestLocalizedPublishingInformation +from .custom_task import CustomTask +from .skill_manifest_envelope import SkillManifestEnvelope +from .dialog_delegation_strategy import DialogDelegationStrategy +from .locales_by_automatic_cloned_locale import LocalesByAutomaticClonedLocale +from .currency import Currency +from .distribution_countries import DistributionCountries +from .localized_name import LocalizedName +from .linked_application import LinkedApplication +from .distribution_mode import DistributionMode +from .custom_localized_information_dialog_management import CustomLocalizedInformationDialogManagement +from .supported_controls import SupportedControls from .video_apis import VideoApis -from .gadget_support import GadgetSupport -from .lambda_region import LambdaRegion -from .video_country_info import VideoCountryInfo -from .skill_manifest import SkillManifest -from .flash_briefing_apis import FlashBriefingApis -from .skill_manifest_custom_task import SkillManifestCustomTask -from .permission_items import PermissionItems -from .localized_health_info import LocalizedHealthInfo -from .event_name_type import EventNameType -from .audio_interface import AudioInterface -from .smart_home_apis import SmartHomeApis -from .alexa_for_business_apis import AlexaForBusinessApis -from .video_region import VideoRegion +from .localized_knowledge_information import LocalizedKnowledgeInformation +from .linked_android_common_intent import LinkedAndroidCommonIntent +from .gadget_controller_interface import GadgetControllerInterface +from .event_publications import EventPublications +from .connections_payload import ConnectionsPayload +from .shopping_kit import ShoppingKit +from .ios_app_store_common_scheme_name import IOSAppStoreCommonSchemeName +from .manifest_version import ManifestVersion from .viewport_shape import ViewportShape -from .alexa_presentation_apl_interface import AlexaPresentationAplInterface +from .alexa_data_store_package_manager_implemented_interface import AlexaDataStorePackageManagerImplementedInterface +from .catalog_info import CatalogInfo +from .display_interface_apml_version import DisplayInterfaceApmlVersion +from .video_app_interface import VideoAppInterface +from .tax_information_category import TaxInformationCategory +from .android_common_intent_name import AndroidCommonIntentName +from .music_capability import MusicCapability +from .subscription_information import SubscriptionInformation +from .viewport_mode import ViewportMode +from .flash_briefing_apis import FlashBriefingApis +from .flash_briefing_content_type import FlashBriefingContentType +from .custom_localized_information import CustomLocalizedInformation +from .gadget_support_requirement import GadgetSupportRequirement +from .game_engine_interface import GameEngineInterface +from .localized_flash_briefing_info_items import LocalizedFlashBriefingInfoItems +from .catalog_name import CatalogName +from .skill_manifest_endpoint import SkillManifestEndpoint +from .music_wordmark import MusicWordmark +from .paid_skill_information import PaidSkillInformation +from .video_feature import VideoFeature +from .skill_manifest_publishing_information import SkillManifestPublishingInformation +from .android_custom_intent import AndroidCustomIntent +from .app_link_v2_interface import AppLinkV2Interface +from .video_apis_locale import VideoApisLocale +from .music_feature import MusicFeature +from .ssl_certificate_type import SSLCertificateType +from .alexa_for_business_interface_request_name import AlexaForBusinessInterfaceRequestName +from .video_country_info import VideoCountryInfo +from .lambda_ssl_certificate_type import LambdaSSLCertificateType +from .skill_manifest_apis import SkillManifestApis from .display_interface import DisplayInterface -from .music_content_name import MusicContentName -from .display_interface_template_version import DisplayInterfaceTemplateVersion -from .request import Request -from .event_publications import EventPublications -from .localized_music_info import LocalizedMusicInfo -from .video_catalog_info import VideoCatalogInfo -from .localized_flash_briefing_info import LocalizedFlashBriefingInfo -from .alexa_presentation_html_interface import AlexaPresentationHtmlInterface diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_data_store_package_manager_implemented_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_data_store_package_manager_implemented_interface.py new file mode 100644 index 00000000..b6473f69 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_data_store_package_manager_implemented_interface.py @@ -0,0 +1,107 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.data_store_package import DataStorePackage as DataStorePackage_6d063591 + + +class AlexaDataStorePackageManagerImplementedInterface(object): + """ + + :param packages: The list of data store packages that are authored by skill developer. + :type packages: (optional) list[ask_smapi_model.v1.skill.manifest.data_store_package.DataStorePackage] + + """ + deserialized_types = { + 'packages': 'list[ask_smapi_model.v1.skill.manifest.data_store_package.DataStorePackage]' + } # type: Dict + + attribute_map = { + 'packages': 'packages' + } # type: Dict + supports_multiple_types = False + + def __init__(self, packages=None): + # type: (Optional[List[DataStorePackage_6d063591]]) -> None + """ + + :param packages: The list of data store packages that are authored by skill developer. + :type packages: (optional) list[ask_smapi_model.v1.skill.manifest.data_store_package.DataStorePackage] + """ + self.__discriminator_value = None # type: str + + self.packages = packages + + 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, AlexaDataStorePackageManagerImplementedInterface): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_result.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_data_store_package_manager_interface.py similarity index 63% rename from ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_result.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_data_store_package_manager_interface.py index c94f1594..9498445a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_result.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_data_store_package_manager_interface.py @@ -18,47 +18,47 @@ import six import typing from enum import Enum +from ask_smapi_model.v1.skill.manifest.interface import Interface if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_intent import ConflictIntentV1 + from ask_smapi_model.v1.skill.manifest.data_store_package import DataStorePackage as DataStorePackage_6d063591 -class ConflictResult(object): +class AlexaDataStorePackageManagerInterface(Interface): """ + Skill use this interface to support functionality related to data store packages. - :param sample_utterance: Sample utterance provided by 3P developers for intents. - :type sample_utterance: (optional) str - :param intent: - :type intent: (optional) ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_intent.ConflictIntent + + :param packages: List of DataStore packages that the developer authored. + :type packages: (optional) list[ask_smapi_model.v1.skill.manifest.data_store_package.DataStorePackage] """ deserialized_types = { - 'sample_utterance': 'str', - 'intent': 'ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_intent.ConflictIntent' + 'object_type': 'str', + 'packages': 'list[ask_smapi_model.v1.skill.manifest.data_store_package.DataStorePackage]' } # type: Dict attribute_map = { - 'sample_utterance': 'sampleUtterance', - 'intent': 'intent' + 'object_type': 'type', + 'packages': 'packages' } # type: Dict supports_multiple_types = False - def __init__(self, sample_utterance=None, intent=None): - # type: (Optional[str], Optional[ConflictIntentV1]) -> None - """ + def __init__(self, packages=None): + # type: (Optional[List[DataStorePackage_6d063591]]) -> None + """Skill use this interface to support functionality related to data store packages. - :param sample_utterance: Sample utterance provided by 3P developers for intents. - :type sample_utterance: (optional) str - :param intent: - :type intent: (optional) ask_smapi_model.v1.skill.interaction_model.conflict_detection.conflict_intent.ConflictIntent + :param packages: List of DataStore packages that the developer authored. + :type packages: (optional) list[ask_smapi_model.v1.skill.manifest.data_store_package.DataStorePackage] """ - self.__discriminator_value = None # type: str + self.__discriminator_value = "ALEXA_DATASTORE_PACKAGEMANAGER" # type: str - self.sample_utterance = sample_utterance - self.intent = intent + self.object_type = self.__discriminator_value + super(AlexaDataStorePackageManagerInterface, self).__init__(object_type=self.__discriminator_value) + self.packages = packages def to_dict(self): # type: () -> Dict[str, object] @@ -103,7 +103,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, ConflictResult): + if not isinstance(other, AlexaDataStorePackageManagerInterface): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_apis.py index 40e1f3c0..af0d95b2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_apis.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_apis.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpointV1 - from ask_smapi_model.v1.skill.manifest.alexa_for_business_interface import AlexaForBusinessInterfaceV1 - from ask_smapi_model.v1.skill.manifest.region import RegionV1 + from ask_smapi_model.v1.skill.manifest.alexa_for_business_interface import AlexaForBusinessInterface as AlexaForBusinessInterface_bc7084aa + from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpoint as SkillManifestEndpoint_b30bcc05 + from ask_smapi_model.v1.skill.manifest.region import Region as Region_10de9595 class AlexaForBusinessApis(object): @@ -55,7 +55,7 @@ class AlexaForBusinessApis(object): supports_multiple_types = False def __init__(self, regions=None, endpoint=None, interfaces=None): - # type: (Optional[Dict[str, RegionV1]], Optional[SkillManifestEndpointV1], Optional[List[AlexaForBusinessInterfaceV1]]) -> None + # type: (Optional[Dict[str, Region_10de9595]], Optional[SkillManifestEndpoint_b30bcc05], Optional[List[AlexaForBusinessInterface_bc7084aa]]) -> None """Defines the structure of alexaForBusiness api in the skill manifest. :param regions: Contains an array of the supported <region> Objects. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface.py index 04873ccc..e316d5b3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.version import VersionV1 - from ask_smapi_model.v1.skill.manifest.request import RequestV1 + from ask_smapi_model.v1.skill.manifest.version import Version as Version_17871229 + from ask_smapi_model.v1.skill.manifest.alexa_for_business_interface_request import AlexaForBusinessInterfaceRequest as AlexaForBusinessInterfaceRequest_3d9e9835 class AlexaForBusinessInterface(object): @@ -35,13 +35,13 @@ class AlexaForBusinessInterface(object): :param version: :type version: (optional) ask_smapi_model.v1.skill.manifest.version.Version :param requests: Contains a list of requests/messages that skill can handle. - :type requests: (optional) list[ask_smapi_model.v1.skill.manifest.request.Request] + :type requests: (optional) list[ask_smapi_model.v1.skill.manifest.alexa_for_business_interface_request.AlexaForBusinessInterfaceRequest] """ deserialized_types = { 'namespace': 'str', 'version': 'ask_smapi_model.v1.skill.manifest.version.Version', - 'requests': 'list[ask_smapi_model.v1.skill.manifest.request.Request]' + 'requests': 'list[ask_smapi_model.v1.skill.manifest.alexa_for_business_interface_request.AlexaForBusinessInterfaceRequest]' } # type: Dict attribute_map = { @@ -52,7 +52,7 @@ class AlexaForBusinessInterface(object): supports_multiple_types = False def __init__(self, namespace=None, version=None, requests=None): - # type: (Optional[str], Optional[VersionV1], Optional[List[RequestV1]]) -> None + # type: (Optional[str], Optional[Version_17871229], Optional[List[AlexaForBusinessInterfaceRequest_3d9e9835]]) -> None """ :param namespace: Name of the interface. @@ -60,7 +60,7 @@ def __init__(self, namespace=None, version=None, requests=None): :param version: :type version: (optional) ask_smapi_model.v1.skill.manifest.version.Version :param requests: Contains a list of requests/messages that skill can handle. - :type requests: (optional) list[ask_smapi_model.v1.skill.manifest.request.Request] + :type requests: (optional) list[ask_smapi_model.v1.skill.manifest.alexa_for_business_interface_request.AlexaForBusinessInterfaceRequest] """ self.__discriminator_value = None # type: str diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/request.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface_request.py similarity index 78% rename from ask-smapi-model/ask_smapi_model/v1/skill/manifest/request.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface_request.py index c6a3bfeb..fbc6c85e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface_request.py @@ -21,20 +21,20 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.request_name import RequestNameV1 + from ask_smapi_model.v1.skill.manifest.alexa_for_business_interface_request_name import AlexaForBusinessInterfaceRequestName as AlexaForBusinessInterfaceRequestName_54fdbf00 -class Request(object): +class AlexaForBusinessInterfaceRequest(object): """ :param name: - :type name: (optional) ask_smapi_model.v1.skill.manifest.request_name.RequestName + :type name: (optional) ask_smapi_model.v1.skill.manifest.alexa_for_business_interface_request_name.AlexaForBusinessInterfaceRequestName """ deserialized_types = { - 'name': 'ask_smapi_model.v1.skill.manifest.request_name.RequestName' + 'name': 'ask_smapi_model.v1.skill.manifest.alexa_for_business_interface_request_name.AlexaForBusinessInterfaceRequestName' } # type: Dict attribute_map = { @@ -43,11 +43,11 @@ class Request(object): supports_multiple_types = False def __init__(self, name=None): - # type: (Optional[RequestNameV1]) -> None + # type: (Optional[AlexaForBusinessInterfaceRequestName_54fdbf00]) -> None """ :param name: - :type name: (optional) ask_smapi_model.v1.skill.manifest.request_name.RequestName + :type name: (optional) ask_smapi_model.v1.skill.manifest.alexa_for_business_interface_request_name.AlexaForBusinessInterfaceRequestName """ self.__discriminator_value = None # type: str @@ -96,7 +96,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, Request): + if not isinstance(other, AlexaForBusinessInterfaceRequest): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/request_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface_request_name.py similarity index 85% rename from ask-smapi-model/ask_smapi_model/v1/skill/manifest/request_name.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface_request_name.py index 6227a3ae..60f612ad 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/request_name.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface_request_name.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class RequestName(Enum): +class AlexaForBusinessInterfaceRequestName(Enum): """ Name of the request. @@ -38,7 +38,7 @@ class RequestName(Enum): Update = "Update" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,14 +54,14 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" - if not isinstance(other, RequestName): + if not isinstance(other, AlexaForBusinessInterfaceRequestName): return False return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_presentation_apl_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_presentation_apl_interface.py index be0a345c..528e3ca0 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_presentation_apl_interface.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_presentation_apl_interface.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.viewport_specification import ViewportSpecificationV1 + from ask_smapi_model.v1.skill.manifest.viewport_specification import ViewportSpecification as ViewportSpecification_3bba5cf2 class AlexaPresentationAplInterface(Interface): @@ -48,7 +48,7 @@ class AlexaPresentationAplInterface(Interface): supports_multiple_types = False def __init__(self, supported_viewports=None): - # type: (Optional[List[ViewportSpecificationV1]]) -> None + # type: (Optional[List[ViewportSpecification_3bba5cf2]]) -> None """Used to declare that the skill uses the Alexa.Presentation.APL interface. :param supported_viewports: List of supported viewports. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_presentation_html_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_presentation_html_interface.py index e988e30f..7eacd94b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_presentation_html_interface.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_presentation_html_interface.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_search.py similarity index 83% rename from ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_interface.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_search.py index a7b544b0..89d5a118 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_interface.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_search.py @@ -22,14 +22,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class CustomInterface(Interface): +class AlexaSearch(Interface): """ - Skills using Custom Interfaces can send custom directives and receive custom events from custom endpoints such as Alexa gadgets. - """ @@ -44,13 +42,13 @@ class CustomInterface(Interface): def __init__(self): # type: () -> None - """Skills using Custom Interfaces can send custom directives and receive custom events from custom endpoints such as Alexa gadgets. + """ """ - self.__discriminator_value = "CUSTOM_INTERFACE" # type: str + self.__discriminator_value = "ALEXA_SEARCH" # type: str self.object_type = self.__discriminator_value - super(CustomInterface, self).__init__(object_type=self.__discriminator_value) + super(AlexaSearch, self).__init__(object_type=self.__discriminator_value) def to_dict(self): # type: () -> Dict[str, object] @@ -95,7 +93,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, CustomInterface): + if not isinstance(other, AlexaSearch): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/amazon_conversations_dialog_manager.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/amazon_conversations_dialog_manager.py new file mode 100644 index 00000000..bd9892ce --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/amazon_conversations_dialog_manager.py @@ -0,0 +1,106 @@ +# 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_smapi_model.v1.skill.manifest.dialog_manager import DialogManager + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class AMAZONConversationsDialogManager(DialogManager): + """ + The type of dialog manager: * AMAZON.Conversations - The Alexa Conversations (Coltrane) model for this skill. + + + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """The type of dialog manager: * AMAZON.Conversations - The Alexa Conversations (Coltrane) model for this skill. + + """ + self.__discriminator_value = "AMAZON.Conversations" # type: str + + self.object_type = self.__discriminator_value + super(AMAZONConversationsDialogManager, self).__init__(object_type=self.__discriminator_value) + + 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, AMAZONConversationsDialogManager): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/android_common_intent_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/android_common_intent_name.py new file mode 100644 index 00000000..45de54f8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/android_common_intent_name.py @@ -0,0 +1,69 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class AndroidCommonIntentName(Enum): + """ + Supported android common intent. Each of the value maps to a common intent defined in https://developer.android.com/guide/components/intents-common. + + + + Allowed enum values: [SHOW_IN_MAP, ADD_CALENDAR_EVENT, PLAY_MEDIA, START_PHONE_CALL, OPEN_SETTINGS] + """ + SHOW_IN_MAP = "SHOW_IN_MAP" + ADD_CALENDAR_EVENT = "ADD_CALENDAR_EVENT" + PLAY_MEDIA = "PLAY_MEDIA" + START_PHONE_CALL = "START_PHONE_CALL" + OPEN_SETTINGS = "OPEN_SETTINGS" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, AndroidCommonIntentName): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/android_custom_intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/android_custom_intent.py new file mode 100644 index 00000000..5a7f13fc --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/android_custom_intent.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class AndroidCustomIntent(object): + """ + Android custom intent + + + :param component: android component name + :type component: (optional) str + :param action: android intent action + :type action: (optional) str + + """ + deserialized_types = { + 'component': 'str', + 'action': 'str' + } # type: Dict + + attribute_map = { + 'component': 'component', + 'action': 'action' + } # type: Dict + supports_multiple_types = False + + def __init__(self, component=None, action=None): + # type: (Optional[str], Optional[str]) -> None + """Android custom intent + + :param component: android component name + :type component: (optional) str + :param action: android intent action + :type action: (optional) str + """ + self.__discriminator_value = None # type: str + + self.component = component + self.action = action + + 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, AndroidCustomIntent): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/app_link.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/app_link.py new file mode 100644 index 00000000..e31885d3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/app_link.py @@ -0,0 +1,132 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.linked_android_common_intent import LinkedAndroidCommonIntent as LinkedAndroidCommonIntent_f1721a22 + from ask_smapi_model.v1.skill.manifest.linked_common_schemes import LinkedCommonSchemes as LinkedCommonSchemes_14e98c23 + from ask_smapi_model.v1.skill.manifest.linked_application import LinkedApplication as LinkedApplication_85efe66c + + +class AppLink(object): + """ + Details required for app linking use cases. + + + :param linked_applications: Allows developers to declare their Skill will use Alexa App Links, and list relevant apps. This field is required when using the APP_LINK interface. + :type linked_applications: (optional) list[ask_smapi_model.v1.skill.manifest.linked_application.LinkedApplication] + :param linked_web_domains: Allow developer to decalre their skill to link to the declared web domains. + :type linked_web_domains: (optional) list[str] + :param linked_android_common_intents: Allow developer to declare their skill to link to the speicified android common intents. + :type linked_android_common_intents: (optional) list[ask_smapi_model.v1.skill.manifest.linked_android_common_intent.LinkedAndroidCommonIntent] + :param linked_common_schemes: + :type linked_common_schemes: (optional) ask_smapi_model.v1.skill.manifest.linked_common_schemes.LinkedCommonSchemes + + """ + deserialized_types = { + 'linked_applications': 'list[ask_smapi_model.v1.skill.manifest.linked_application.LinkedApplication]', + 'linked_web_domains': 'list[str]', + 'linked_android_common_intents': 'list[ask_smapi_model.v1.skill.manifest.linked_android_common_intent.LinkedAndroidCommonIntent]', + 'linked_common_schemes': 'ask_smapi_model.v1.skill.manifest.linked_common_schemes.LinkedCommonSchemes' + } # type: Dict + + attribute_map = { + 'linked_applications': 'linkedApplications', + 'linked_web_domains': 'linkedWebDomains', + 'linked_android_common_intents': 'linkedAndroidCommonIntents', + 'linked_common_schemes': 'linkedCommonSchemes' + } # type: Dict + supports_multiple_types = False + + def __init__(self, linked_applications=None, linked_web_domains=None, linked_android_common_intents=None, linked_common_schemes=None): + # type: (Optional[List[LinkedApplication_85efe66c]], Optional[List[object]], Optional[List[LinkedAndroidCommonIntent_f1721a22]], Optional[LinkedCommonSchemes_14e98c23]) -> None + """Details required for app linking use cases. + + :param linked_applications: Allows developers to declare their Skill will use Alexa App Links, and list relevant apps. This field is required when using the APP_LINK interface. + :type linked_applications: (optional) list[ask_smapi_model.v1.skill.manifest.linked_application.LinkedApplication] + :param linked_web_domains: Allow developer to decalre their skill to link to the declared web domains. + :type linked_web_domains: (optional) list[str] + :param linked_android_common_intents: Allow developer to declare their skill to link to the speicified android common intents. + :type linked_android_common_intents: (optional) list[ask_smapi_model.v1.skill.manifest.linked_android_common_intent.LinkedAndroidCommonIntent] + :param linked_common_schemes: + :type linked_common_schemes: (optional) ask_smapi_model.v1.skill.manifest.linked_common_schemes.LinkedCommonSchemes + """ + self.__discriminator_value = None # type: str + + self.linked_applications = linked_applications + self.linked_web_domains = linked_web_domains + self.linked_android_common_intents = linked_android_common_intents + self.linked_common_schemes = linked_common_schemes + + 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, AppLink): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/app_link_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/app_link_interface.py new file mode 100644 index 00000000..9470a405 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/app_link_interface.py @@ -0,0 +1,104 @@ +# 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_smapi_model.v1.skill.manifest.interface import Interface + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class AppLinkInterface(Interface): + """ + + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """ + + """ + self.__discriminator_value = "APP_LINKS" # type: str + + self.object_type = self.__discriminator_value + super(AppLinkInterface, self).__init__(object_type=self.__discriminator_value) + + 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, AppLinkInterface): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/app_link_v2_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/app_link_v2_interface.py new file mode 100644 index 00000000..5ad62962 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/app_link_v2_interface.py @@ -0,0 +1,104 @@ +# 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_smapi_model.v1.skill.manifest.interface import Interface + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class AppLinkV2Interface(Interface): + """ + + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """ + + """ + self.__discriminator_value = "APP_LINKS_V2" # type: str + + self.object_type = self.__discriminator_value + super(AppLinkV2Interface, self).__init__(object_type=self.__discriminator_value) + + 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, AppLinkV2Interface): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/audio_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/audio_interface.py index a929f9ca..9e351629 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/audio_interface.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/audio_interface.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client.py new file mode 100644 index 00000000..ba324db1 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client.py @@ -0,0 +1,108 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class AuthorizedClient(object): + """ + Defines a client authorized for a skill. + + + :param authentication_provider: + :type authentication_provider: (optional) str + + """ + deserialized_types = { + 'authentication_provider': 'str' + } # type: Dict + + attribute_map = { + 'authentication_provider': 'authenticationProvider' + } # type: Dict + supports_multiple_types = False + + def __init__(self, authentication_provider=None): + # type: (Optional[str]) -> None + """Defines a client authorized for a skill. + + :param authentication_provider: + :type authentication_provider: (optional) str + """ + self.__discriminator_value = None # type: str + + self.authentication_provider = authentication_provider + + 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, AuthorizedClient): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client_lwa.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client_lwa.py new file mode 100644 index 00000000..bdcb200c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client_lwa.py @@ -0,0 +1,117 @@ +# 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_smapi_model.v1.skill.manifest.authorized_client import AuthorizedClient + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.authorized_client_lwa_application import AuthorizedClientLwaApplication as AuthorizedClientLwaApplication_39c79ff0 + + +class AuthorizedClientLwa(AuthorizedClient): + """ + Defines client using Login With Amazon authentication provider, corresponds to LWA Security Profile. + + + :param authentication_provider: + :type authentication_provider: (optional) str + :param applications: + :type applications: (optional) list[ask_smapi_model.v1.skill.manifest.authorized_client_lwa_application.AuthorizedClientLwaApplication] + + """ + deserialized_types = { + 'authentication_provider': 'str', + 'applications': 'list[ask_smapi_model.v1.skill.manifest.authorized_client_lwa_application.AuthorizedClientLwaApplication]' + } # type: Dict + + attribute_map = { + 'authentication_provider': 'authenticationProvider', + 'applications': 'applications' + } # type: Dict + supports_multiple_types = False + + def __init__(self, authentication_provider=None, applications=None): + # type: (Optional[str], Optional[List[AuthorizedClientLwaApplication_39c79ff0]]) -> None + """Defines client using Login With Amazon authentication provider, corresponds to LWA Security Profile. + + :param authentication_provider: + :type authentication_provider: (optional) str + :param applications: + :type applications: (optional) list[ask_smapi_model.v1.skill.manifest.authorized_client_lwa_application.AuthorizedClientLwaApplication] + """ + self.__discriminator_value = None # type: str + + super(AuthorizedClientLwa, self).__init__(authentication_provider=authentication_provider) + self.applications = applications + + 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, AuthorizedClientLwa): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_intent_slot.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client_lwa_application.py similarity index 86% rename from ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_intent_slot.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client_lwa_application.py index f296c200..cc741204 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_intent_slot.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client_lwa_application.py @@ -21,42 +21,37 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class ConflictIntentSlot(object): +class AuthorizedClientLwaApplication(object): """ + Defines an application for LWA security profile. + - :param value: - :type value: (optional) str :param object_type: :type object_type: (optional) str """ deserialized_types = { - 'value': 'str', 'object_type': 'str' } # type: Dict attribute_map = { - 'value': 'value', 'object_type': 'type' } # type: Dict supports_multiple_types = False - def __init__(self, value=None, object_type=None): - # type: (Optional[str], Optional[str]) -> None - """ + def __init__(self, object_type=None): + # type: (Optional[str]) -> None + """Defines an application for LWA security profile. - :param value: - :type value: (optional) str :param object_type: :type object_type: (optional) str """ self.__discriminator_value = None # type: str - self.value = value self.object_type = object_type def to_dict(self): @@ -102,7 +97,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, ConflictIntentSlot): + if not isinstance(other, AuthorizedClientLwaApplication): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client_lwa_application_android.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client_lwa_application_android.py new file mode 100644 index 00000000..e78d2cb0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/authorized_client_lwa_application_android.py @@ -0,0 +1,123 @@ +# 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_smapi_model.v1.skill.manifest.authorized_client_lwa_application import AuthorizedClientLwaApplication + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class AuthorizedClientLwaApplicationAndroid(AuthorizedClientLwaApplication): + """ + Defines an android application for LWA authentication provider. + + + :param object_type: + :type object_type: (optional) str + :param app_store_app_id: + :type app_store_app_id: (optional) str + :param client_id: + :type client_id: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'app_store_app_id': 'str', + 'client_id': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'app_store_app_id': 'appStoreAppId', + 'client_id': 'clientId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, app_store_app_id=None, client_id=None): + # type: (Optional[str], Optional[str], Optional[str]) -> None + """Defines an android application for LWA authentication provider. + + :param object_type: + :type object_type: (optional) str + :param app_store_app_id: + :type app_store_app_id: (optional) str + :param client_id: + :type client_id: (optional) str + """ + self.__discriminator_value = None # type: str + + super(AuthorizedClientLwaApplicationAndroid, self).__init__(object_type=object_type) + self.app_store_app_id = app_store_app_id + self.client_id = client_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, AuthorizedClientLwaApplicationAndroid): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/automatic_cloned_locale.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/automatic_cloned_locale.py new file mode 100644 index 00000000..0e2b5aa8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/automatic_cloned_locale.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.locales_by_automatic_cloned_locale import LocalesByAutomaticClonedLocale as LocalesByAutomaticClonedLocale_4ad48a75 + + +class AutomaticClonedLocale(object): + """ + Defines the structure for Sync Locales in the skill manifest. This is an optional property and Sync Locales will be disabled if not set. + + + :param locales: List of language specific source locale to target locales mapping. + :type locales: (optional) list[ask_smapi_model.v1.skill.manifest.locales_by_automatic_cloned_locale.LocalesByAutomaticClonedLocale] + + """ + deserialized_types = { + 'locales': 'list[ask_smapi_model.v1.skill.manifest.locales_by_automatic_cloned_locale.LocalesByAutomaticClonedLocale]' + } # type: Dict + + attribute_map = { + 'locales': 'locales' + } # type: Dict + supports_multiple_types = False + + def __init__(self, locales=None): + # type: (Optional[List[LocalesByAutomaticClonedLocale_4ad48a75]]) -> None + """Defines the structure for Sync Locales in the skill manifest. This is an optional property and Sync Locales will be disabled if not set. + + :param locales: List of language specific source locale to target locales mapping. + :type locales: (optional) list[ask_smapi_model.v1.skill.manifest.locales_by_automatic_cloned_locale.LocalesByAutomaticClonedLocale] + """ + self.__discriminator_value = None # type: str + + self.locales = locales + + 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, AutomaticClonedLocale): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/automatic_distribution.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/automatic_distribution.py new file mode 100644 index 00000000..a365d428 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/automatic_distribution.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.source_language_for_locales import SourceLanguageForLocales as SourceLanguageForLocales_eb9c404a + + +class AutomaticDistribution(object): + """ + optional. Used by developer to opt in to Automatic Skill Distribution, a feature where a skill will automatically be published in new eligible locales from the same language (e.g. from \"en-US\" to \"en-CA\" and \"en-GB\"). Locales that the developer has already created will not be overwritten. + + + :param is_active: set to true to opt in to Automatic Skill Distribution. If false, then the skill will not be considered for Automatic Skill Distribution. Note that once a skill has gone through the automatic distribution process and this value is later set to false, any locales that were published through this feature will not be reverted. Any published locales will need to be suppressed manually via contacting DAG. + :type is_active: (optional) bool + :param source_locale_for_languages: list of items pairing a language with a source locale. Required if isActive is set to true. For each language there must be exactly one source locale. + :type source_locale_for_languages: (optional) list[ask_smapi_model.v1.skill.manifest.source_language_for_locales.SourceLanguageForLocales] + + """ + deserialized_types = { + 'is_active': 'bool', + 'source_locale_for_languages': 'list[ask_smapi_model.v1.skill.manifest.source_language_for_locales.SourceLanguageForLocales]' + } # type: Dict + + attribute_map = { + 'is_active': 'isActive', + 'source_locale_for_languages': 'sourceLocaleForLanguages' + } # type: Dict + supports_multiple_types = False + + def __init__(self, is_active=None, source_locale_for_languages=None): + # type: (Optional[bool], Optional[List[SourceLanguageForLocales_eb9c404a]]) -> None + """optional. Used by developer to opt in to Automatic Skill Distribution, a feature where a skill will automatically be published in new eligible locales from the same language (e.g. from \"en-US\" to \"en-CA\" and \"en-GB\"). Locales that the developer has already created will not be overwritten. + + :param is_active: set to true to opt in to Automatic Skill Distribution. If false, then the skill will not be considered for Automatic Skill Distribution. Note that once a skill has gone through the automatic distribution process and this value is later set to false, any locales that were published through this feature will not be reverted. Any published locales will need to be suppressed manually via contacting DAG. + :type is_active: (optional) bool + :param source_locale_for_languages: list of items pairing a language with a source locale. Required if isActive is set to true. For each language there must be exactly one source locale. + :type source_locale_for_languages: (optional) list[ask_smapi_model.v1.skill.manifest.source_language_for_locales.SourceLanguageForLocales] + """ + self.__discriminator_value = None # type: str + + self.is_active = is_active + self.source_locale_for_languages = source_locale_for_languages + + 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, AutomaticDistribution): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/catalog_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/catalog_info.py new file mode 100644 index 00000000..c6e5230d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/catalog_info.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.catalog_type import CatalogType as CatalogType_4ef0ccde + + +class CatalogInfo(object): + """ + Details about how the app is listed on app store catalogs. + + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.manifest.catalog_type.CatalogType + :param identifier: Identifier when accessing app in store. + :type identifier: (optional) str + + """ + deserialized_types = { + 'object_type': 'ask_smapi_model.v1.skill.manifest.catalog_type.CatalogType', + 'identifier': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'identifier': 'identifier' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, identifier=None): + # type: (Optional[CatalogType_4ef0ccde], Optional[str]) -> None + """Details about how the app is listed on app store catalogs. + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.manifest.catalog_type.CatalogType + :param identifier: Identifier when accessing app in store. + :type identifier: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.identifier = identifier + + 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, CatalogInfo): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/catalog_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/catalog_name.py new file mode 100644 index 00000000..025775ee --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/catalog_name.py @@ -0,0 +1,64 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class CatalogName(Enum): + """ + + + Allowed enum values: [IOS_APP_STORE, GOOGLE_PLAY_STORE] + """ + IOS_APP_STORE = "IOS_APP_STORE" + GOOGLE_PLAY_STORE = "GOOGLE_PLAY_STORE" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, CatalogName): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/catalog_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/catalog_type.py new file mode 100644 index 00000000..1feb2fed --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/catalog_type.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class CatalogType(Enum): + """ + Supported catalog + + + + Allowed enum values: [IOS_APP_STORE, GOOGLE_PLAY_STORE] + """ + IOS_APP_STORE = "IOS_APP_STORE" + GOOGLE_PLAY_STORE = "GOOGLE_PLAY_STORE" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, CatalogType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/connections_payload.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/connections_payload.py index 27a7fbf7..9baf9f51 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/connections_payload.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/connections_payload.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/currency.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/currency.py new file mode 100644 index 00000000..a78ff614 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/currency.py @@ -0,0 +1,65 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Currency(Enum): + """ + Currency to use for paid skill product. + + + + Allowed enum values: [USD] + """ + USD = "USD" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, Currency): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/__init__.py similarity index 54% rename from ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/__init__.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/__init__.py index 66937dba..a9aa7aaf 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/__init__.py @@ -14,12 +14,8 @@ # from __future__ import absolute_import -from .get_conflicts_response_result import GetConflictsResponseResult -from .pagination_context import PaginationContext -from .conflict_result import ConflictResult -from .get_conflicts_response import GetConflictsResponse -from .conflict_intent_slot import ConflictIntentSlot -from .get_conflict_detection_job_status_response import GetConflictDetectionJobStatusResponse -from .conflict_intent import ConflictIntent -from .conflict_detection_job_status import ConflictDetectionJobStatus -from .paged_response import PagedResponse +from .suppressed_interface import SuppressedInterface +from .target_runtime import TargetRuntime +from .connection import Connection +from .target_runtime_type import TargetRuntimeType +from .target_runtime_device import TargetRuntimeDevice diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/connections.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/connection.py similarity index 93% rename from ask-smapi-model/ask_smapi_model/v1/skill/manifest/connections.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/connection.py index 2642169d..2003fb8c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/connections.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/connection.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.connections_payload import ConnectionsPayloadV1 + from ask_smapi_model.v1.skill.manifest.connections_payload import ConnectionsPayload as ConnectionsPayload_8d7b13bc -class Connections(object): +class Connection(object): """ Skill connection object. @@ -49,7 +49,7 @@ class Connections(object): supports_multiple_types = False def __init__(self, name=None, payload=None): - # type: (Optional[str], Optional[ConnectionsPayloadV1]) -> None + # type: (Optional[str], Optional[ConnectionsPayload_8d7b13bc]) -> None """Skill connection object. :param name: Name of the connection. @@ -105,7 +105,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, Connections): + if not isinstance(other, Connection): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/suppressed_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/suppressed_interface.py new file mode 100644 index 00000000..91ebf828 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/suppressed_interface.py @@ -0,0 +1,78 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SuppressedInterface(Enum): + """ + + + Allowed enum values: [AudioPlayer, PlaybackController, Display, VideoPlayer, GameEngine, GadgetController, CanHandleIntentRequest, CanFulfillIntentRequest, AlexaPresentationApl, AlexaPresentationHtml, AlexaDataStore, PhotoCaptureController, VideoCaptureController, UploadController, CustomInterface, AlexaAugmentationEffectsController] + """ + AudioPlayer = "AudioPlayer" + PlaybackController = "PlaybackController" + Display = "Display" + VideoPlayer = "VideoPlayer" + GameEngine = "GameEngine" + GadgetController = "GadgetController" + CanHandleIntentRequest = "CanHandleIntentRequest" + CanFulfillIntentRequest = "CanFulfillIntentRequest" + AlexaPresentationApl = "AlexaPresentationApl" + AlexaPresentationHtml = "AlexaPresentationHtml" + AlexaDataStore = "AlexaDataStore" + PhotoCaptureController = "PhotoCaptureController" + VideoCaptureController = "VideoCaptureController" + UploadController = "UploadController" + CustomInterface = "CustomInterface" + AlexaAugmentationEffectsController = "AlexaAugmentationEffectsController" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SuppressedInterface): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/target_runtime.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/target_runtime.py new file mode 100644 index 00000000..814901bd --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/target_runtime.py @@ -0,0 +1,132 @@ +# 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 abc import ABCMeta, abstractmethod + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class TargetRuntime(object): + """ + Discriminator for target runtime objects. + + + :param object_type: + :type object_type: (optional) str + + .. note:: + + This is an abstract class. Use the following mapping, to figure out + the model class to be instantiated, that sets ``type`` variable. + + | DEVICE: :py:class:`ask_smapi_model.v1.skill.manifest.custom.target_runtime_device.TargetRuntimeDevice` + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'DEVICE': 'ask_smapi_model.v1.skill.manifest.custom.target_runtime_device.TargetRuntimeDevice' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None): + # type: (Optional[str]) -> None + """Discriminator for target runtime objects. + + :param object_type: + :type object_type: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + + @classmethod + def get_real_child_model(cls, data): + # type: (Dict[str, str]) -> Optional[str] + """Returns the real base class specified by the discriminator""" + discriminator_value = data[cls.json_discriminator_key] + return cls.discriminator_value_class_map.get(discriminator_value) + + 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, TargetRuntime): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/custom/target_runtime_device.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/target_runtime_device.py new file mode 100644 index 00000000..7ba7bd4a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/target_runtime_device.py @@ -0,0 +1,106 @@ +# 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_smapi_model.v1.skill.manifest.custom.target_runtime import TargetRuntime + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class TargetRuntimeDevice(TargetRuntime): + """ + The type of target runtime. + + + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """The type of target runtime. + + """ + self.__discriminator_value = "DEVICE" # type: str + + self.object_type = self.__discriminator_value + super(TargetRuntimeDevice, self).__init__(object_type=self.__discriminator_value) + + 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, TargetRuntimeDevice): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/health_protocol_version.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/target_runtime_type.py similarity index 82% rename from ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_protocol_version.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/target_runtime_type.py index 9c7817b3..70995183 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_protocol_version.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom/target_runtime_type.py @@ -21,21 +21,20 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class HealthProtocolVersion(Enum): +class TargetRuntimeType(Enum): """ - Allowed enum values: [_1, _2] + Allowed enum values: [DEVICE] """ - _1 = "1" - _2 = "2" + DEVICE = "DEVICE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -51,14 +50,14 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" - if not isinstance(other, HealthProtocolVersion): + if not isinstance(other, TargetRuntimeType): return False return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_apis.py index 7b146c58..180e3822 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_apis.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_apis.py @@ -21,13 +21,17 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.interface import InterfaceV1 - from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpointV1 - from ask_smapi_model.v1.skill.manifest.custom_connections import CustomConnectionsV1 - from ask_smapi_model.v1.skill.manifest.region import RegionV1 - from ask_smapi_model.v1.skill.manifest.skill_manifest_custom_task import SkillManifestCustomTaskV1 + from ask_smapi_model.v1.skill.manifest.custom_localized_information import CustomLocalizedInformation as CustomLocalizedInformation_a617b7bd + from ask_smapi_model.v1.skill.manifest.interface import Interface as Interface_1e4dc7ab + from ask_smapi_model.v1.skill.manifest.app_link import AppLink as AppLink_db0195e + from ask_smapi_model.v1.skill.manifest.custom_task import CustomTask as CustomTask_647aa58a + from ask_smapi_model.v1.skill.manifest.dialog_management import DialogManagement as DialogManagement_340237b8 + from ask_smapi_model.v1.skill.manifest.custom.target_runtime import TargetRuntime as TargetRuntime_ab65c587 + from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpoint as SkillManifestEndpoint_b30bcc05 + from ask_smapi_model.v1.skill.manifest.region import Region as Region_10de9595 + from ask_smapi_model.v1.skill.manifest.custom_connections import CustomConnections as CustomConnections_1f24e36 class CustomApis(object): @@ -35,6 +39,10 @@ class CustomApis(object): Defines the structure for custom api of the skill. + :param target_runtimes: Defines the set of target runtimes for this skill. + :type target_runtimes: (optional) list[ask_smapi_model.v1.skill.manifest.custom.target_runtime.TargetRuntime] + :param locales: Object that contains <locale> Objects for each supported locale. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.custom_localized_information.CustomLocalizedInformation) :param regions: Contains an array of the supported <region> Objects. :type regions: (optional) dict(str, ask_smapi_model.v1.skill.manifest.region.Region) :param endpoint: @@ -42,32 +50,48 @@ class CustomApis(object): :param interfaces: Defines the structure for interfaces supported by the custom api of the skill. :type interfaces: (optional) list[ask_smapi_model.v1.skill.manifest.interface.Interface] :param tasks: List of provided tasks. - :type tasks: (optional) list[ask_smapi_model.v1.skill.manifest.skill_manifest_custom_task.SkillManifestCustomTask] + :type tasks: (optional) list[ask_smapi_model.v1.skill.manifest.custom_task.CustomTask] :param connections: :type connections: (optional) ask_smapi_model.v1.skill.manifest.custom_connections.CustomConnections + :param dialog_management: + :type dialog_management: (optional) ask_smapi_model.v1.skill.manifest.dialog_management.DialogManagement + :param app_link: + :type app_link: (optional) ask_smapi_model.v1.skill.manifest.app_link.AppLink """ deserialized_types = { + 'target_runtimes': 'list[ask_smapi_model.v1.skill.manifest.custom.target_runtime.TargetRuntime]', + 'locales': 'dict(str, ask_smapi_model.v1.skill.manifest.custom_localized_information.CustomLocalizedInformation)', 'regions': 'dict(str, ask_smapi_model.v1.skill.manifest.region.Region)', 'endpoint': 'ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint', 'interfaces': 'list[ask_smapi_model.v1.skill.manifest.interface.Interface]', - 'tasks': 'list[ask_smapi_model.v1.skill.manifest.skill_manifest_custom_task.SkillManifestCustomTask]', - 'connections': 'ask_smapi_model.v1.skill.manifest.custom_connections.CustomConnections' + 'tasks': 'list[ask_smapi_model.v1.skill.manifest.custom_task.CustomTask]', + 'connections': 'ask_smapi_model.v1.skill.manifest.custom_connections.CustomConnections', + 'dialog_management': 'ask_smapi_model.v1.skill.manifest.dialog_management.DialogManagement', + 'app_link': 'ask_smapi_model.v1.skill.manifest.app_link.AppLink' } # type: Dict attribute_map = { + 'target_runtimes': '_targetRuntimes', + 'locales': 'locales', 'regions': 'regions', 'endpoint': 'endpoint', 'interfaces': 'interfaces', 'tasks': 'tasks', - 'connections': 'connections' + 'connections': 'connections', + 'dialog_management': 'dialogManagement', + 'app_link': 'appLink' } # type: Dict supports_multiple_types = False - def __init__(self, regions=None, endpoint=None, interfaces=None, tasks=None, connections=None): - # type: (Optional[Dict[str, RegionV1]], Optional[SkillManifestEndpointV1], Optional[List[InterfaceV1]], Optional[List[SkillManifestCustomTaskV1]], Optional[CustomConnectionsV1]) -> None + def __init__(self, target_runtimes=None, locales=None, regions=None, endpoint=None, interfaces=None, tasks=None, connections=None, dialog_management=None, app_link=None): + # type: (Optional[List[TargetRuntime_ab65c587]], Optional[Dict[str, CustomLocalizedInformation_a617b7bd]], Optional[Dict[str, Region_10de9595]], Optional[SkillManifestEndpoint_b30bcc05], Optional[List[Interface_1e4dc7ab]], Optional[List[CustomTask_647aa58a]], Optional[CustomConnections_1f24e36], Optional[DialogManagement_340237b8], Optional[AppLink_db0195e]) -> None """Defines the structure for custom api of the skill. + :param target_runtimes: Defines the set of target runtimes for this skill. + :type target_runtimes: (optional) list[ask_smapi_model.v1.skill.manifest.custom.target_runtime.TargetRuntime] + :param locales: Object that contains <locale> Objects for each supported locale. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.custom_localized_information.CustomLocalizedInformation) :param regions: Contains an array of the supported <region> Objects. :type regions: (optional) dict(str, ask_smapi_model.v1.skill.manifest.region.Region) :param endpoint: @@ -75,17 +99,25 @@ def __init__(self, regions=None, endpoint=None, interfaces=None, tasks=None, con :param interfaces: Defines the structure for interfaces supported by the custom api of the skill. :type interfaces: (optional) list[ask_smapi_model.v1.skill.manifest.interface.Interface] :param tasks: List of provided tasks. - :type tasks: (optional) list[ask_smapi_model.v1.skill.manifest.skill_manifest_custom_task.SkillManifestCustomTask] + :type tasks: (optional) list[ask_smapi_model.v1.skill.manifest.custom_task.CustomTask] :param connections: :type connections: (optional) ask_smapi_model.v1.skill.manifest.custom_connections.CustomConnections + :param dialog_management: + :type dialog_management: (optional) ask_smapi_model.v1.skill.manifest.dialog_management.DialogManagement + :param app_link: + :type app_link: (optional) ask_smapi_model.v1.skill.manifest.app_link.AppLink """ self.__discriminator_value = None # type: str + self.target_runtimes = target_runtimes + self.locales = locales self.regions = regions self.endpoint = endpoint self.interfaces = interfaces self.tasks = tasks self.connections = connections + self.dialog_management = dialog_management + self.app_link = app_link def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_connections.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_connections.py index a0693f55..ff4a7c45 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_connections.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_connections.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.connections import ConnectionsV1 + from ask_smapi_model.v1.skill.manifest.custom.connection import Connection as Connection_199ae82a class CustomConnections(object): @@ -32,14 +32,14 @@ class CustomConnections(object): :param requires: List of required connections. - :type requires: (optional) list[ask_smapi_model.v1.skill.manifest.connections.Connections] + :type requires: (optional) list[ask_smapi_model.v1.skill.manifest.custom.connection.Connection] :param provides: List of provided connections. - :type provides: (optional) list[ask_smapi_model.v1.skill.manifest.connections.Connections] + :type provides: (optional) list[ask_smapi_model.v1.skill.manifest.custom.connection.Connection] """ deserialized_types = { - 'requires': 'list[ask_smapi_model.v1.skill.manifest.connections.Connections]', - 'provides': 'list[ask_smapi_model.v1.skill.manifest.connections.Connections]' + 'requires': 'list[ask_smapi_model.v1.skill.manifest.custom.connection.Connection]', + 'provides': 'list[ask_smapi_model.v1.skill.manifest.custom.connection.Connection]' } # type: Dict attribute_map = { @@ -49,13 +49,13 @@ class CustomConnections(object): supports_multiple_types = False def __init__(self, requires=None, provides=None): - # type: (Optional[List[ConnectionsV1]], Optional[List[ConnectionsV1]]) -> None + # type: (Optional[List[Connection_199ae82a]], Optional[List[Connection_199ae82a]]) -> None """Supported connections. :param requires: List of required connections. - :type requires: (optional) list[ask_smapi_model.v1.skill.manifest.connections.Connections] + :type requires: (optional) list[ask_smapi_model.v1.skill.manifest.custom.connection.Connection] :param provides: List of provided connections. - :type provides: (optional) list[ask_smapi_model.v1.skill.manifest.connections.Connections] + :type provides: (optional) list[ask_smapi_model.v1.skill.manifest.custom.connection.Connection] """ self.__discriminator_value = None # type: str diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_dialog_management/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_dialog_management/__init__.py new file mode 100644 index 00000000..7b08cbdf --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_dialog_management/__init__.py @@ -0,0 +1,17 @@ +# 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. +# +from __future__ import absolute_import + +from .session_start_delegation_strategy import SessionStartDelegationStrategy diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_dialog_management/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_dialog_management/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_dialog_management/session_start_delegation_strategy.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_dialog_management/session_start_delegation_strategy.py new file mode 100644 index 00000000..30e2d647 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_dialog_management/session_start_delegation_strategy.py @@ -0,0 +1,108 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SessionStartDelegationStrategy(object): + """ + Specifies the initial dialog manager to field requests when a new skill session starts. If absent, this is assumed to be the default \"skill\" target + + + :param target: + :type target: (optional) str + + """ + deserialized_types = { + 'target': 'str' + } # type: Dict + + attribute_map = { + 'target': 'target' + } # type: Dict + supports_multiple_types = False + + def __init__(self, target=None): + # type: (Optional[str]) -> None + """Specifies the initial dialog manager to field requests when a new skill session starts. If absent, this is assumed to be the default \"skill\" target + + :param target: + :type target: (optional) str + """ + self.__discriminator_value = None # type: str + + self.target = target + + 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, SessionStartDelegationStrategy): + 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-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/update_asr_annotation_set_contents_payload.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_localized_information.py similarity index 68% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/update_asr_annotation_set_contents_payload.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_localized_information.py index 68232410..e21da922 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/update_asr_annotation_set_contents_payload.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_localized_information.py @@ -21,39 +21,39 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.asr.annotation_sets.annotation import AnnotationV1 + from ask_smapi_model.v1.skill.manifest.custom_localized_information_dialog_management import CustomLocalizedInformationDialogManagement as CustomLocalizedInformationDialogManagement_c0a2884d -class UpdateAsrAnnotationSetContentsPayload(object): +class CustomLocalizedInformation(object): """ - This is the payload shema for updating asr annotation set contents. Note for text/csv content type, the csv header definitions need to follow the properties of '#/definitions/Annotaion' + Defines the localized custom api information. - :param annotations: - :type annotations: (optional) list[ask_smapi_model.v1.skill.asr.annotation_sets.annotation.Annotation] + :param dialog_management: + :type dialog_management: (optional) ask_smapi_model.v1.skill.manifest.custom_localized_information_dialog_management.CustomLocalizedInformationDialogManagement """ deserialized_types = { - 'annotations': 'list[ask_smapi_model.v1.skill.asr.annotation_sets.annotation.Annotation]' + 'dialog_management': 'ask_smapi_model.v1.skill.manifest.custom_localized_information_dialog_management.CustomLocalizedInformationDialogManagement' } # type: Dict attribute_map = { - 'annotations': 'annotations' + 'dialog_management': 'dialogManagement' } # type: Dict supports_multiple_types = False - def __init__(self, annotations=None): - # type: (Optional[List[AnnotationV1]]) -> None - """This is the payload shema for updating asr annotation set contents. Note for text/csv content type, the csv header definitions need to follow the properties of '#/definitions/Annotaion' + def __init__(self, dialog_management=None): + # type: (Optional[CustomLocalizedInformationDialogManagement_c0a2884d]) -> None + """Defines the localized custom api information. - :param annotations: - :type annotations: (optional) list[ask_smapi_model.v1.skill.asr.annotation_sets.annotation.Annotation] + :param dialog_management: + :type dialog_management: (optional) ask_smapi_model.v1.skill.manifest.custom_localized_information_dialog_management.CustomLocalizedInformationDialogManagement """ self.__discriminator_value = None # type: str - self.annotations = annotations + self.dialog_management = dialog_management def to_dict(self): # type: () -> Dict[str, object] @@ -98,7 +98,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, UpdateAsrAnnotationSetContentsPayload): + if not isinstance(other, CustomLocalizedInformation): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_localized_information_dialog_management.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_localized_information_dialog_management.py new file mode 100644 index 00000000..02978198 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_localized_information_dialog_management.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.custom_dialog_management.session_start_delegation_strategy import SessionStartDelegationStrategy as SessionStartDelegationStrategy_b0dc02da + + +class CustomLocalizedInformationDialogManagement(object): + """ + Defines locale-specific dialog-management configuration for a skill. + + + :param session_start_delegation_strategy: + :type session_start_delegation_strategy: (optional) ask_smapi_model.v1.skill.manifest.custom_dialog_management.session_start_delegation_strategy.SessionStartDelegationStrategy + + """ + deserialized_types = { + 'session_start_delegation_strategy': 'ask_smapi_model.v1.skill.manifest.custom_dialog_management.session_start_delegation_strategy.SessionStartDelegationStrategy' + } # type: Dict + + attribute_map = { + 'session_start_delegation_strategy': 'sessionStartDelegationStrategy' + } # type: Dict + supports_multiple_types = False + + def __init__(self, session_start_delegation_strategy=None): + # type: (Optional[SessionStartDelegationStrategy_b0dc02da]) -> None + """Defines locale-specific dialog-management configuration for a skill. + + :param session_start_delegation_strategy: + :type session_start_delegation_strategy: (optional) ask_smapi_model.v1.skill.manifest.custom_dialog_management.session_start_delegation_strategy.SessionStartDelegationStrategy + """ + self.__discriminator_value = None # type: str + + self.session_start_delegation_strategy = session_start_delegation_strategy + + 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, CustomLocalizedInformationDialogManagement): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/custom_product_prompts.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_product_prompts.py new file mode 100644 index 00000000..b6fdade9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_product_prompts.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class CustomProductPrompts(object): + """ + Custom prompts used for paid skill product purchasing options. Supports Speech Synthesis Markup Language (SSML), which can be used to control pronunciation, intonation, timing, and emotion. + + + :param purchase_prompt_description: Description of the paid skill product heard before customer is prompted for purchase. + :type purchase_prompt_description: (optional) str + :param purchase_confirmation_description: Description of the paid skill product that displays when the paid skill is purchased. + :type purchase_confirmation_description: (optional) str + + """ + deserialized_types = { + 'purchase_prompt_description': 'str', + 'purchase_confirmation_description': 'str' + } # type: Dict + + attribute_map = { + 'purchase_prompt_description': 'purchasePromptDescription', + 'purchase_confirmation_description': 'purchaseConfirmationDescription' + } # type: Dict + supports_multiple_types = False + + def __init__(self, purchase_prompt_description=None, purchase_confirmation_description=None): + # type: (Optional[str], Optional[str]) -> None + """Custom prompts used for paid skill product purchasing options. Supports Speech Synthesis Markup Language (SSML), which can be used to control pronunciation, intonation, timing, and emotion. + + :param purchase_prompt_description: Description of the paid skill product heard before customer is prompted for purchase. + :type purchase_prompt_description: (optional) str + :param purchase_confirmation_description: Description of the paid skill product that displays when the paid skill is purchased. + :type purchase_confirmation_description: (optional) str + """ + self.__discriminator_value = None # type: str + + self.purchase_prompt_description = purchase_prompt_description + self.purchase_confirmation_description = purchase_confirmation_description + + 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, CustomProductPrompts): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_custom_task.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_task.py similarity index 95% rename from ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_custom_task.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_task.py index 98e13e24..16a9eed2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_custom_task.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_task.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class SkillManifestCustomTask(object): +class CustomTask(object): """ Defines the name and version of the task that the skill wants to handle. @@ -104,7 +104,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, SkillManifestCustomTask): + if not isinstance(other, CustomTask): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/data_store_package.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/data_store_package.py new file mode 100644 index 00000000..0e621e0d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/data_store_package.py @@ -0,0 +1,108 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class DataStorePackage(object): + """ + Represents a DataStore package authored by skill developer. This contains a reference to the DataStore package and doesn't contain the entire package itself. + + + :param id: The identifier for the DataStore package. + :type id: (optional) str + + """ + deserialized_types = { + 'id': 'str' + } # type: Dict + + attribute_map = { + 'id': 'id' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None): + # type: (Optional[str]) -> None + """Represents a DataStore package authored by skill developer. This contains a reference to the DataStore package and doesn't contain the entire package itself. + + :param id: The identifier for the DataStore package. + :type id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.id = 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, DataStorePackage): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/health_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/demand_response_apis.py similarity index 61% rename from ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_apis.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/demand_response_apis.py index 739ab69d..e1bf85d8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_apis.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/demand_response_apis.py @@ -21,63 +21,54 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpointV1 - from ask_smapi_model.v1.skill.manifest.region import RegionV1 - from ask_smapi_model.v1.skill.manifest.health_protocol_version import HealthProtocolVersionV1 - from ask_smapi_model.v1.skill.manifest.health_interface import HealthInterfaceV1 + from ask_smapi_model.v1.skill.manifest.lambda_region import LambdaRegion as LambdaRegion_3e305f16 + from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpoint as LambdaEndpoint_87e61436 -class HealthApis(object): +class DemandResponseApis(object): """ - Defines the structure of health api in the skill manifest. + Defines the structure for demand response api of the skill. :param regions: Contains an array of the supported <region> Objects. - :type regions: (optional) dict(str, ask_smapi_model.v1.skill.manifest.region.Region) + :type regions: (optional) dict(str, ask_smapi_model.v1.skill.manifest.lambda_region.LambdaRegion) :param endpoint: - :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint - :param protocol_version: - :type protocol_version: (optional) ask_smapi_model.v1.skill.manifest.health_protocol_version.HealthProtocolVersion - :param interfaces: - :type interfaces: (optional) ask_smapi_model.v1.skill.manifest.health_interface.HealthInterface + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint + :param enrollment_url: Defines the url for enrolling into a demand response program. + :type enrollment_url: (optional) str """ deserialized_types = { - 'regions': 'dict(str, ask_smapi_model.v1.skill.manifest.region.Region)', - 'endpoint': 'ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint', - 'protocol_version': 'ask_smapi_model.v1.skill.manifest.health_protocol_version.HealthProtocolVersion', - 'interfaces': 'ask_smapi_model.v1.skill.manifest.health_interface.HealthInterface' + 'regions': 'dict(str, ask_smapi_model.v1.skill.manifest.lambda_region.LambdaRegion)', + 'endpoint': 'ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint', + 'enrollment_url': 'str' } # type: Dict attribute_map = { 'regions': 'regions', 'endpoint': 'endpoint', - 'protocol_version': 'protocolVersion', - 'interfaces': 'interfaces' + 'enrollment_url': 'enrollmentUrl' } # type: Dict supports_multiple_types = False - def __init__(self, regions=None, endpoint=None, protocol_version=None, interfaces=None): - # type: (Optional[Dict[str, RegionV1]], Optional[SkillManifestEndpointV1], Optional[HealthProtocolVersionV1], Optional[HealthInterfaceV1]) -> None - """Defines the structure of health api in the skill manifest. + def __init__(self, regions=None, endpoint=None, enrollment_url=None): + # type: (Optional[Dict[str, LambdaRegion_3e305f16]], Optional[LambdaEndpoint_87e61436], Optional[str]) -> None + """Defines the structure for demand response api of the skill. :param regions: Contains an array of the supported <region> Objects. - :type regions: (optional) dict(str, ask_smapi_model.v1.skill.manifest.region.Region) + :type regions: (optional) dict(str, ask_smapi_model.v1.skill.manifest.lambda_region.LambdaRegion) :param endpoint: - :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint - :param protocol_version: - :type protocol_version: (optional) ask_smapi_model.v1.skill.manifest.health_protocol_version.HealthProtocolVersion - :param interfaces: - :type interfaces: (optional) ask_smapi_model.v1.skill.manifest.health_interface.HealthInterface + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint + :param enrollment_url: Defines the url for enrolling into a demand response program. + :type enrollment_url: (optional) str """ self.__discriminator_value = None # type: str self.regions = regions self.endpoint = endpoint - self.protocol_version = protocol_version - self.interfaces = interfaces + self.enrollment_url = enrollment_url def to_dict(self): # type: () -> Dict[str, object] @@ -122,7 +113,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, HealthApis): + if not isinstance(other, DemandResponseApis): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/update_asr_annotation_set_properties_request_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/dialog_delegation_strategy.py similarity index 78% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/update_asr_annotation_set_properties_request_object.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/dialog_delegation_strategy.py index d0722004..8baf2cd9 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/update_asr_annotation_set_properties_request_object.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/dialog_delegation_strategy.py @@ -21,36 +21,38 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class UpdateAsrAnnotationSetPropertiesRequestObject(object): +class DialogDelegationStrategy(object): """ + Specifies the initial dialog manager to field requests when a new skill session starts. If absent this is assumed to be the default \\\"skill\\\" target. - :param name: The name of ASR annotation set. The length of the name cannot exceed 170 chars. Only alphanumeric characters are accepted. - :type name: (optional) str + + :param target: + :type target: (optional) str """ deserialized_types = { - 'name': 'str' + 'target': 'str' } # type: Dict attribute_map = { - 'name': 'name' + 'target': 'target' } # type: Dict supports_multiple_types = False - def __init__(self, name=None): + def __init__(self, target=None): # type: (Optional[str]) -> None - """ + """Specifies the initial dialog manager to field requests when a new skill session starts. If absent this is assumed to be the default \\\"skill\\\" target. - :param name: The name of ASR annotation set. The length of the name cannot exceed 170 chars. Only alphanumeric characters are accepted. - :type name: (optional) str + :param target: + :type target: (optional) str """ self.__discriminator_value = None # type: str - self.name = name + self.target = target def to_dict(self): # type: () -> Dict[str, object] @@ -95,7 +97,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, UpdateAsrAnnotationSetPropertiesRequestObject): + if not isinstance(other, DialogDelegationStrategy): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/dialog_management.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/dialog_management.py new file mode 100644 index 00000000..409a6133 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/dialog_management.py @@ -0,0 +1,117 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.dialog_manager import DialogManager as DialogManager_786013c6 + from ask_smapi_model.v1.skill.manifest.dialog_delegation_strategy import DialogDelegationStrategy as DialogDelegationStrategy_123073a5 + + +class DialogManagement(object): + """ + Defines the dialog management configuration for the skill. + + + :param dialog_managers: List of dialog managers configured by the skill + :type dialog_managers: (optional) list[ask_smapi_model.v1.skill.manifest.dialog_manager.DialogManager] + :param session_start_delegation_strategy: + :type session_start_delegation_strategy: (optional) ask_smapi_model.v1.skill.manifest.dialog_delegation_strategy.DialogDelegationStrategy + + """ + deserialized_types = { + 'dialog_managers': 'list[ask_smapi_model.v1.skill.manifest.dialog_manager.DialogManager]', + 'session_start_delegation_strategy': 'ask_smapi_model.v1.skill.manifest.dialog_delegation_strategy.DialogDelegationStrategy' + } # type: Dict + + attribute_map = { + 'dialog_managers': 'dialogManagers', + 'session_start_delegation_strategy': 'sessionStartDelegationStrategy' + } # type: Dict + supports_multiple_types = False + + def __init__(self, dialog_managers=None, session_start_delegation_strategy=None): + # type: (Optional[List[DialogManager_786013c6]], Optional[DialogDelegationStrategy_123073a5]) -> None + """Defines the dialog management configuration for the skill. + + :param dialog_managers: List of dialog managers configured by the skill + :type dialog_managers: (optional) list[ask_smapi_model.v1.skill.manifest.dialog_manager.DialogManager] + :param session_start_delegation_strategy: + :type session_start_delegation_strategy: (optional) ask_smapi_model.v1.skill.manifest.dialog_delegation_strategy.DialogDelegationStrategy + """ + self.__discriminator_value = None # type: str + + self.dialog_managers = dialog_managers + self.session_start_delegation_strategy = session_start_delegation_strategy + + 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, DialogManagement): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/dialog_manager.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/dialog_manager.py new file mode 100644 index 00000000..f41213e2 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/dialog_manager.py @@ -0,0 +1,132 @@ +# 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 abc import ABCMeta, abstractmethod + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class DialogManager(object): + """ + Individual dialog manager defined for the skill. + + + :param object_type: Type of DialogManager. + :type object_type: (optional) str + + .. note:: + + This is an abstract class. Use the following mapping, to figure out + the model class to be instantiated, that sets ``type`` variable. + + | AMAZON.Conversations: :py:class:`ask_smapi_model.v1.skill.manifest.amazon_conversations_dialog_manager.AMAZONConversationsDialogManager` + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'AMAZON.Conversations': 'ask_smapi_model.v1.skill.manifest.amazon_conversations_dialog_manager.AMAZONConversationsDialogManager' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None): + # type: (Optional[str]) -> None + """Individual dialog manager defined for the skill. + + :param object_type: Type of DialogManager. + :type object_type: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + + @classmethod + def get_real_child_model(cls, data): + # type: (Dict[str, str]) -> Optional[str] + """Returns the real base class specified by the discriminator""" + discriminator_value = data[cls.json_discriminator_key] + return cls.discriminator_value_class_map.get(discriminator_value) + + 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, DialogManager): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface.py index 0bf4aa63..21c80119 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.display_interface_apml_version import DisplayInterfaceApmlVersionV1 - from ask_smapi_model.v1.skill.manifest.display_interface_template_version import DisplayInterfaceTemplateVersionV1 + from ask_smapi_model.v1.skill.manifest.display_interface_apml_version import DisplayInterfaceApmlVersion as DisplayInterfaceApmlVersion_558fc1e8 + from ask_smapi_model.v1.skill.manifest.display_interface_template_version import DisplayInterfaceTemplateVersion as DisplayInterfaceTemplateVersion_13978768 class DisplayInterface(Interface): @@ -53,7 +53,7 @@ class DisplayInterface(Interface): supports_multiple_types = False def __init__(self, minimum_template_version=None, minimum_apml_version=None): - # type: (Optional[DisplayInterfaceTemplateVersionV1], Optional[DisplayInterfaceApmlVersionV1]) -> None + # type: (Optional[DisplayInterfaceTemplateVersion_13978768], Optional[DisplayInterfaceApmlVersion_558fc1e8]) -> None """Used to declare that the skill uses the Display interface. When a skill declares that it uses the Display interface the Display interface will be passed in the supportedInterfaces section of devices which meet any of the required minimum version attributes specified in the manifest. If the device does not meet any of the minimum versions specified in the manifest the Display interface will not be present in the supportedInterfaces section. If neither the minimumTemplateVersion nor the minimumApmlVersion attributes are specified in the manifes then the minimumTemplateVersion is defaulted to 1.0 and apmlVersion is omitted. :param minimum_template_version: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_apml_version.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_apml_version.py index f9cf20e2..b8963381 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_apml_version.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_apml_version.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class DisplayInterfaceApmlVersion(Enum): _0_2 = "0.2" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, DisplayInterfaceApmlVersion): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_template_version.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_template_version.py index 956f7953..73cff1e1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_template_version.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_template_version.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class DisplayInterfaceTemplateVersion(Enum): _1 = "1" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, DisplayInterfaceTemplateVersion): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_countries.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_countries.py index c05eb7f7..e6fe0877 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_countries.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_countries.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -274,7 +274,7 @@ class DistributionCountries(Enum): ZW = "ZW" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -290,7 +290,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, DistributionCountries): return False @@ -298,6 +298,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_mode.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_mode.py index 816120bb..fc25207d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_mode.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_mode.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -31,14 +31,13 @@ class DistributionMode(Enum): - Allowed enum values: [PRIVATE, PUBLIC, INTERNAL] + Allowed enum values: [PRIVATE, PUBLIC] """ PRIVATE = "PRIVATE" PUBLIC = "PUBLIC" - INTERNAL = "INTERNAL" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, DistributionMode): return False @@ -62,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name.py index 9f634deb..5ff628f5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.event_name_type import EventNameTypeV1 + from ask_smapi_model.v1.skill.manifest.event_name_type import EventNameType as EventNameType_e044f521 class EventName(object): @@ -43,7 +43,7 @@ class EventName(object): supports_multiple_types = False def __init__(self, event_name=None): - # type: (Optional[EventNameTypeV1]) -> None + # type: (Optional[EventNameType_e044f521]) -> None """ :param event_name: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name_type.py index e38159d9..5b8c9e68 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -31,239 +31,243 @@ class EventNameType(Enum): - Allowed enum values: [SKILL_ENABLED, SKILL_DISABLED, SKILL_PERMISSION_ACCEPTED, SKILL_PERMISSION_CHANGED, SKILL_ACCOUNT_LINKED, ITEMS_CREATED, ITEMS_UPDATED, ITEMS_DELETED, LIST_CREATED, LIST_UPDATED, LIST_DELETED, ALL_LISTS_CHANGED, REMINDER_STARTED, REMINDER_CREATED, REMINDER_UPDATED, REMINDER_DELETED, REMINDER_STATUS_CHANGED, AUDIO_ITEM_PLAYBACK_STARTED, AUDIO_ITEM_PLAYBACK_FINISHED, AUDIO_ITEM_PLAYBACK_STOPPED, AUDIO_ITEM_PLAYBACK_FAILED, SKILL_PROACTIVE_SUBSCRIPTION_CHANGED, IN_SKILL_PRODUCT_SUBSCRIPTION_STARTED, IN_SKILL_PRODUCT_SUBSCRIPTION_RENEWED, IN_SKILL_PRODUCT_SUBSCRIPTION_ENDED, Legacy_ActivityManager_ActivityContextRemovedEvent, Legacy_ActivityManager_ActivityInterrupted, Legacy_ActivityManager_FocusChanged, Legacy_AlertsController_DismissCommand, Legacy_AlertsController_SnoozeCommand, Legacy_AudioPlayer_AudioStutter, Legacy_AudioPlayer_InitialPlaybackProgressReport, Legacy_AudioPlayer_Metadata, Legacy_AudioPlayer_PeriodicPlaybackProgressReport, Legacy_AudioPlayer_PlaybackError, Legacy_AudioPlayer_PlaybackFinished, Legacy_AudioPlayer_PlaybackIdle, Legacy_AudioPlayer_PlaybackInterrupted, Legacy_AudioPlayer_PlaybackNearlyFinished, Legacy_AudioPlayer_PlaybackPaused, Legacy_AudioPlayer_PlaybackResumed, Legacy_AudioPlayer_PlaybackStarted, Legacy_AudioPlayer_PlaybackStutterFinished, Legacy_AudioPlayer_PlaybackStutterStarted, Legacy_AudioPlayerGui_ButtonClickedEvent, Legacy_AudioPlayerGui_LyricsViewedEvent, Legacy_AuxController_DirectionChanged, Legacy_AuxController_EnabledStateChanged, Legacy_AuxController_InputActivityStateChanged, Legacy_AuxController_PluggedStateChanged, Legacy_BluetoothNetwork_CancelPairingMode, Legacy_BluetoothNetwork_DeviceConnectedFailure, Legacy_BluetoothNetwork_DeviceConnectedSuccess, Legacy_BluetoothNetwork_DeviceDisconnectedFailure, Legacy_BluetoothNetwork_DeviceDisconnectedSuccess, Legacy_BluetoothNetwork_DevicePairFailure, Legacy_BluetoothNetwork_DevicePairSuccess, Legacy_BluetoothNetwork_DeviceUnpairFailure, Legacy_BluetoothNetwork_DeviceUnpairSuccess, Legacy_BluetoothNetwork_EnterPairingModeFailure, Legacy_BluetoothNetwork_EnterPairingModeSuccess, Legacy_BluetoothNetwork_MediaControlFailure, Legacy_BluetoothNetwork_MediaControlSuccess, Legacy_BluetoothNetwork_ScanDevicesReport, Legacy_BluetoothNetwork_SetDeviceCategoriesFailed, Legacy_BluetoothNetwork_SetDeviceCategoriesSucceeded, Legacy_ContentManager_ContentPlaybackTerminated, Legacy_DeviceNotification_DeleteNotificationFailed, Legacy_DeviceNotification_DeleteNotificationSucceeded, Legacy_DeviceNotification_NotificationEnteredBackground, Legacy_DeviceNotification_NotificationEnteredForground, Legacy_DeviceNotification_NotificationStarted, Legacy_DeviceNotification_NotificationStopped, Legacy_DeviceNotification_NotificationSync, Legacy_DeviceNotification_SetNotificationFailed, Legacy_DeviceNotification_SetNotificationSucceeded, Legacy_EqualizerController_EqualizerChanged, Legacy_ExternalMediaPlayer_AuthorizationComplete, Legacy_ExternalMediaPlayer_Error, Legacy_ExternalMediaPlayer_Event, Legacy_ExternalMediaPlayer_Login, Legacy_ExternalMediaPlayer_Logout, Legacy_ExternalMediaPlayer_ReportDiscoveredPlayers, Legacy_ExternalMediaPlayer_RequestToken, Legacy_FavoritesController_Error, Legacy_FavoritesController_Response, Legacy_GameEngine_GameInputEvent, Legacy_HomeAutoWifiController_DeviceReconnected, Legacy_HomeAutoWifiController_HttpNotified, Legacy_HomeAutoWifiController_SsdpDiscoveryFinished, Legacy_HomeAutoWifiController_SsdpServiceDiscovered, Legacy_HomeAutoWifiController_SsdpServiceTerminated, Legacy_ListModel_AddItemRequest, Legacy_ListModel_DeleteItemRequest, Legacy_ListModel_GetPageByOrdinalRequest, Legacy_ListModel_GetPageByTokenRequest, Legacy_ListModel_ListStateUpdateRequest, Legacy_ListModel_UpdateItemRequest, Legacy_ListRenderer_GetListPageByOrdinal, Legacy_ListRenderer_GetListPageByToken, Legacy_ListRenderer_ListItemEvent, Legacy_MediaGrouping_GroupChangeNotificationEvent, Legacy_MediaGrouping_GroupChangeResponseEvent, Legacy_MediaGrouping_GroupSyncEvent, Legacy_MediaPlayer_PlaybackError, Legacy_MediaPlayer_PlaybackFinished, Legacy_MediaPlayer_PlaybackIdle, Legacy_MediaPlayer_PlaybackNearlyFinished, Legacy_MediaPlayer_PlaybackPaused, Legacy_MediaPlayer_PlaybackResumed, Legacy_MediaPlayer_PlaybackStarted, Legacy_MediaPlayer_PlaybackStopped, Legacy_MediaPlayer_SequenceItemsRequested, Legacy_MediaPlayer_SequenceModified, Legacy_MeetingClientController_Event, Legacy_Microphone_AudioRecording, Legacy_PhoneCallController_Event, Legacy_PlaybackController_ButtonCommand, Legacy_PlaybackController_LyricsViewedEvent, Legacy_PlaybackController_NextCommand, Legacy_PlaybackController_PauseCommand, Legacy_PlaybackController_PlayCommand, Legacy_PlaybackController_PreviousCommand, Legacy_PlaybackController_ToggleCommand, Legacy_PlaylistController_ErrorResponse, Legacy_PlaylistController_Response, Legacy_Presentation_PresentationDismissedEvent, Legacy_Presentation_PresentationUserEvent, Legacy_SconeRemoteControl_Next, Legacy_SconeRemoteControl_PlayPause, Legacy_SconeRemoteControl_Previous, Legacy_SconeRemoteControl_VolumeDown, Legacy_SconeRemoteControl_VolumeUp, Legacy_SipClient_Event, Legacy_SoftwareUpdate_CheckSoftwareUpdateReport, Legacy_SoftwareUpdate_InitiateSoftwareUpdateReport, Legacy_Speaker_MuteChanged, Legacy_Speaker_VolumeChanged, Legacy_SpeechRecognizer_WakeWordChanged, Legacy_SpeechSynthesizer_SpeechFinished, Legacy_SpeechSynthesizer_SpeechInterrupted, Legacy_SpeechSynthesizer_SpeechStarted, Legacy_SpeechSynthesizer_SpeechSynthesizerError, Legacy_Spotify_Event, Legacy_System_UserInactivity, Legacy_UDPController_BroadcastResponse, LocalApplication_Alexa_Translation_LiveTranslation_Event, LocalApplication_AlexaNotifications_Event, LocalApplication_AlexaPlatformTestSpeechlet_Event, LocalApplication_AlexaVision_Event, LocalApplication_AlexaVoiceLayer_Event, LocalApplication_AvaPhysicalShopping_Event, LocalApplication_Calendar_Event, LocalApplication_Closet_Event, LocalApplication_Communications_Event, LocalApplication_DeviceMessaging_Event, LocalApplication_DigitalDash_Event, LocalApplication_FireflyShopping_Event, LocalApplication_Gallery_Event, LocalApplication_HHOPhotos_Event, LocalApplication_HomeAutomationMedia_Event, LocalApplication_KnightContacts_Event, LocalApplication_KnightHome_Event, LocalApplication_KnightHomeThingsToTry_Event, LocalApplication_LocalMediaPlayer_Event, LocalApplication_LocalVoiceUI_Event, LocalApplication_MShop_Event, LocalApplication_MShopPurchasing_Event, LocalApplication_NotificationsApp_Event, LocalApplication_Photos_Event, LocalApplication_Sentry_Event, LocalApplication_SipClient_Event, LocalApplication_SipUserAgent_Event, LocalApplication_todoRenderer_Event, LocalApplication_VideoExperienceService_Event, LocalApplication_WebVideoPlayer_Event, Alexa_Camera_PhotoCaptureController_CancelCaptureFailed, Alexa_Camera_PhotoCaptureController_CancelCaptureFinished, Alexa_Camera_PhotoCaptureController_CaptureFailed, Alexa_Camera_PhotoCaptureController_CaptureFinished, Alexa_Camera_VideoCaptureController_CancelCaptureFailed, Alexa_Camera_VideoCaptureController_CancelCaptureFinished, Alexa_Camera_VideoCaptureController_CaptureFailed, Alexa_Camera_VideoCaptureController_CaptureFinished, Alexa_Camera_VideoCaptureController_CaptureStarted, Alexa_FileManager_UploadController_CancelUploadFailed, Alexa_FileManager_UploadController_CancelUploadFinished, Alexa_FileManager_UploadController_UploadFailed, Alexa_FileManager_UploadController_UploadFinished, Alexa_FileManager_UploadController_UploadStarted, Alexa_Presentation_APL_UserEvent, Alexa_Presentation_HTML_Event, Alexa_Presentation_HTML_LifecycleStateChanged, Alexa_Presentation_PresentationDismissed, AudioPlayer_PlaybackFailed, AudioPlayer_PlaybackFinished, AudioPlayer_PlaybackNearlyFinished, AudioPlayer_PlaybackStarted, AudioPlayer_PlaybackStopped, CardRenderer_DisplayContentFinished, CardRenderer_DisplayContentStarted, CardRenderer_ReadContentFinished, CardRenderer_ReadContentStarted, CustomInterfaceController_EventsReceived, CustomInterfaceController_Expired, DeviceSetup_SetupCompleted, Display_ElementSelected, Display_UserEvent, FitnessSessionController_FitnessSessionEnded, FitnessSessionController_FitnessSessionError, FitnessSessionController_FitnessSessionPaused, FitnessSessionController_FitnessSessionResumed, FitnessSessionController_FitnessSessionStarted, GameEngine_InputHandlerEvent, Messaging_MessageReceived, MessagingController_UpdateConversationsStatus, MessagingController_UpdateMessagesStatusRequest, MessagingController_UpdateSendMessageStatusRequest, MessagingController_UploadConversations, PlaybackController_NextCommandIssued, PlaybackController_PauseCommandIssued, PlaybackController_PlayCommandIssued, PlaybackController_PreviousCommandIssued, EffectsController_RequestEffectChangeRequest, EffectsController_RequestGuiChangeRequest, EffectsController_StateReceiptChangeRequest, Alexa_Video_Xray_ShowDetailsSuccessful, Alexa_Video_Xray_ShowDetailsFailed] + Allowed enum values: [Legacy_AudioPlayerGui_LyricsViewedEvent, Legacy_ListModel_DeleteItemRequest, Legacy_MediaPlayer_SequenceModified, Legacy_PlaybackController_ButtonCommand, EffectsController_RequestEffectChangeRequest, Legacy_ExternalMediaPlayer_RequestToken, ITEMS_UPDATED, Alexa_Video_Xray_ShowDetailsSuccessful, PlaybackController_NextCommandIssued, Legacy_MediaPlayer_PlaybackFinished, Alexa_Camera_VideoCaptureController_CaptureFailed, SKILL_DISABLED, Alexa_Camera_VideoCaptureController_CancelCaptureFailed, CustomInterfaceController_EventsReceived, Legacy_DeviceNotification_NotificationStarted, REMINDER_UPDATED, AUDIO_ITEM_PLAYBACK_STOPPED, Legacy_AuxController_InputActivityStateChanged, LocalApplication_MShopPurchasing_Event, Legacy_ExternalMediaPlayer_AuthorizationComplete, LocalApplication_HHOPhotos_Event, Alexa_Presentation_APL_UserEvent, Legacy_AudioPlayer_PlaybackInterrupted, Legacy_BluetoothNetwork_DeviceUnpairFailure, IN_SKILL_PRODUCT_SUBSCRIPTION_ENDED, Alexa_FileManager_UploadController_UploadFailed, Legacy_BluetoothNetwork_DeviceConnectedFailure, Legacy_AudioPlayer_AudioStutter, Alexa_Camera_VideoCaptureController_CaptureStarted, Legacy_Speaker_MuteChanged, CardRenderer_DisplayContentFinished, Legacy_SpeechSynthesizer_SpeechStarted, AudioPlayer_PlaybackStopped, Legacy_SoftwareUpdate_CheckSoftwareUpdateReport, CardRenderer_DisplayContentStarted, LocalApplication_NotificationsApp_Event, AudioPlayer_PlaybackStarted, Legacy_DeviceNotification_NotificationEnteredForground, Legacy_DeviceNotification_SetNotificationFailed, Legacy_AudioPlayer_PeriodicPlaybackProgressReport, Legacy_HomeAutoWifiController_HttpNotified, Alexa_Camera_PhotoCaptureController_CancelCaptureFailed, SKILL_ACCOUNT_LINKED, SKILL_ACCOUNT_UNLINKED, LIST_UPDATED, Legacy_DeviceNotification_NotificationSync, Legacy_SconeRemoteControl_VolumeDown, Legacy_MediaPlayer_PlaybackPaused, Legacy_Presentation_PresentationUserEvent, PlaybackController_PlayCommandIssued, Legacy_ListModel_UpdateItemRequest, Messaging_MessageReceived, Legacy_SoftwareUpdate_InitiateSoftwareUpdateReport, AUDIO_ITEM_PLAYBACK_FAILED, LocalApplication_DeviceMessaging_Event, Alexa_Camera_PhotoCaptureController_CaptureFailed, Legacy_AudioPlayer_PlaybackIdle, Legacy_BluetoothNetwork_EnterPairingModeSuccess, Legacy_AudioPlayer_PlaybackError, Legacy_ListModel_GetPageByOrdinalRequest, Legacy_MediaGrouping_GroupChangeResponseEvent, Legacy_BluetoothNetwork_DeviceDisconnectedFailure, Legacy_BluetoothNetwork_EnterPairingModeFailure, Legacy_SpeechSynthesizer_SpeechInterrupted, PlaybackController_PreviousCommandIssued, Legacy_AudioPlayer_PlaybackFinished, Legacy_System_UserInactivity, Display_UserEvent, Legacy_PhoneCallController_Event, Legacy_DeviceNotification_SetNotificationSucceeded, LocalApplication_Photos_Event, LocalApplication_VideoExperienceService_Event, Legacy_ContentManager_ContentPlaybackTerminated, Legacy_PlaybackController_PlayCommand, Legacy_PlaylistController_ErrorResponse, Legacy_SconeRemoteControl_VolumeUp, MessagingController_UpdateConversationsStatus, Legacy_BluetoothNetwork_DeviceDisconnectedSuccess, LocalApplication_Communications_Event, AUDIO_ITEM_PLAYBACK_STARTED, Legacy_BluetoothNetwork_DevicePairFailure, LIST_DELETED, Legacy_PlaybackController_ToggleCommand, Legacy_BluetoothNetwork_DevicePairSuccess, Legacy_MediaPlayer_PlaybackError, AudioPlayer_PlaybackFinished, Legacy_DeviceNotification_NotificationStopped, Legacy_SipClient_Event, Display_ElementSelected, LocalApplication_MShop_Event, Legacy_ListModel_AddItemRequest, Legacy_BluetoothNetwork_ScanDevicesReport, Legacy_MediaPlayer_PlaybackStopped, Legacy_AudioPlayerGui_ButtonClickedEvent, LocalApplication_AlexaVoiceLayer_Event, Legacy_PlaybackController_PreviousCommand, Legacy_AudioPlayer_InitialPlaybackProgressReport, Legacy_BluetoothNetwork_DeviceConnectedSuccess, LIST_CREATED, Legacy_ActivityManager_ActivityContextRemovedEvent, ALL_LISTS_CHANGED, Legacy_AudioPlayer_PlaybackNearlyFinished, Legacy_MediaGrouping_GroupChangeNotificationEvent, LocalApplication_Sentry_Event, SKILL_PROACTIVE_SUBSCRIPTION_CHANGED, SKILL_NOTIFICATION_SUBSCRIPTION_CHANGED, REMINDER_CREATED, Alexa_Presentation_HTML_Event, FitnessSessionController_FitnessSessionError, Legacy_SconeRemoteControl_Next, Alexa_Camera_VideoCaptureController_CaptureFinished, Legacy_MediaPlayer_SequenceItemsRequested, Legacy_PlaybackController_PauseCommand, LocalApplication_AlexaVision_Event, LocalApplication_Closet_Event, Alexa_FileManager_UploadController_CancelUploadFailed, Legacy_MediaPlayer_PlaybackResumed, SKILL_PERMISSION_ACCEPTED, FitnessSessionController_FitnessSessionPaused, Legacy_AudioPlayer_PlaybackPaused, Alexa_Presentation_HTML_LifecycleStateChanged, LocalApplication_SipUserAgent_Event, Legacy_MediaPlayer_PlaybackStarted, REMINDER_STATUS_CHANGED, MessagingController_UploadConversations, ITEMS_DELETED, Legacy_AuxController_PluggedStateChanged, Legacy_AudioPlayer_PlaybackStarted, Alexa_FileManager_UploadController_UploadStarted, ITEMS_CREATED, Legacy_ExternalMediaPlayer_Event, LocalApplication_LocalMediaPlayer_Event, LocalApplication_KnightContacts_Event, LocalApplication_Calendar_Event, Legacy_AlertsController_DismissCommand, Legacy_AudioPlayer_PlaybackStutterFinished, Legacy_SpeechSynthesizer_SpeechFinished, Legacy_ExternalMediaPlayer_ReportDiscoveredPlayers, LocalApplication_SipClient_Event, Legacy_BluetoothNetwork_DeviceUnpairSuccess, Legacy_Speaker_VolumeChanged, CardRenderer_ReadContentFinished, LocalApplication_HomeAutomationMedia_Event, Legacy_BluetoothNetwork_CancelPairingMode, LocalApplication_DigitalDash_Event, CardRenderer_ReadContentStarted, Legacy_GameEngine_GameInputEvent, LocalApplication_LocalVoiceUI_Event, Legacy_Microphone_AudioRecording, LocalApplication_AlexaPlatformTestSpeechlet_Event, Legacy_HomeAutoWifiController_SsdpServiceDiscovered, Alexa_Camera_PhotoCaptureController_CancelCaptureFinished, Legacy_HomeAutoWifiController_DeviceReconnected, SKILL_ENABLED, Alexa_Camera_VideoCaptureController_CancelCaptureFinished, MessagingController_UpdateMessagesStatusRequest, REMINDER_STARTED, CustomInterfaceController_Expired, LocalApplication_AvaPhysicalShopping_Event, LocalApplication_WebVideoPlayer_Event, Legacy_HomeAutoWifiController_SsdpServiceTerminated, LocalApplication_FireflyShopping_Event, Legacy_PlaybackController_NextCommand, LocalApplication_Gallery_Event, Alexa_Presentation_PresentationDismissed, EffectsController_StateReceiptChangeRequest, LocalApplication_Alexa_Translation_LiveTranslation_Event, LocalApplication_AlexaNotifications_Event, REMINDER_DELETED, GameEngine_InputHandlerEvent, Legacy_PlaylistController_Response, LocalApplication_KnightHome_Event, Legacy_ListRenderer_ListItemEvent, AudioPlayer_PlaybackFailed, LocalApplication_KnightHomeThingsToTry_Event, Legacy_BluetoothNetwork_SetDeviceCategoriesFailed, Legacy_ExternalMediaPlayer_Logout, Alexa_FileManager_UploadController_UploadFinished, Legacy_ActivityManager_FocusChanged, Legacy_AlertsController_SnoozeCommand, Legacy_SpeechRecognizer_WakeWordChanged, Legacy_ListRenderer_GetListPageByToken, MessagingController_UpdateSendMessageStatusRequest, FitnessSessionController_FitnessSessionEnded, Alexa_Presentation_APL_RuntimeError, Legacy_ListRenderer_GetListPageByOrdinal, FitnessSessionController_FitnessSessionResumed, IN_SKILL_PRODUCT_SUBSCRIPTION_STARTED, Legacy_DeviceNotification_DeleteNotificationSucceeded, Legacy_SpeechSynthesizer_SpeechSynthesizerError, Alexa_Video_Xray_ShowDetailsFailed, Alexa_FileManager_UploadController_CancelUploadFinished, Legacy_SconeRemoteControl_PlayPause, Legacy_DeviceNotification_NotificationEnteredBackground, SKILL_PERMISSION_CHANGED, Legacy_AudioPlayer_Metadata, Legacy_AudioPlayer_PlaybackStutterStarted, AUDIO_ITEM_PLAYBACK_FINISHED, EffectsController_RequestGuiChangeRequest, FitnessSessionController_FitnessSessionStarted, Legacy_PlaybackController_LyricsViewedEvent, Legacy_ExternalMediaPlayer_Login, PlaybackController_PauseCommandIssued, Legacy_MediaPlayer_PlaybackIdle, Legacy_SconeRemoteControl_Previous, DeviceSetup_SetupCompleted, Legacy_MediaPlayer_PlaybackNearlyFinished, LocalApplication_todoRenderer_Event, Legacy_BluetoothNetwork_SetDeviceCategoriesSucceeded, Legacy_BluetoothNetwork_MediaControlSuccess, Legacy_HomeAutoWifiController_SsdpDiscoveryFinished, Alexa_Presentation_APL_LoadIndexListData, IN_SKILL_PRODUCT_SUBSCRIPTION_RENEWED, Legacy_BluetoothNetwork_MediaControlFailure, Legacy_AuxController_EnabledStateChanged, Legacy_FavoritesController_Response, Legacy_ListModel_ListStateUpdateRequest, Legacy_EqualizerController_EqualizerChanged, Legacy_MediaGrouping_GroupSyncEvent, Legacy_FavoritesController_Error, Legacy_ListModel_GetPageByTokenRequest, Legacy_ActivityManager_ActivityInterrupted, Legacy_MeetingClientController_Event, Legacy_Presentation_PresentationDismissedEvent, Legacy_Spotify_Event, Legacy_ExternalMediaPlayer_Error, Legacy_AuxController_DirectionChanged, AudioPlayer_PlaybackNearlyFinished, Alexa_Camera_PhotoCaptureController_CaptureFinished, Legacy_UDPController_BroadcastResponse, Legacy_AudioPlayer_PlaybackResumed, Legacy_DeviceNotification_DeleteNotificationFailed] """ - SKILL_ENABLED = "SKILL_ENABLED" - SKILL_DISABLED = "SKILL_DISABLED" - SKILL_PERMISSION_ACCEPTED = "SKILL_PERMISSION_ACCEPTED" - SKILL_PERMISSION_CHANGED = "SKILL_PERMISSION_CHANGED" - SKILL_ACCOUNT_LINKED = "SKILL_ACCOUNT_LINKED" - ITEMS_CREATED = "ITEMS_CREATED" + Legacy_AudioPlayerGui_LyricsViewedEvent = "Legacy.AudioPlayerGui.LyricsViewedEvent" + Legacy_ListModel_DeleteItemRequest = "Legacy.ListModel.DeleteItemRequest" + Legacy_MediaPlayer_SequenceModified = "Legacy.MediaPlayer.SequenceModified" + Legacy_PlaybackController_ButtonCommand = "Legacy.PlaybackController.ButtonCommand" + EffectsController_RequestEffectChangeRequest = "EffectsController.RequestEffectChangeRequest" + Legacy_ExternalMediaPlayer_RequestToken = "Legacy.ExternalMediaPlayer.RequestToken" ITEMS_UPDATED = "ITEMS_UPDATED" - ITEMS_DELETED = "ITEMS_DELETED" - LIST_CREATED = "LIST_CREATED" - LIST_UPDATED = "LIST_UPDATED" - LIST_DELETED = "LIST_DELETED" - ALL_LISTS_CHANGED = "ALL_LISTS_CHANGED" - REMINDER_STARTED = "REMINDER_STARTED" - REMINDER_CREATED = "REMINDER_CREATED" + Alexa_Video_Xray_ShowDetailsSuccessful = "Alexa.Video.Xray.ShowDetailsSuccessful" + PlaybackController_NextCommandIssued = "PlaybackController.NextCommandIssued" + Legacy_MediaPlayer_PlaybackFinished = "Legacy.MediaPlayer.PlaybackFinished" + Alexa_Camera_VideoCaptureController_CaptureFailed = "Alexa.Camera.VideoCaptureController.CaptureFailed" + SKILL_DISABLED = "SKILL_DISABLED" + Alexa_Camera_VideoCaptureController_CancelCaptureFailed = "Alexa.Camera.VideoCaptureController.CancelCaptureFailed" + CustomInterfaceController_EventsReceived = "CustomInterfaceController.EventsReceived" + Legacy_DeviceNotification_NotificationStarted = "Legacy.DeviceNotification.NotificationStarted" REMINDER_UPDATED = "REMINDER_UPDATED" - REMINDER_DELETED = "REMINDER_DELETED" - REMINDER_STATUS_CHANGED = "REMINDER_STATUS_CHANGED" - AUDIO_ITEM_PLAYBACK_STARTED = "AUDIO_ITEM_PLAYBACK_STARTED" - AUDIO_ITEM_PLAYBACK_FINISHED = "AUDIO_ITEM_PLAYBACK_FINISHED" AUDIO_ITEM_PLAYBACK_STOPPED = "AUDIO_ITEM_PLAYBACK_STOPPED" - AUDIO_ITEM_PLAYBACK_FAILED = "AUDIO_ITEM_PLAYBACK_FAILED" - SKILL_PROACTIVE_SUBSCRIPTION_CHANGED = "SKILL_PROACTIVE_SUBSCRIPTION_CHANGED" - IN_SKILL_PRODUCT_SUBSCRIPTION_STARTED = "IN_SKILL_PRODUCT_SUBSCRIPTION_STARTED" - IN_SKILL_PRODUCT_SUBSCRIPTION_RENEWED = "IN_SKILL_PRODUCT_SUBSCRIPTION_RENEWED" + Legacy_AuxController_InputActivityStateChanged = "Legacy.AuxController.InputActivityStateChanged" + LocalApplication_MShopPurchasing_Event = "LocalApplication.MShopPurchasing.Event" + Legacy_ExternalMediaPlayer_AuthorizationComplete = "Legacy.ExternalMediaPlayer.AuthorizationComplete" + LocalApplication_HHOPhotos_Event = "LocalApplication.HHOPhotos.Event" + Alexa_Presentation_APL_UserEvent = "Alexa.Presentation.APL.UserEvent" + Legacy_AudioPlayer_PlaybackInterrupted = "Legacy.AudioPlayer.PlaybackInterrupted" + Legacy_BluetoothNetwork_DeviceUnpairFailure = "Legacy.BluetoothNetwork.DeviceUnpairFailure" IN_SKILL_PRODUCT_SUBSCRIPTION_ENDED = "IN_SKILL_PRODUCT_SUBSCRIPTION_ENDED" - Legacy_ActivityManager_ActivityContextRemovedEvent = "Legacy.ActivityManager.ActivityContextRemovedEvent" - Legacy_ActivityManager_ActivityInterrupted = "Legacy.ActivityManager.ActivityInterrupted" - Legacy_ActivityManager_FocusChanged = "Legacy.ActivityManager.FocusChanged" - Legacy_AlertsController_DismissCommand = "Legacy.AlertsController.DismissCommand" - Legacy_AlertsController_SnoozeCommand = "Legacy.AlertsController.SnoozeCommand" + Alexa_FileManager_UploadController_UploadFailed = "Alexa.FileManager.UploadController.UploadFailed" + Legacy_BluetoothNetwork_DeviceConnectedFailure = "Legacy.BluetoothNetwork.DeviceConnectedFailure" Legacy_AudioPlayer_AudioStutter = "Legacy.AudioPlayer.AudioStutter" - Legacy_AudioPlayer_InitialPlaybackProgressReport = "Legacy.AudioPlayer.InitialPlaybackProgressReport" - Legacy_AudioPlayer_Metadata = "Legacy.AudioPlayer.Metadata" + Alexa_Camera_VideoCaptureController_CaptureStarted = "Alexa.Camera.VideoCaptureController.CaptureStarted" + Legacy_Speaker_MuteChanged = "Legacy.Speaker.MuteChanged" + CardRenderer_DisplayContentFinished = "CardRenderer.DisplayContentFinished" + Legacy_SpeechSynthesizer_SpeechStarted = "Legacy.SpeechSynthesizer.SpeechStarted" + AudioPlayer_PlaybackStopped = "AudioPlayer.PlaybackStopped" + Legacy_SoftwareUpdate_CheckSoftwareUpdateReport = "Legacy.SoftwareUpdate.CheckSoftwareUpdateReport" + CardRenderer_DisplayContentStarted = "CardRenderer.DisplayContentStarted" + LocalApplication_NotificationsApp_Event = "LocalApplication.NotificationsApp.Event" + AudioPlayer_PlaybackStarted = "AudioPlayer.PlaybackStarted" + Legacy_DeviceNotification_NotificationEnteredForground = "Legacy.DeviceNotification.NotificationEnteredForground" + Legacy_DeviceNotification_SetNotificationFailed = "Legacy.DeviceNotification.SetNotificationFailed" Legacy_AudioPlayer_PeriodicPlaybackProgressReport = "Legacy.AudioPlayer.PeriodicPlaybackProgressReport" - Legacy_AudioPlayer_PlaybackError = "Legacy.AudioPlayer.PlaybackError" - Legacy_AudioPlayer_PlaybackFinished = "Legacy.AudioPlayer.PlaybackFinished" + Legacy_HomeAutoWifiController_HttpNotified = "Legacy.HomeAutoWifiController.HttpNotified" + Alexa_Camera_PhotoCaptureController_CancelCaptureFailed = "Alexa.Camera.PhotoCaptureController.CancelCaptureFailed" + SKILL_ACCOUNT_LINKED = "SKILL_ACCOUNT_LINKED" + SKILL_ACCOUNT_UNLINKED = "SKILL_ACCOUNT_UNLINKED" + LIST_UPDATED = "LIST_UPDATED" + Legacy_DeviceNotification_NotificationSync = "Legacy.DeviceNotification.NotificationSync" + Legacy_SconeRemoteControl_VolumeDown = "Legacy.SconeRemoteControl.VolumeDown" + Legacy_MediaPlayer_PlaybackPaused = "Legacy.MediaPlayer.PlaybackPaused" + Legacy_Presentation_PresentationUserEvent = "Legacy.Presentation.PresentationUserEvent" + PlaybackController_PlayCommandIssued = "PlaybackController.PlayCommandIssued" + Legacy_ListModel_UpdateItemRequest = "Legacy.ListModel.UpdateItemRequest" + Messaging_MessageReceived = "Messaging.MessageReceived" + Legacy_SoftwareUpdate_InitiateSoftwareUpdateReport = "Legacy.SoftwareUpdate.InitiateSoftwareUpdateReport" + AUDIO_ITEM_PLAYBACK_FAILED = "AUDIO_ITEM_PLAYBACK_FAILED" + LocalApplication_DeviceMessaging_Event = "LocalApplication.DeviceMessaging.Event" + Alexa_Camera_PhotoCaptureController_CaptureFailed = "Alexa.Camera.PhotoCaptureController.CaptureFailed" Legacy_AudioPlayer_PlaybackIdle = "Legacy.AudioPlayer.PlaybackIdle" - Legacy_AudioPlayer_PlaybackInterrupted = "Legacy.AudioPlayer.PlaybackInterrupted" - Legacy_AudioPlayer_PlaybackNearlyFinished = "Legacy.AudioPlayer.PlaybackNearlyFinished" - Legacy_AudioPlayer_PlaybackPaused = "Legacy.AudioPlayer.PlaybackPaused" - Legacy_AudioPlayer_PlaybackResumed = "Legacy.AudioPlayer.PlaybackResumed" - Legacy_AudioPlayer_PlaybackStarted = "Legacy.AudioPlayer.PlaybackStarted" - Legacy_AudioPlayer_PlaybackStutterFinished = "Legacy.AudioPlayer.PlaybackStutterFinished" - Legacy_AudioPlayer_PlaybackStutterStarted = "Legacy.AudioPlayer.PlaybackStutterStarted" - Legacy_AudioPlayerGui_ButtonClickedEvent = "Legacy.AudioPlayerGui.ButtonClickedEvent" - Legacy_AudioPlayerGui_LyricsViewedEvent = "Legacy.AudioPlayerGui.LyricsViewedEvent" - Legacy_AuxController_DirectionChanged = "Legacy.AuxController.DirectionChanged" - Legacy_AuxController_EnabledStateChanged = "Legacy.AuxController.EnabledStateChanged" - Legacy_AuxController_InputActivityStateChanged = "Legacy.AuxController.InputActivityStateChanged" - Legacy_AuxController_PluggedStateChanged = "Legacy.AuxController.PluggedStateChanged" - Legacy_BluetoothNetwork_CancelPairingMode = "Legacy.BluetoothNetwork.CancelPairingMode" - Legacy_BluetoothNetwork_DeviceConnectedFailure = "Legacy.BluetoothNetwork.DeviceConnectedFailure" - Legacy_BluetoothNetwork_DeviceConnectedSuccess = "Legacy.BluetoothNetwork.DeviceConnectedSuccess" + Legacy_BluetoothNetwork_EnterPairingModeSuccess = "Legacy.BluetoothNetwork.EnterPairingModeSuccess" + Legacy_AudioPlayer_PlaybackError = "Legacy.AudioPlayer.PlaybackError" + Legacy_ListModel_GetPageByOrdinalRequest = "Legacy.ListModel.GetPageByOrdinalRequest" + Legacy_MediaGrouping_GroupChangeResponseEvent = "Legacy.MediaGrouping.GroupChangeResponseEvent" Legacy_BluetoothNetwork_DeviceDisconnectedFailure = "Legacy.BluetoothNetwork.DeviceDisconnectedFailure" + Legacy_BluetoothNetwork_EnterPairingModeFailure = "Legacy.BluetoothNetwork.EnterPairingModeFailure" + Legacy_SpeechSynthesizer_SpeechInterrupted = "Legacy.SpeechSynthesizer.SpeechInterrupted" + PlaybackController_PreviousCommandIssued = "PlaybackController.PreviousCommandIssued" + Legacy_AudioPlayer_PlaybackFinished = "Legacy.AudioPlayer.PlaybackFinished" + Legacy_System_UserInactivity = "Legacy.System.UserInactivity" + Display_UserEvent = "Display.UserEvent" + Legacy_PhoneCallController_Event = "Legacy.PhoneCallController.Event" + Legacy_DeviceNotification_SetNotificationSucceeded = "Legacy.DeviceNotification.SetNotificationSucceeded" + LocalApplication_Photos_Event = "LocalApplication.Photos.Event" + LocalApplication_VideoExperienceService_Event = "LocalApplication.VideoExperienceService.Event" + Legacy_ContentManager_ContentPlaybackTerminated = "Legacy.ContentManager.ContentPlaybackTerminated" + Legacy_PlaybackController_PlayCommand = "Legacy.PlaybackController.PlayCommand" + Legacy_PlaylistController_ErrorResponse = "Legacy.PlaylistController.ErrorResponse" + Legacy_SconeRemoteControl_VolumeUp = "Legacy.SconeRemoteControl.VolumeUp" + MessagingController_UpdateConversationsStatus = "MessagingController.UpdateConversationsStatus" Legacy_BluetoothNetwork_DeviceDisconnectedSuccess = "Legacy.BluetoothNetwork.DeviceDisconnectedSuccess" + LocalApplication_Communications_Event = "LocalApplication.Communications.Event" + AUDIO_ITEM_PLAYBACK_STARTED = "AUDIO_ITEM_PLAYBACK_STARTED" Legacy_BluetoothNetwork_DevicePairFailure = "Legacy.BluetoothNetwork.DevicePairFailure" + LIST_DELETED = "LIST_DELETED" + Legacy_PlaybackController_ToggleCommand = "Legacy.PlaybackController.ToggleCommand" Legacy_BluetoothNetwork_DevicePairSuccess = "Legacy.BluetoothNetwork.DevicePairSuccess" - Legacy_BluetoothNetwork_DeviceUnpairFailure = "Legacy.BluetoothNetwork.DeviceUnpairFailure" - Legacy_BluetoothNetwork_DeviceUnpairSuccess = "Legacy.BluetoothNetwork.DeviceUnpairSuccess" - Legacy_BluetoothNetwork_EnterPairingModeFailure = "Legacy.BluetoothNetwork.EnterPairingModeFailure" - Legacy_BluetoothNetwork_EnterPairingModeSuccess = "Legacy.BluetoothNetwork.EnterPairingModeSuccess" - Legacy_BluetoothNetwork_MediaControlFailure = "Legacy.BluetoothNetwork.MediaControlFailure" - Legacy_BluetoothNetwork_MediaControlSuccess = "Legacy.BluetoothNetwork.MediaControlSuccess" - Legacy_BluetoothNetwork_ScanDevicesReport = "Legacy.BluetoothNetwork.ScanDevicesReport" - Legacy_BluetoothNetwork_SetDeviceCategoriesFailed = "Legacy.BluetoothNetwork.SetDeviceCategoriesFailed" - Legacy_BluetoothNetwork_SetDeviceCategoriesSucceeded = "Legacy.BluetoothNetwork.SetDeviceCategoriesSucceeded" - Legacy_ContentManager_ContentPlaybackTerminated = "Legacy.ContentManager.ContentPlaybackTerminated" - Legacy_DeviceNotification_DeleteNotificationFailed = "Legacy.DeviceNotification.DeleteNotificationFailed" - Legacy_DeviceNotification_DeleteNotificationSucceeded = "Legacy.DeviceNotification.DeleteNotificationSucceeded" - Legacy_DeviceNotification_NotificationEnteredBackground = "Legacy.DeviceNotification.NotificationEnteredBackground" - Legacy_DeviceNotification_NotificationEnteredForground = "Legacy.DeviceNotification.NotificationEnteredForground" - Legacy_DeviceNotification_NotificationStarted = "Legacy.DeviceNotification.NotificationStarted" + Legacy_MediaPlayer_PlaybackError = "Legacy.MediaPlayer.PlaybackError" + AudioPlayer_PlaybackFinished = "AudioPlayer.PlaybackFinished" Legacy_DeviceNotification_NotificationStopped = "Legacy.DeviceNotification.NotificationStopped" - Legacy_DeviceNotification_NotificationSync = "Legacy.DeviceNotification.NotificationSync" - Legacy_DeviceNotification_SetNotificationFailed = "Legacy.DeviceNotification.SetNotificationFailed" - Legacy_DeviceNotification_SetNotificationSucceeded = "Legacy.DeviceNotification.SetNotificationSucceeded" - Legacy_EqualizerController_EqualizerChanged = "Legacy.EqualizerController.EqualizerChanged" - Legacy_ExternalMediaPlayer_AuthorizationComplete = "Legacy.ExternalMediaPlayer.AuthorizationComplete" - Legacy_ExternalMediaPlayer_Error = "Legacy.ExternalMediaPlayer.Error" - Legacy_ExternalMediaPlayer_Event = "Legacy.ExternalMediaPlayer.Event" - Legacy_ExternalMediaPlayer_Login = "Legacy.ExternalMediaPlayer.Login" - Legacy_ExternalMediaPlayer_Logout = "Legacy.ExternalMediaPlayer.Logout" - Legacy_ExternalMediaPlayer_ReportDiscoveredPlayers = "Legacy.ExternalMediaPlayer.ReportDiscoveredPlayers" - Legacy_ExternalMediaPlayer_RequestToken = "Legacy.ExternalMediaPlayer.RequestToken" - Legacy_FavoritesController_Error = "Legacy.FavoritesController.Error" - Legacy_FavoritesController_Response = "Legacy.FavoritesController.Response" - Legacy_GameEngine_GameInputEvent = "Legacy.GameEngine.GameInputEvent" - Legacy_HomeAutoWifiController_DeviceReconnected = "Legacy.HomeAutoWifiController.DeviceReconnected" - Legacy_HomeAutoWifiController_HttpNotified = "Legacy.HomeAutoWifiController.HttpNotified" - Legacy_HomeAutoWifiController_SsdpDiscoveryFinished = "Legacy.HomeAutoWifiController.SsdpDiscoveryFinished" - Legacy_HomeAutoWifiController_SsdpServiceDiscovered = "Legacy.HomeAutoWifiController.SsdpServiceDiscovered" - Legacy_HomeAutoWifiController_SsdpServiceTerminated = "Legacy.HomeAutoWifiController.SsdpServiceTerminated" + Legacy_SipClient_Event = "Legacy.SipClient.Event" + Display_ElementSelected = "Display.ElementSelected" + LocalApplication_MShop_Event = "LocalApplication.MShop.Event" Legacy_ListModel_AddItemRequest = "Legacy.ListModel.AddItemRequest" - Legacy_ListModel_DeleteItemRequest = "Legacy.ListModel.DeleteItemRequest" - Legacy_ListModel_GetPageByOrdinalRequest = "Legacy.ListModel.GetPageByOrdinalRequest" - Legacy_ListModel_GetPageByTokenRequest = "Legacy.ListModel.GetPageByTokenRequest" - Legacy_ListModel_ListStateUpdateRequest = "Legacy.ListModel.ListStateUpdateRequest" - Legacy_ListModel_UpdateItemRequest = "Legacy.ListModel.UpdateItemRequest" - Legacy_ListRenderer_GetListPageByOrdinal = "Legacy.ListRenderer.GetListPageByOrdinal" - Legacy_ListRenderer_GetListPageByToken = "Legacy.ListRenderer.GetListPageByToken" - Legacy_ListRenderer_ListItemEvent = "Legacy.ListRenderer.ListItemEvent" - Legacy_MediaGrouping_GroupChangeNotificationEvent = "Legacy.MediaGrouping.GroupChangeNotificationEvent" - Legacy_MediaGrouping_GroupChangeResponseEvent = "Legacy.MediaGrouping.GroupChangeResponseEvent" - Legacy_MediaGrouping_GroupSyncEvent = "Legacy.MediaGrouping.GroupSyncEvent" - Legacy_MediaPlayer_PlaybackError = "Legacy.MediaPlayer.PlaybackError" - Legacy_MediaPlayer_PlaybackFinished = "Legacy.MediaPlayer.PlaybackFinished" - Legacy_MediaPlayer_PlaybackIdle = "Legacy.MediaPlayer.PlaybackIdle" - Legacy_MediaPlayer_PlaybackNearlyFinished = "Legacy.MediaPlayer.PlaybackNearlyFinished" - Legacy_MediaPlayer_PlaybackPaused = "Legacy.MediaPlayer.PlaybackPaused" - Legacy_MediaPlayer_PlaybackResumed = "Legacy.MediaPlayer.PlaybackResumed" - Legacy_MediaPlayer_PlaybackStarted = "Legacy.MediaPlayer.PlaybackStarted" + Legacy_BluetoothNetwork_ScanDevicesReport = "Legacy.BluetoothNetwork.ScanDevicesReport" Legacy_MediaPlayer_PlaybackStopped = "Legacy.MediaPlayer.PlaybackStopped" - Legacy_MediaPlayer_SequenceItemsRequested = "Legacy.MediaPlayer.SequenceItemsRequested" - Legacy_MediaPlayer_SequenceModified = "Legacy.MediaPlayer.SequenceModified" - Legacy_MeetingClientController_Event = "Legacy.MeetingClientController.Event" - Legacy_Microphone_AudioRecording = "Legacy.Microphone.AudioRecording" - Legacy_PhoneCallController_Event = "Legacy.PhoneCallController.Event" - Legacy_PlaybackController_ButtonCommand = "Legacy.PlaybackController.ButtonCommand" - Legacy_PlaybackController_LyricsViewedEvent = "Legacy.PlaybackController.LyricsViewedEvent" - Legacy_PlaybackController_NextCommand = "Legacy.PlaybackController.NextCommand" - Legacy_PlaybackController_PauseCommand = "Legacy.PlaybackController.PauseCommand" - Legacy_PlaybackController_PlayCommand = "Legacy.PlaybackController.PlayCommand" + Legacy_AudioPlayerGui_ButtonClickedEvent = "Legacy.AudioPlayerGui.ButtonClickedEvent" + LocalApplication_AlexaVoiceLayer_Event = "LocalApplication.AlexaVoiceLayer.Event" Legacy_PlaybackController_PreviousCommand = "Legacy.PlaybackController.PreviousCommand" - Legacy_PlaybackController_ToggleCommand = "Legacy.PlaybackController.ToggleCommand" - Legacy_PlaylistController_ErrorResponse = "Legacy.PlaylistController.ErrorResponse" - Legacy_PlaylistController_Response = "Legacy.PlaylistController.Response" - Legacy_Presentation_PresentationDismissedEvent = "Legacy.Presentation.PresentationDismissedEvent" - Legacy_Presentation_PresentationUserEvent = "Legacy.Presentation.PresentationUserEvent" + Legacy_AudioPlayer_InitialPlaybackProgressReport = "Legacy.AudioPlayer.InitialPlaybackProgressReport" + Legacy_BluetoothNetwork_DeviceConnectedSuccess = "Legacy.BluetoothNetwork.DeviceConnectedSuccess" + LIST_CREATED = "LIST_CREATED" + Legacy_ActivityManager_ActivityContextRemovedEvent = "Legacy.ActivityManager.ActivityContextRemovedEvent" + ALL_LISTS_CHANGED = "ALL_LISTS_CHANGED" + Legacy_AudioPlayer_PlaybackNearlyFinished = "Legacy.AudioPlayer.PlaybackNearlyFinished" + Legacy_MediaGrouping_GroupChangeNotificationEvent = "Legacy.MediaGrouping.GroupChangeNotificationEvent" + LocalApplication_Sentry_Event = "LocalApplication.Sentry.Event" + SKILL_PROACTIVE_SUBSCRIPTION_CHANGED = "SKILL_PROACTIVE_SUBSCRIPTION_CHANGED" + SKILL_NOTIFICATION_SUBSCRIPTION_CHANGED = "SKILL_NOTIFICATION_SUBSCRIPTION_CHANGED" + REMINDER_CREATED = "REMINDER_CREATED" + Alexa_Presentation_HTML_Event = "Alexa.Presentation.HTML.Event" + FitnessSessionController_FitnessSessionError = "FitnessSessionController.FitnessSessionError" Legacy_SconeRemoteControl_Next = "Legacy.SconeRemoteControl.Next" - Legacy_SconeRemoteControl_PlayPause = "Legacy.SconeRemoteControl.PlayPause" - Legacy_SconeRemoteControl_Previous = "Legacy.SconeRemoteControl.Previous" - Legacy_SconeRemoteControl_VolumeDown = "Legacy.SconeRemoteControl.VolumeDown" - Legacy_SconeRemoteControl_VolumeUp = "Legacy.SconeRemoteControl.VolumeUp" - Legacy_SipClient_Event = "Legacy.SipClient.Event" - Legacy_SoftwareUpdate_CheckSoftwareUpdateReport = "Legacy.SoftwareUpdate.CheckSoftwareUpdateReport" - Legacy_SoftwareUpdate_InitiateSoftwareUpdateReport = "Legacy.SoftwareUpdate.InitiateSoftwareUpdateReport" - Legacy_Speaker_MuteChanged = "Legacy.Speaker.MuteChanged" - Legacy_Speaker_VolumeChanged = "Legacy.Speaker.VolumeChanged" - Legacy_SpeechRecognizer_WakeWordChanged = "Legacy.SpeechRecognizer.WakeWordChanged" - Legacy_SpeechSynthesizer_SpeechFinished = "Legacy.SpeechSynthesizer.SpeechFinished" - Legacy_SpeechSynthesizer_SpeechInterrupted = "Legacy.SpeechSynthesizer.SpeechInterrupted" - Legacy_SpeechSynthesizer_SpeechStarted = "Legacy.SpeechSynthesizer.SpeechStarted" - Legacy_SpeechSynthesizer_SpeechSynthesizerError = "Legacy.SpeechSynthesizer.SpeechSynthesizerError" - Legacy_Spotify_Event = "Legacy.Spotify.Event" - Legacy_System_UserInactivity = "Legacy.System.UserInactivity" - Legacy_UDPController_BroadcastResponse = "Legacy.UDPController.BroadcastResponse" - LocalApplication_Alexa_Translation_LiveTranslation_Event = "LocalApplication.Alexa.Translation.LiveTranslation.Event" - LocalApplication_AlexaNotifications_Event = "LocalApplication.AlexaNotifications.Event" - LocalApplication_AlexaPlatformTestSpeechlet_Event = "LocalApplication.AlexaPlatformTestSpeechlet.Event" + Alexa_Camera_VideoCaptureController_CaptureFinished = "Alexa.Camera.VideoCaptureController.CaptureFinished" + Legacy_MediaPlayer_SequenceItemsRequested = "Legacy.MediaPlayer.SequenceItemsRequested" + Legacy_PlaybackController_PauseCommand = "Legacy.PlaybackController.PauseCommand" LocalApplication_AlexaVision_Event = "LocalApplication.AlexaVision.Event" - LocalApplication_AlexaVoiceLayer_Event = "LocalApplication.AlexaVoiceLayer.Event" - LocalApplication_AvaPhysicalShopping_Event = "LocalApplication.AvaPhysicalShopping.Event" - LocalApplication_Calendar_Event = "LocalApplication.Calendar.Event" LocalApplication_Closet_Event = "LocalApplication.Closet.Event" - LocalApplication_Communications_Event = "LocalApplication.Communications.Event" - LocalApplication_DeviceMessaging_Event = "LocalApplication.DeviceMessaging.Event" - LocalApplication_DigitalDash_Event = "LocalApplication.DigitalDash.Event" - LocalApplication_FireflyShopping_Event = "LocalApplication.FireflyShopping.Event" - LocalApplication_Gallery_Event = "LocalApplication.Gallery.Event" - LocalApplication_HHOPhotos_Event = "LocalApplication.HHOPhotos.Event" - LocalApplication_HomeAutomationMedia_Event = "LocalApplication.HomeAutomationMedia.Event" - LocalApplication_KnightContacts_Event = "LocalApplication.KnightContacts.Event" - LocalApplication_KnightHome_Event = "LocalApplication.KnightHome.Event" - LocalApplication_KnightHomeThingsToTry_Event = "LocalApplication.KnightHomeThingsToTry.Event" + Alexa_FileManager_UploadController_CancelUploadFailed = "Alexa.FileManager.UploadController.CancelUploadFailed" + Legacy_MediaPlayer_PlaybackResumed = "Legacy.MediaPlayer.PlaybackResumed" + SKILL_PERMISSION_ACCEPTED = "SKILL_PERMISSION_ACCEPTED" + FitnessSessionController_FitnessSessionPaused = "FitnessSessionController.FitnessSessionPaused" + Legacy_AudioPlayer_PlaybackPaused = "Legacy.AudioPlayer.PlaybackPaused" + Alexa_Presentation_HTML_LifecycleStateChanged = "Alexa.Presentation.HTML.LifecycleStateChanged" + LocalApplication_SipUserAgent_Event = "LocalApplication.SipUserAgent.Event" + Legacy_MediaPlayer_PlaybackStarted = "Legacy.MediaPlayer.PlaybackStarted" + REMINDER_STATUS_CHANGED = "REMINDER_STATUS_CHANGED" + MessagingController_UploadConversations = "MessagingController.UploadConversations" + ITEMS_DELETED = "ITEMS_DELETED" + Legacy_AuxController_PluggedStateChanged = "Legacy.AuxController.PluggedStateChanged" + Legacy_AudioPlayer_PlaybackStarted = "Legacy.AudioPlayer.PlaybackStarted" + Alexa_FileManager_UploadController_UploadStarted = "Alexa.FileManager.UploadController.UploadStarted" + ITEMS_CREATED = "ITEMS_CREATED" + Legacy_ExternalMediaPlayer_Event = "Legacy.ExternalMediaPlayer.Event" LocalApplication_LocalMediaPlayer_Event = "LocalApplication.LocalMediaPlayer.Event" - LocalApplication_LocalVoiceUI_Event = "LocalApplication.LocalVoiceUI.Event" - LocalApplication_MShop_Event = "LocalApplication.MShop.Event" - LocalApplication_MShopPurchasing_Event = "LocalApplication.MShopPurchasing.Event" - LocalApplication_NotificationsApp_Event = "LocalApplication.NotificationsApp.Event" - LocalApplication_Photos_Event = "LocalApplication.Photos.Event" - LocalApplication_Sentry_Event = "LocalApplication.Sentry.Event" + LocalApplication_KnightContacts_Event = "LocalApplication.KnightContacts.Event" + LocalApplication_Calendar_Event = "LocalApplication.Calendar.Event" + Legacy_AlertsController_DismissCommand = "Legacy.AlertsController.DismissCommand" + Legacy_AudioPlayer_PlaybackStutterFinished = "Legacy.AudioPlayer.PlaybackStutterFinished" + Legacy_SpeechSynthesizer_SpeechFinished = "Legacy.SpeechSynthesizer.SpeechFinished" + Legacy_ExternalMediaPlayer_ReportDiscoveredPlayers = "Legacy.ExternalMediaPlayer.ReportDiscoveredPlayers" LocalApplication_SipClient_Event = "LocalApplication.SipClient.Event" - LocalApplication_SipUserAgent_Event = "LocalApplication.SipUserAgent.Event" - LocalApplication_todoRenderer_Event = "LocalApplication.todoRenderer.Event" - LocalApplication_VideoExperienceService_Event = "LocalApplication.VideoExperienceService.Event" - LocalApplication_WebVideoPlayer_Event = "LocalApplication.WebVideoPlayer.Event" - Alexa_Camera_PhotoCaptureController_CancelCaptureFailed = "Alexa.Camera.PhotoCaptureController.CancelCaptureFailed" + Legacy_BluetoothNetwork_DeviceUnpairSuccess = "Legacy.BluetoothNetwork.DeviceUnpairSuccess" + Legacy_Speaker_VolumeChanged = "Legacy.Speaker.VolumeChanged" + CardRenderer_ReadContentFinished = "CardRenderer.ReadContentFinished" + LocalApplication_HomeAutomationMedia_Event = "LocalApplication.HomeAutomationMedia.Event" + Legacy_BluetoothNetwork_CancelPairingMode = "Legacy.BluetoothNetwork.CancelPairingMode" + LocalApplication_DigitalDash_Event = "LocalApplication.DigitalDash.Event" + CardRenderer_ReadContentStarted = "CardRenderer.ReadContentStarted" + Legacy_GameEngine_GameInputEvent = "Legacy.GameEngine.GameInputEvent" + LocalApplication_LocalVoiceUI_Event = "LocalApplication.LocalVoiceUI.Event" + Legacy_Microphone_AudioRecording = "Legacy.Microphone.AudioRecording" + LocalApplication_AlexaPlatformTestSpeechlet_Event = "LocalApplication.AlexaPlatformTestSpeechlet.Event" + Legacy_HomeAutoWifiController_SsdpServiceDiscovered = "Legacy.HomeAutoWifiController.SsdpServiceDiscovered" Alexa_Camera_PhotoCaptureController_CancelCaptureFinished = "Alexa.Camera.PhotoCaptureController.CancelCaptureFinished" - Alexa_Camera_PhotoCaptureController_CaptureFailed = "Alexa.Camera.PhotoCaptureController.CaptureFailed" - Alexa_Camera_PhotoCaptureController_CaptureFinished = "Alexa.Camera.PhotoCaptureController.CaptureFinished" - Alexa_Camera_VideoCaptureController_CancelCaptureFailed = "Alexa.Camera.VideoCaptureController.CancelCaptureFailed" + Legacy_HomeAutoWifiController_DeviceReconnected = "Legacy.HomeAutoWifiController.DeviceReconnected" + SKILL_ENABLED = "SKILL_ENABLED" Alexa_Camera_VideoCaptureController_CancelCaptureFinished = "Alexa.Camera.VideoCaptureController.CancelCaptureFinished" - Alexa_Camera_VideoCaptureController_CaptureFailed = "Alexa.Camera.VideoCaptureController.CaptureFailed" - Alexa_Camera_VideoCaptureController_CaptureFinished = "Alexa.Camera.VideoCaptureController.CaptureFinished" - Alexa_Camera_VideoCaptureController_CaptureStarted = "Alexa.Camera.VideoCaptureController.CaptureStarted" - Alexa_FileManager_UploadController_CancelUploadFailed = "Alexa.FileManager.UploadController.CancelUploadFailed" - Alexa_FileManager_UploadController_CancelUploadFinished = "Alexa.FileManager.UploadController.CancelUploadFinished" - Alexa_FileManager_UploadController_UploadFailed = "Alexa.FileManager.UploadController.UploadFailed" - Alexa_FileManager_UploadController_UploadFinished = "Alexa.FileManager.UploadController.UploadFinished" - Alexa_FileManager_UploadController_UploadStarted = "Alexa.FileManager.UploadController.UploadStarted" - Alexa_Presentation_APL_UserEvent = "Alexa.Presentation.APL.UserEvent" - Alexa_Presentation_HTML_Event = "Alexa.Presentation.HTML.Event" - Alexa_Presentation_HTML_LifecycleStateChanged = "Alexa.Presentation.HTML.LifecycleStateChanged" + MessagingController_UpdateMessagesStatusRequest = "MessagingController.UpdateMessagesStatusRequest" + REMINDER_STARTED = "REMINDER_STARTED" + CustomInterfaceController_Expired = "CustomInterfaceController.Expired" + LocalApplication_AvaPhysicalShopping_Event = "LocalApplication.AvaPhysicalShopping.Event" + LocalApplication_WebVideoPlayer_Event = "LocalApplication.WebVideoPlayer.Event" + Legacy_HomeAutoWifiController_SsdpServiceTerminated = "Legacy.HomeAutoWifiController.SsdpServiceTerminated" + LocalApplication_FireflyShopping_Event = "LocalApplication.FireflyShopping.Event" + Legacy_PlaybackController_NextCommand = "Legacy.PlaybackController.NextCommand" + LocalApplication_Gallery_Event = "LocalApplication.Gallery.Event" Alexa_Presentation_PresentationDismissed = "Alexa.Presentation.PresentationDismissed" + EffectsController_StateReceiptChangeRequest = "EffectsController.StateReceiptChangeRequest" + LocalApplication_Alexa_Translation_LiveTranslation_Event = "LocalApplication.Alexa.Translation.LiveTranslation.Event" + LocalApplication_AlexaNotifications_Event = "LocalApplication.AlexaNotifications.Event" + REMINDER_DELETED = "REMINDER_DELETED" + GameEngine_InputHandlerEvent = "GameEngine.InputHandlerEvent" + Legacy_PlaylistController_Response = "Legacy.PlaylistController.Response" + LocalApplication_KnightHome_Event = "LocalApplication.KnightHome.Event" + Legacy_ListRenderer_ListItemEvent = "Legacy.ListRenderer.ListItemEvent" AudioPlayer_PlaybackFailed = "AudioPlayer.PlaybackFailed" - AudioPlayer_PlaybackFinished = "AudioPlayer.PlaybackFinished" - AudioPlayer_PlaybackNearlyFinished = "AudioPlayer.PlaybackNearlyFinished" - AudioPlayer_PlaybackStarted = "AudioPlayer.PlaybackStarted" - AudioPlayer_PlaybackStopped = "AudioPlayer.PlaybackStopped" - CardRenderer_DisplayContentFinished = "CardRenderer.DisplayContentFinished" - CardRenderer_DisplayContentStarted = "CardRenderer.DisplayContentStarted" - CardRenderer_ReadContentFinished = "CardRenderer.ReadContentFinished" - CardRenderer_ReadContentStarted = "CardRenderer.ReadContentStarted" - CustomInterfaceController_EventsReceived = "CustomInterfaceController.EventsReceived" - CustomInterfaceController_Expired = "CustomInterfaceController.Expired" - DeviceSetup_SetupCompleted = "DeviceSetup.SetupCompleted" - Display_ElementSelected = "Display.ElementSelected" - Display_UserEvent = "Display.UserEvent" + LocalApplication_KnightHomeThingsToTry_Event = "LocalApplication.KnightHomeThingsToTry.Event" + Legacy_BluetoothNetwork_SetDeviceCategoriesFailed = "Legacy.BluetoothNetwork.SetDeviceCategoriesFailed" + Legacy_ExternalMediaPlayer_Logout = "Legacy.ExternalMediaPlayer.Logout" + Alexa_FileManager_UploadController_UploadFinished = "Alexa.FileManager.UploadController.UploadFinished" + Legacy_ActivityManager_FocusChanged = "Legacy.ActivityManager.FocusChanged" + Legacy_AlertsController_SnoozeCommand = "Legacy.AlertsController.SnoozeCommand" + Legacy_SpeechRecognizer_WakeWordChanged = "Legacy.SpeechRecognizer.WakeWordChanged" + Legacy_ListRenderer_GetListPageByToken = "Legacy.ListRenderer.GetListPageByToken" + MessagingController_UpdateSendMessageStatusRequest = "MessagingController.UpdateSendMessageStatusRequest" FitnessSessionController_FitnessSessionEnded = "FitnessSessionController.FitnessSessionEnded" - FitnessSessionController_FitnessSessionError = "FitnessSessionController.FitnessSessionError" - FitnessSessionController_FitnessSessionPaused = "FitnessSessionController.FitnessSessionPaused" + Alexa_Presentation_APL_RuntimeError = "Alexa.Presentation.APL.RuntimeError" + Legacy_ListRenderer_GetListPageByOrdinal = "Legacy.ListRenderer.GetListPageByOrdinal" FitnessSessionController_FitnessSessionResumed = "FitnessSessionController.FitnessSessionResumed" + IN_SKILL_PRODUCT_SUBSCRIPTION_STARTED = "IN_SKILL_PRODUCT_SUBSCRIPTION_STARTED" + Legacy_DeviceNotification_DeleteNotificationSucceeded = "Legacy.DeviceNotification.DeleteNotificationSucceeded" + Legacy_SpeechSynthesizer_SpeechSynthesizerError = "Legacy.SpeechSynthesizer.SpeechSynthesizerError" + Alexa_Video_Xray_ShowDetailsFailed = "Alexa.Video.Xray.ShowDetailsFailed" + Alexa_FileManager_UploadController_CancelUploadFinished = "Alexa.FileManager.UploadController.CancelUploadFinished" + Legacy_SconeRemoteControl_PlayPause = "Legacy.SconeRemoteControl.PlayPause" + Legacy_DeviceNotification_NotificationEnteredBackground = "Legacy.DeviceNotification.NotificationEnteredBackground" + SKILL_PERMISSION_CHANGED = "SKILL_PERMISSION_CHANGED" + Legacy_AudioPlayer_Metadata = "Legacy.AudioPlayer.Metadata" + Legacy_AudioPlayer_PlaybackStutterStarted = "Legacy.AudioPlayer.PlaybackStutterStarted" + AUDIO_ITEM_PLAYBACK_FINISHED = "AUDIO_ITEM_PLAYBACK_FINISHED" + EffectsController_RequestGuiChangeRequest = "EffectsController.RequestGuiChangeRequest" FitnessSessionController_FitnessSessionStarted = "FitnessSessionController.FitnessSessionStarted" - GameEngine_InputHandlerEvent = "GameEngine.InputHandlerEvent" - Messaging_MessageReceived = "Messaging.MessageReceived" - MessagingController_UpdateConversationsStatus = "MessagingController.UpdateConversationsStatus" - MessagingController_UpdateMessagesStatusRequest = "MessagingController.UpdateMessagesStatusRequest" - MessagingController_UpdateSendMessageStatusRequest = "MessagingController.UpdateSendMessageStatusRequest" - MessagingController_UploadConversations = "MessagingController.UploadConversations" - PlaybackController_NextCommandIssued = "PlaybackController.NextCommandIssued" + Legacy_PlaybackController_LyricsViewedEvent = "Legacy.PlaybackController.LyricsViewedEvent" + Legacy_ExternalMediaPlayer_Login = "Legacy.ExternalMediaPlayer.Login" PlaybackController_PauseCommandIssued = "PlaybackController.PauseCommandIssued" - PlaybackController_PlayCommandIssued = "PlaybackController.PlayCommandIssued" - PlaybackController_PreviousCommandIssued = "PlaybackController.PreviousCommandIssued" - EffectsController_RequestEffectChangeRequest = "EffectsController.RequestEffectChangeRequest" - EffectsController_RequestGuiChangeRequest = "EffectsController.RequestGuiChangeRequest" - EffectsController_StateReceiptChangeRequest = "EffectsController.StateReceiptChangeRequest" - Alexa_Video_Xray_ShowDetailsSuccessful = "Alexa.Video.Xray.ShowDetailsSuccessful" - Alexa_Video_Xray_ShowDetailsFailed = "Alexa.Video.Xray.ShowDetailsFailed" + Legacy_MediaPlayer_PlaybackIdle = "Legacy.MediaPlayer.PlaybackIdle" + Legacy_SconeRemoteControl_Previous = "Legacy.SconeRemoteControl.Previous" + DeviceSetup_SetupCompleted = "DeviceSetup.SetupCompleted" + Legacy_MediaPlayer_PlaybackNearlyFinished = "Legacy.MediaPlayer.PlaybackNearlyFinished" + LocalApplication_todoRenderer_Event = "LocalApplication.todoRenderer.Event" + Legacy_BluetoothNetwork_SetDeviceCategoriesSucceeded = "Legacy.BluetoothNetwork.SetDeviceCategoriesSucceeded" + Legacy_BluetoothNetwork_MediaControlSuccess = "Legacy.BluetoothNetwork.MediaControlSuccess" + Legacy_HomeAutoWifiController_SsdpDiscoveryFinished = "Legacy.HomeAutoWifiController.SsdpDiscoveryFinished" + Alexa_Presentation_APL_LoadIndexListData = "Alexa.Presentation.APL.LoadIndexListData" + IN_SKILL_PRODUCT_SUBSCRIPTION_RENEWED = "IN_SKILL_PRODUCT_SUBSCRIPTION_RENEWED" + Legacy_BluetoothNetwork_MediaControlFailure = "Legacy.BluetoothNetwork.MediaControlFailure" + Legacy_AuxController_EnabledStateChanged = "Legacy.AuxController.EnabledStateChanged" + Legacy_FavoritesController_Response = "Legacy.FavoritesController.Response" + Legacy_ListModel_ListStateUpdateRequest = "Legacy.ListModel.ListStateUpdateRequest" + Legacy_EqualizerController_EqualizerChanged = "Legacy.EqualizerController.EqualizerChanged" + Legacy_MediaGrouping_GroupSyncEvent = "Legacy.MediaGrouping.GroupSyncEvent" + Legacy_FavoritesController_Error = "Legacy.FavoritesController.Error" + Legacy_ListModel_GetPageByTokenRequest = "Legacy.ListModel.GetPageByTokenRequest" + Legacy_ActivityManager_ActivityInterrupted = "Legacy.ActivityManager.ActivityInterrupted" + Legacy_MeetingClientController_Event = "Legacy.MeetingClientController.Event" + Legacy_Presentation_PresentationDismissedEvent = "Legacy.Presentation.PresentationDismissedEvent" + Legacy_Spotify_Event = "Legacy.Spotify.Event" + Legacy_ExternalMediaPlayer_Error = "Legacy.ExternalMediaPlayer.Error" + Legacy_AuxController_DirectionChanged = "Legacy.AuxController.DirectionChanged" + AudioPlayer_PlaybackNearlyFinished = "AudioPlayer.PlaybackNearlyFinished" + Alexa_Camera_PhotoCaptureController_CaptureFinished = "Alexa.Camera.PhotoCaptureController.CaptureFinished" + Legacy_UDPController_BroadcastResponse = "Legacy.UDPController.BroadcastResponse" + Legacy_AudioPlayer_PlaybackResumed = "Legacy.AudioPlayer.PlaybackResumed" + Legacy_DeviceNotification_DeleteNotificationFailed = "Legacy.DeviceNotification.DeleteNotificationFailed" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -279,7 +283,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, EventNameType): return False @@ -287,6 +291,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_publications.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_publications.py index 327e856e..c759fa06 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_publications.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_publications.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/extension_initialization_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/extension_initialization_request.py new file mode 100644 index 00000000..c6be26fa --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/extension_initialization_request.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ExtensionInitializationRequest(object): + """ + Represents a request to automatically initialize an extension by a runtime. + + + :param uri: The extension's URI. + :type uri: (optional) str + :param settings: Default initialization extension settings. + :type settings: (optional) object + + """ + deserialized_types = { + 'uri': 'str', + 'settings': 'object' + } # type: Dict + + attribute_map = { + 'uri': 'uri', + 'settings': 'settings' + } # type: Dict + supports_multiple_types = False + + def __init__(self, uri=None, settings=None): + # type: (Optional[str], Optional[object]) -> None + """Represents a request to automatically initialize an extension by a runtime. + + :param uri: The extension's URI. + :type uri: (optional) str + :param settings: Default initialization extension settings. + :type settings: (optional) object + """ + self.__discriminator_value = None # type: str + + self.uri = uri + self.settings = settings + + 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, ExtensionInitializationRequest): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/extension_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/extension_request.py new file mode 100644 index 00000000..c62b42af --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/extension_request.py @@ -0,0 +1,108 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ExtensionRequest(object): + """ + Represents a request for a runtime extension. Extensions are optional enhancements to a runtime that provide additional sources of data, commands, and event handlers. + + + :param uri: The extension's URI. + :type uri: (optional) str + + """ + deserialized_types = { + 'uri': 'str' + } # type: Dict + + attribute_map = { + 'uri': 'uri' + } # type: Dict + supports_multiple_types = False + + def __init__(self, uri=None): + # type: (Optional[str]) -> None + """Represents a request for a runtime extension. Extensions are optional enhancements to a runtime that provide additional sources of data, commands, and event handlers. + + :param uri: The extension's URI. + :type uri: (optional) str + """ + self.__discriminator_value = None # type: str + + self.uri = uri + + 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, ExtensionRequest): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_apis.py index dd6496c4..5b46f0b5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_apis.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_apis.py @@ -21,17 +21,17 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info import LocalizedFlashBriefingInfoV1 + from ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info import LocalizedFlashBriefingInfo as LocalizedFlashBriefingInfo_ff538220 class FlashBriefingApis(object): """ - Defines the structure for flash briefing api of the skill. + Defines the structure of flash briefing api in the skill manifest. - :param locales: Defines the structure for locale specific flash briefing api information. + :param locales: Object that contains <locale> objects for each supported locale. :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info.LocalizedFlashBriefingInfo) """ @@ -45,10 +45,10 @@ class FlashBriefingApis(object): supports_multiple_types = False def __init__(self, locales=None): - # type: (Optional[Dict[str, LocalizedFlashBriefingInfoV1]]) -> None - """Defines the structure for flash briefing api of the skill. + # type: (Optional[Dict[str, LocalizedFlashBriefingInfo_ff538220]]) -> None + """Defines the structure of flash briefing api in the skill manifest. - :param locales: Defines the structure for locale specific flash briefing api information. + :param locales: Object that contains <locale> objects for each supported locale. :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info.LocalizedFlashBriefingInfo) """ self.__discriminator_value = None # type: str diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_content_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_content_type.py index 12fc4975..7658de56 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_content_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_content_type.py @@ -21,24 +21,23 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class FlashBriefingContentType(Enum): """ - format of the feed content. + Format of the feed content. - Allowed enum values: [TEXT, AUDIO, AUDIO_AND_VIDEO] + Allowed enum values: [TEXT, AUDIO] """ TEXT = "TEXT" AUDIO = "AUDIO" - AUDIO_AND_VIDEO = "AUDIO_AND_VIDEO" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, FlashBriefingContentType): return False @@ -62,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_genre.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_genre.py index c26f408d..abbdcc1b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_genre.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_genre.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -48,7 +48,7 @@ class FlashBriefingGenre(Enum): OTHER = "OTHER" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -64,7 +64,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, FlashBriefingGenre): return False @@ -72,6 +72,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_update_frequency.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_update_frequency.py index 3e5a037c..4ddb281b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_update_frequency.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_update_frequency.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -31,15 +31,14 @@ class FlashBriefingUpdateFrequency(Enum): - Allowed enum values: [HOURLY, DAILY, WEEKLY, UNKNOWN] + Allowed enum values: [HOURLY, DAILY, WEEKLY] """ HOURLY = "HOURLY" DAILY = "DAILY" WEEKLY = "WEEKLY" - UNKNOWN = "UNKNOWN" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, FlashBriefingUpdateFrequency): return False @@ -63,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/free_trial_information.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/free_trial_information.py new file mode 100644 index 00000000..9a99cc08 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/free_trial_information.py @@ -0,0 +1,108 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class FreeTrialInformation(object): + """ + Defines the structure for paid skill product free trial information. + + + :param free_trial_duration: Defines the free trial period for the paid skill product, in ISO_8601#Durations format. + :type free_trial_duration: (optional) str + + """ + deserialized_types = { + 'free_trial_duration': 'str' + } # type: Dict + + attribute_map = { + 'free_trial_duration': 'freeTrialDuration' + } # type: Dict + supports_multiple_types = False + + def __init__(self, free_trial_duration=None): + # type: (Optional[str]) -> None + """Defines the structure for paid skill product free trial information. + + :param free_trial_duration: Defines the free trial period for the paid skill product, in ISO_8601#Durations format. + :type free_trial_duration: (optional) str + """ + self.__discriminator_value = None # type: str + + self.free_trial_duration = free_trial_duration + + 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, FreeTrialInformation): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/friendly_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/friendly_name.py new file mode 100644 index 00000000..5a08055f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/friendly_name.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.localized_name import LocalizedName as LocalizedName_8700080 + + +class FriendlyName(object): + """ + Localized App name + + + :param default: Default app name + :type default: (optional) str + :param localized_names: Localized app names. + :type localized_names: (optional) list[ask_smapi_model.v1.skill.manifest.localized_name.LocalizedName] + + """ + deserialized_types = { + 'default': 'str', + 'localized_names': 'list[ask_smapi_model.v1.skill.manifest.localized_name.LocalizedName]' + } # type: Dict + + attribute_map = { + 'default': 'default', + 'localized_names': 'localizedNames' + } # type: Dict + supports_multiple_types = False + + def __init__(self, default=None, localized_names=None): + # type: (Optional[str], Optional[List[LocalizedName_8700080]]) -> None + """Localized App name + + :param default: Default app name + :type default: (optional) str + :param localized_names: Localized app names. + :type localized_names: (optional) list[ask_smapi_model.v1.skill.manifest.localized_name.LocalizedName] + """ + self.__discriminator_value = None # type: str + + self.default = default + self.localized_names = localized_names + + 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, FriendlyName): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_controller_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_controller_interface.py index dd93eb15..7382457f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_controller_interface.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_controller_interface.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_support.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_support_requirement.py similarity index 86% rename from ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_support.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_support_requirement.py index bac02085..41518192 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_support.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_support_requirement.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class GadgetSupport(Enum): +class GadgetSupportRequirement(Enum): """ Specifies if gadget support is required/optional for this skill to work. @@ -37,7 +37,7 @@ class GadgetSupport(Enum): OPTIONAL = "OPTIONAL" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,14 +53,14 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" - if not isinstance(other, GadgetSupport): + if not isinstance(other, GadgetSupportRequirement): return False return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/game_engine_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/game_engine_interface.py index c5295fae..1548e3d1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/game_engine_interface.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/game_engine_interface.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_interface.py index 8428ea52..ea26fc6d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_interface.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_interface.py @@ -21,11 +21,8 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.health_request import HealthRequestV1 - from ask_smapi_model.v1.skill.manifest.version import VersionV1 - from ask_smapi_model.v1.skill.manifest.localized_health_info import LocalizedHealthInfoV1 class HealthInterface(object): @@ -33,48 +30,34 @@ class HealthInterface(object): :param namespace: Name of the interface. :type namespace: (optional) str - :param version: - :type version: (optional) ask_smapi_model.v1.skill.manifest.version.Version - :param requests: Defines the details of requests that a health skill is capable of handling. - :type requests: (optional) list[ask_smapi_model.v1.skill.manifest.health_request.HealthRequest] - :param locales: Defines the list for health skill locale specific publishing information in the skill manifest. - :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.localized_health_info.LocalizedHealthInfo) + :param version: defines the version of skill interface. + :type version: (optional) str """ deserialized_types = { 'namespace': 'str', - 'version': 'ask_smapi_model.v1.skill.manifest.version.Version', - 'requests': 'list[ask_smapi_model.v1.skill.manifest.health_request.HealthRequest]', - 'locales': 'dict(str, ask_smapi_model.v1.skill.manifest.localized_health_info.LocalizedHealthInfo)' + 'version': 'str' } # type: Dict attribute_map = { 'namespace': 'namespace', - 'version': 'version', - 'requests': 'requests', - 'locales': 'locales' + 'version': 'version' } # type: Dict supports_multiple_types = False - def __init__(self, namespace=None, version=None, requests=None, locales=None): - # type: (Optional[str], Optional[VersionV1], Optional[List[HealthRequestV1]], Optional[Dict[str, LocalizedHealthInfoV1]]) -> None + def __init__(self, namespace=None, version=None): + # type: (Optional[str], Optional[str]) -> None """ :param namespace: Name of the interface. :type namespace: (optional) str - :param version: - :type version: (optional) ask_smapi_model.v1.skill.manifest.version.Version - :param requests: Defines the details of requests that a health skill is capable of handling. - :type requests: (optional) list[ask_smapi_model.v1.skill.manifest.health_request.HealthRequest] - :param locales: Defines the list for health skill locale specific publishing information in the skill manifest. - :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.localized_health_info.LocalizedHealthInfo) + :param version: defines the version of skill interface. + :type version: (optional) str """ self.__discriminator_value = None # type: str self.namespace = namespace self.version = version - self.requests = requests - self.locales = locales def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/house_hold_list.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/house_hold_list.py index 222fdda0..2ffddf6c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/house_hold_list.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/house_hold_list.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/interface.py index 5d127ce3..67381c60 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/interface.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/interface.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,9 +37,11 @@ class Interface(object): This is an abstract class. Use the following mapping, to figure out the model class to be instantiated, that sets ``type`` variable. + | ALEXA_SEARCH: :py:class:`ask_smapi_model.v1.skill.manifest.alexa_search.AlexaSearch`, + | | ALEXA_PRESENTATION_APL: :py:class:`ask_smapi_model.v1.skill.manifest.alexa_presentation_apl_interface.AlexaPresentationAplInterface`, | - | CUSTOM_INTERFACE: :py:class:`ask_smapi_model.v1.skill.manifest.custom_interface.CustomInterface`, + | APP_LINKS: :py:class:`ask_smapi_model.v1.skill.manifest.app_link_interface.AppLinkInterface`, | | ALEXA_PRESENTATION_HTML: :py:class:`ask_smapi_model.v1.skill.manifest.alexa_presentation_html_interface.AlexaPresentationHtmlInterface`, | @@ -47,6 +49,10 @@ class Interface(object): | | GAME_ENGINE: :py:class:`ask_smapi_model.v1.skill.manifest.game_engine_interface.GameEngineInterface`, | + | APP_LINKS_V2: :py:class:`ask_smapi_model.v1.skill.manifest.app_link_v2_interface.AppLinkV2Interface`, + | + | ALEXA_DATASTORE_PACKAGEMANAGER: :py:class:`ask_smapi_model.v1.skill.manifest.alexa_data_store_package_manager_interface.AlexaDataStorePackageManagerInterface`, + | | RENDER_TEMPLATE: :py:class:`ask_smapi_model.v1.skill.manifest.display_interface.DisplayInterface`, | | GADGET_CONTROLLER: :py:class:`ask_smapi_model.v1.skill.manifest.gadget_controller_interface.GadgetControllerInterface`, @@ -64,11 +70,14 @@ class Interface(object): supports_multiple_types = False discriminator_value_class_map = { + 'ALEXA_SEARCH': 'ask_smapi_model.v1.skill.manifest.alexa_search.AlexaSearch', 'ALEXA_PRESENTATION_APL': 'ask_smapi_model.v1.skill.manifest.alexa_presentation_apl_interface.AlexaPresentationAplInterface', - 'CUSTOM_INTERFACE': 'ask_smapi_model.v1.skill.manifest.custom_interface.CustomInterface', + 'APP_LINKS': 'ask_smapi_model.v1.skill.manifest.app_link_interface.AppLinkInterface', 'ALEXA_PRESENTATION_HTML': 'ask_smapi_model.v1.skill.manifest.alexa_presentation_html_interface.AlexaPresentationHtmlInterface', 'AUDIO_PLAYER': 'ask_smapi_model.v1.skill.manifest.audio_interface.AudioInterface', 'GAME_ENGINE': 'ask_smapi_model.v1.skill.manifest.game_engine_interface.GameEngineInterface', + 'APP_LINKS_V2': 'ask_smapi_model.v1.skill.manifest.app_link_v2_interface.AppLinkV2Interface', + 'ALEXA_DATASTORE_PACKAGEMANAGER': 'ask_smapi_model.v1.skill.manifest.alexa_data_store_package_manager_interface.AlexaDataStorePackageManagerInterface', 'RENDER_TEMPLATE': 'ask_smapi_model.v1.skill.manifest.display_interface.DisplayInterface', 'GADGET_CONTROLLER': 'ask_smapi_model.v1.skill.manifest.gadget_controller_interface.GadgetControllerInterface', 'VIDEO_APP': 'ask_smapi_model.v1.skill.manifest.video_app_interface.VideoAppInterface' diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/interface_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/interface_type.py new file mode 100644 index 00000000..4e6dd28b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/interface_type.py @@ -0,0 +1,83 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class InterfaceType(Enum): + """ + Name of the interface. + + + + Allowed enum values: [AUDIO_PLAYER, VIDEO_APP, RENDER_TEMPLATE, GAME_ENGINE, GADGET_CONTROLLER, CAN_FULFILL_INTENT_REQUEST, ALEXA_PRESENTATION_APL, ALEXA_CAMERA_PHOTO_CAPTURE_CONTROLLER, ALEXA_CAMERA_VIDEO_CAPTURE_CONTROLLER, ALEXA_FILE_MANAGER_UPLOAD_CONTROLLER, CUSTOM_INTERFACE, ALEXA_AUGMENTATION_EFFECTS_CONTROLLER, APP_LINKS, ALEXA_EXTENSION, APP_LINKS_V2, ALEXA_SEARCH, ALEXA_DATASTORE_PACKAGEMANAGER, ALEXA_DATA_STORE, CUSTOMER_UTTERANCE_TRANSCRIPT] + """ + AUDIO_PLAYER = "AUDIO_PLAYER" + VIDEO_APP = "VIDEO_APP" + RENDER_TEMPLATE = "RENDER_TEMPLATE" + GAME_ENGINE = "GAME_ENGINE" + GADGET_CONTROLLER = "GADGET_CONTROLLER" + CAN_FULFILL_INTENT_REQUEST = "CAN_FULFILL_INTENT_REQUEST" + ALEXA_PRESENTATION_APL = "ALEXA_PRESENTATION_APL" + ALEXA_CAMERA_PHOTO_CAPTURE_CONTROLLER = "ALEXA_CAMERA_PHOTO_CAPTURE_CONTROLLER" + ALEXA_CAMERA_VIDEO_CAPTURE_CONTROLLER = "ALEXA_CAMERA_VIDEO_CAPTURE_CONTROLLER" + ALEXA_FILE_MANAGER_UPLOAD_CONTROLLER = "ALEXA_FILE_MANAGER_UPLOAD_CONTROLLER" + CUSTOM_INTERFACE = "CUSTOM_INTERFACE" + ALEXA_AUGMENTATION_EFFECTS_CONTROLLER = "ALEXA_AUGMENTATION_EFFECTS_CONTROLLER" + APP_LINKS = "APP_LINKS" + ALEXA_EXTENSION = "ALEXA_EXTENSION" + APP_LINKS_V2 = "APP_LINKS_V2" + ALEXA_SEARCH = "ALEXA_SEARCH" + ALEXA_DATASTORE_PACKAGEMANAGER = "ALEXA_DATASTORE_PACKAGEMANAGER" + ALEXA_DATA_STORE = "ALEXA_DATA_STORE" + CUSTOMER_UTTERANCE_TRANSCRIPT = "CUSTOMER_UTTERANCE_TRANSCRIPT" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, InterfaceType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/ios_app_store_common_scheme_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/ios_app_store_common_scheme_name.py new file mode 100644 index 00000000..bb929414 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/ios_app_store_common_scheme_name.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class IOSAppStoreCommonSchemeName(Enum): + """ + supported common schemes for IOS_APP_STORE. MAPS is for \"maps:\" and TEL is for \"tel:\". + + + + Allowed enum values: [MAPS, TEL] + """ + MAPS = "MAPS" + TEL = "TEL" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, IOSAppStoreCommonSchemeName): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/knowledge_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/knowledge_apis.py new file mode 100644 index 00000000..85f55dd4 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/knowledge_apis.py @@ -0,0 +1,117 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.localized_knowledge_information import LocalizedKnowledgeInformation as LocalizedKnowledgeInformation_59e51789 + from ask_smapi_model.v1.skill.manifest.knowledge_apis_enablement_channel import KnowledgeApisEnablementChannel as KnowledgeApisEnablementChannel_f9390f08 + + +class KnowledgeApis(object): + """ + defines the structure for the knowledge api of the skill. + + + :param enablement_channel: + :type enablement_channel: (optional) ask_smapi_model.v1.skill.manifest.knowledge_apis_enablement_channel.KnowledgeApisEnablementChannel + :param locales: Defines the structure of locale specific knowledge information in the skill manifest. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.localized_knowledge_information.LocalizedKnowledgeInformation) + + """ + deserialized_types = { + 'enablement_channel': 'ask_smapi_model.v1.skill.manifest.knowledge_apis_enablement_channel.KnowledgeApisEnablementChannel', + 'locales': 'dict(str, ask_smapi_model.v1.skill.manifest.localized_knowledge_information.LocalizedKnowledgeInformation)' + } # type: Dict + + attribute_map = { + 'enablement_channel': 'enablementChannel', + 'locales': 'locales' + } # type: Dict + supports_multiple_types = False + + def __init__(self, enablement_channel=None, locales=None): + # type: (Optional[KnowledgeApisEnablementChannel_f9390f08], Optional[Dict[str, LocalizedKnowledgeInformation_59e51789]]) -> None + """defines the structure for the knowledge api of the skill. + + :param enablement_channel: + :type enablement_channel: (optional) ask_smapi_model.v1.skill.manifest.knowledge_apis_enablement_channel.KnowledgeApisEnablementChannel + :param locales: Defines the structure of locale specific knowledge information in the skill manifest. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.localized_knowledge_information.LocalizedKnowledgeInformation) + """ + self.__discriminator_value = None # type: str + + self.enablement_channel = enablement_channel + self.locales = locales + + 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, KnowledgeApis): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/knowledge_apis_enablement_channel.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/knowledge_apis_enablement_channel.py new file mode 100644 index 00000000..c9808fa2 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/knowledge_apis_enablement_channel.py @@ -0,0 +1,67 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class KnowledgeApisEnablementChannel(Enum): + """ + Defines how the skill can be enabled by developers. values can be set to 'PUBLIC' (in Alexa Skill Store), 'ASP' (A4R/A4H vendor devices), or 'A4B' Public and ASP selections must have \"distributionMode\" = 'PUBLIC' and will only be eligible for distribution on personal or vendor (A4H/A4R or A4B) devices. + + + + Allowed enum values: [PUBLIC, ASP, A4B] + """ + PUBLIC = "PUBLIC" + ASP = "ASP" + A4B = "A4B" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, KnowledgeApisEnablementChannel): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_endpoint.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_endpoint.py index f6239350..60fda6ee 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_endpoint.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_endpoint.py @@ -21,8 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime + from ask_smapi_model.v1.skill.manifest.lambda_ssl_certificate_type import LambdaSSLCertificateType as LambdaSSLCertificateType_50ec1486 class LambdaEndpoint(object): @@ -30,29 +31,36 @@ class LambdaEndpoint(object): Contains the uri field. This sets the global default endpoint. - :param uri: Amazon Resource Name (ARN) of the skill's Lambda function or HTTPS URL. + :param uri: Amazon Resource Name (ARN) of the Lambda function. :type uri: (optional) str + :param ssl_certificate_type: + :type ssl_certificate_type: (optional) ask_smapi_model.v1.skill.manifest.lambda_ssl_certificate_type.LambdaSSLCertificateType """ deserialized_types = { - 'uri': 'str' + 'uri': 'str', + 'ssl_certificate_type': 'ask_smapi_model.v1.skill.manifest.lambda_ssl_certificate_type.LambdaSSLCertificateType' } # type: Dict attribute_map = { - 'uri': 'uri' + 'uri': 'uri', + 'ssl_certificate_type': 'sslCertificateType' } # type: Dict supports_multiple_types = False - def __init__(self, uri=None): - # type: (Optional[str]) -> None + def __init__(self, uri=None, ssl_certificate_type=None): + # type: (Optional[str], Optional[LambdaSSLCertificateType_50ec1486]) -> None """Contains the uri field. This sets the global default endpoint. - :param uri: Amazon Resource Name (ARN) of the skill's Lambda function or HTTPS URL. + :param uri: Amazon Resource Name (ARN) of the Lambda function. :type uri: (optional) str + :param ssl_certificate_type: + :type ssl_certificate_type: (optional) ask_smapi_model.v1.skill.manifest.lambda_ssl_certificate_type.LambdaSSLCertificateType """ self.__discriminator_value = None # type: str self.uri = uri + self.ssl_certificate_type = ssl_certificate_type def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_region.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_region.py index aeff35d9..22609ad2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_region.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_region.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpointV1 + from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpoint as LambdaEndpoint_87e61436 class LambdaRegion(object): @@ -45,7 +45,7 @@ class LambdaRegion(object): supports_multiple_types = False def __init__(self, endpoint=None): - # type: (Optional[LambdaEndpointV1]) -> None + # type: (Optional[LambdaEndpoint_87e61436]) -> None """Defines the structure of a regional information. :param endpoint: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_ssl_certificate_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_ssl_certificate_type.py new file mode 100644 index 00000000..b12b61e1 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_ssl_certificate_type.py @@ -0,0 +1,67 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class LambdaSSLCertificateType(Enum): + """ + The SSL certificate type of the skill's HTTPS endpoint. Only valid for HTTPS endpoint not for AWS Lambda ARN. + + + + Allowed enum values: [SelfSigned, Wildcard, Trusted] + """ + SelfSigned = "SelfSigned" + Wildcard = "Wildcard" + Trusted = "Trusted" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, LambdaSSLCertificateType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/linked_android_common_intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/linked_android_common_intent.py new file mode 100644 index 00000000..36356fd1 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/linked_android_common_intent.py @@ -0,0 +1,117 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.android_common_intent_name import AndroidCommonIntentName as AndroidCommonIntentName_101c89f6 + from ask_smapi_model.v1.skill.manifest.catalog_name import CatalogName as CatalogName_f3573200 + + +class LinkedAndroidCommonIntent(object): + """ + Android common intents associated with the skill + + + :param intent_name: + :type intent_name: (optional) ask_smapi_model.v1.skill.manifest.android_common_intent_name.AndroidCommonIntentName + :param catalog_type: + :type catalog_type: (optional) ask_smapi_model.v1.skill.manifest.catalog_name.CatalogName + + """ + deserialized_types = { + 'intent_name': 'ask_smapi_model.v1.skill.manifest.android_common_intent_name.AndroidCommonIntentName', + 'catalog_type': 'ask_smapi_model.v1.skill.manifest.catalog_name.CatalogName' + } # type: Dict + + attribute_map = { + 'intent_name': 'intentName', + 'catalog_type': 'catalogType' + } # type: Dict + supports_multiple_types = False + + def __init__(self, intent_name=None, catalog_type=None): + # type: (Optional[AndroidCommonIntentName_101c89f6], Optional[CatalogName_f3573200]) -> None + """Android common intents associated with the skill + + :param intent_name: + :type intent_name: (optional) ask_smapi_model.v1.skill.manifest.android_common_intent_name.AndroidCommonIntentName + :param catalog_type: + :type catalog_type: (optional) ask_smapi_model.v1.skill.manifest.catalog_name.CatalogName + """ + self.__discriminator_value = None # type: str + + self.intent_name = intent_name + self.catalog_type = catalog_type + + 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, LinkedAndroidCommonIntent): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/linked_application.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/linked_application.py new file mode 100644 index 00000000..cbc97988 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/linked_application.py @@ -0,0 +1,139 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.catalog_info import CatalogInfo as CatalogInfo_3fade9c6 + from ask_smapi_model.v1.skill.manifest.android_custom_intent import AndroidCustomIntent as AndroidCustomIntent_f7a91c8f + from ask_smapi_model.v1.skill.manifest.friendly_name import FriendlyName as FriendlyName_168112fe + + +class LinkedApplication(object): + """ + Applications associated with the skill. + + + :param catalog_info: + :type catalog_info: (optional) ask_smapi_model.v1.skill.manifest.catalog_info.CatalogInfo + :param custom_schemes: Supported schemes + :type custom_schemes: (optional) list[str] + :param domains: Supported domains + :type domains: (optional) list[str] + :param friendly_name: + :type friendly_name: (optional) ask_smapi_model.v1.skill.manifest.friendly_name.FriendlyName + :param android_custom_intents: Supported android custom intent + :type android_custom_intents: (optional) list[ask_smapi_model.v1.skill.manifest.android_custom_intent.AndroidCustomIntent] + + """ + deserialized_types = { + 'catalog_info': 'ask_smapi_model.v1.skill.manifest.catalog_info.CatalogInfo', + 'custom_schemes': 'list[str]', + 'domains': 'list[str]', + 'friendly_name': 'ask_smapi_model.v1.skill.manifest.friendly_name.FriendlyName', + 'android_custom_intents': 'list[ask_smapi_model.v1.skill.manifest.android_custom_intent.AndroidCustomIntent]' + } # type: Dict + + attribute_map = { + 'catalog_info': 'catalogInfo', + 'custom_schemes': 'customSchemes', + 'domains': 'domains', + 'friendly_name': 'friendlyName', + 'android_custom_intents': 'androidCustomIntents' + } # type: Dict + supports_multiple_types = False + + def __init__(self, catalog_info=None, custom_schemes=None, domains=None, friendly_name=None, android_custom_intents=None): + # type: (Optional[CatalogInfo_3fade9c6], Optional[List[object]], Optional[List[object]], Optional[FriendlyName_168112fe], Optional[List[AndroidCustomIntent_f7a91c8f]]) -> None + """Applications associated with the skill. + + :param catalog_info: + :type catalog_info: (optional) ask_smapi_model.v1.skill.manifest.catalog_info.CatalogInfo + :param custom_schemes: Supported schemes + :type custom_schemes: (optional) list[str] + :param domains: Supported domains + :type domains: (optional) list[str] + :param friendly_name: + :type friendly_name: (optional) ask_smapi_model.v1.skill.manifest.friendly_name.FriendlyName + :param android_custom_intents: Supported android custom intent + :type android_custom_intents: (optional) list[ask_smapi_model.v1.skill.manifest.android_custom_intent.AndroidCustomIntent] + """ + self.__discriminator_value = None # type: str + + self.catalog_info = catalog_info + self.custom_schemes = custom_schemes + self.domains = domains + self.friendly_name = friendly_name + self.android_custom_intents = android_custom_intents + + 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, LinkedApplication): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/linked_common_schemes.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/linked_common_schemes.py new file mode 100644 index 00000000..0d3327b9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/linked_common_schemes.py @@ -0,0 +1,117 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.ios_app_store_common_scheme_name import IOSAppStoreCommonSchemeName as IOSAppStoreCommonSchemeName_d8d4b3f2 + from ask_smapi_model.v1.skill.manifest.play_store_common_scheme_name import PlayStoreCommonSchemeName as PlayStoreCommonSchemeName_79baf61b + + +class LinkedCommonSchemes(object): + """ + Allow developer to declare their skill to link to the speicified common schemes + + + :param ios_app_store: + :type ios_app_store: (optional) list[ask_smapi_model.v1.skill.manifest.ios_app_store_common_scheme_name.IOSAppStoreCommonSchemeName] + :param google_play_store: + :type google_play_store: (optional) list[ask_smapi_model.v1.skill.manifest.play_store_common_scheme_name.PlayStoreCommonSchemeName] + + """ + deserialized_types = { + 'ios_app_store': 'list[ask_smapi_model.v1.skill.manifest.ios_app_store_common_scheme_name.IOSAppStoreCommonSchemeName]', + 'google_play_store': 'list[ask_smapi_model.v1.skill.manifest.play_store_common_scheme_name.PlayStoreCommonSchemeName]' + } # type: Dict + + attribute_map = { + 'ios_app_store': 'IOS_APP_STORE', + 'google_play_store': 'GOOGLE_PLAY_STORE' + } # type: Dict + supports_multiple_types = False + + def __init__(self, ios_app_store=None, google_play_store=None): + # type: (Optional[List[IOSAppStoreCommonSchemeName_d8d4b3f2]], Optional[List[PlayStoreCommonSchemeName_79baf61b]]) -> None + """Allow developer to declare their skill to link to the speicified common schemes + + :param ios_app_store: + :type ios_app_store: (optional) list[ask_smapi_model.v1.skill.manifest.ios_app_store_common_scheme_name.IOSAppStoreCommonSchemeName] + :param google_play_store: + :type google_play_store: (optional) list[ask_smapi_model.v1.skill.manifest.play_store_common_scheme_name.PlayStoreCommonSchemeName] + """ + self.__discriminator_value = None # type: str + + self.ios_app_store = ios_app_store + self.google_play_store = google_play_store + + 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, LinkedCommonSchemes): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/locales_by_automatic_cloned_locale.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/locales_by_automatic_cloned_locale.py new file mode 100644 index 00000000..b3f8b902 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/locales_by_automatic_cloned_locale.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class LocalesByAutomaticClonedLocale(object): + """ + maps source locale to list of target locales. Source and target locales should be with the same language. + + + :param source: Locale where the metadata and model will be copied from. For example: en-US. This locale must already exist in the skill. + :type source: (optional) str + :param targets: Optional. List of locales where the metadata and model will be copied to. All configuration of source locale will be copied, so target locales do not have to exist before. Defaults to all locales with the same language as the sourceLocale. + :type targets: (optional) list[str] + + """ + deserialized_types = { + 'source': 'str', + 'targets': 'list[str]' + } # type: Dict + + attribute_map = { + 'source': 'source', + 'targets': 'targets' + } # type: Dict + supports_multiple_types = False + + def __init__(self, source=None, targets=None): + # type: (Optional[str], Optional[List[object]]) -> None + """maps source locale to list of target locales. Source and target locales should be with the same language. + + :param source: Locale where the metadata and model will be copied from. For example: en-US. This locale must already exist in the skill. + :type source: (optional) str + :param targets: Optional. List of locales where the metadata and model will be copied to. All configuration of source locale will be copied, so target locales do not have to exist before. Defaults to all locales with the same language as the sourceLocale. + :type targets: (optional) list[str] + """ + self.__discriminator_value = None # type: str + + self.source = source + self.targets = targets + + 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, LocalesByAutomaticClonedLocale): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/localized_flash_briefing_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_flash_briefing_info.py index c40c21f9..83301564 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_flash_briefing_info.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_flash_briefing_info.py @@ -21,14 +21,14 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info_items import LocalizedFlashBriefingInfoItemsV1 + from ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info_items import LocalizedFlashBriefingInfoItems as LocalizedFlashBriefingInfoItems_61b30981 class LocalizedFlashBriefingInfo(object): """ - Defines the localized flash briefing api information. + Defines the structure of a localized flash briefing information. :param feeds: Defines the structure for a feed information in the skill manifest. @@ -49,8 +49,8 @@ class LocalizedFlashBriefingInfo(object): supports_multiple_types = False def __init__(self, feeds=None, custom_error_message=None): - # type: (Optional[List[LocalizedFlashBriefingInfoItemsV1]], Optional[str]) -> None - """Defines the localized flash briefing api information. + # type: (Optional[List[LocalizedFlashBriefingInfoItems_61b30981]], Optional[str]) -> None + """Defines the structure of a localized flash briefing information. :param feeds: Defines the structure for a feed information in the skill manifest. :type feeds: (optional) list[ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info_items.LocalizedFlashBriefingInfoItems] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_flash_briefing_info_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_flash_briefing_info_items.py index 7c0cefb1..50029608 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_flash_briefing_info_items.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_flash_briefing_info_items.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.flash_briefing_genre import FlashBriefingGenreV1 - from ask_smapi_model.v1.skill.manifest.flash_briefing_content_type import FlashBriefingContentTypeV1 - from ask_smapi_model.v1.skill.manifest.flash_briefing_update_frequency import FlashBriefingUpdateFrequencyV1 + from ask_smapi_model.v1.skill.manifest.flash_briefing_update_frequency import FlashBriefingUpdateFrequency as FlashBriefingUpdateFrequency_fc6f8314 + from ask_smapi_model.v1.skill.manifest.flash_briefing_content_type import FlashBriefingContentType as FlashBriefingContentType_2621043a + from ask_smapi_model.v1.skill.manifest.flash_briefing_genre import FlashBriefingGenre as FlashBriefingGenre_e8bad3c5 class LocalizedFlashBriefingInfoItems(object): @@ -77,7 +77,7 @@ class LocalizedFlashBriefingInfoItems(object): supports_multiple_types = False def __init__(self, logical_name=None, name=None, url=None, image_uri=None, content_type=None, genre=None, update_frequency=None, vui_preamble=None, is_default=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[FlashBriefingContentTypeV1], Optional[FlashBriefingGenreV1], Optional[FlashBriefingUpdateFrequencyV1], Optional[str], Optional[bool]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[FlashBriefingContentType_2621043a], Optional[FlashBriefingGenre_e8bad3c5], Optional[FlashBriefingUpdateFrequency_fc6f8314], Optional[str], Optional[bool]) -> None """ :param logical_name: Logical name of the feed. This is used to signify relation among feeds across different locales. Example If you have \"weather\" feed in multiple locale then consider naming it \"weather_update\" and we will make sure to play the right feed if customer changes the language on device. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_knowledge_information.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_knowledge_information.py new file mode 100644 index 00000000..54409dd5 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_knowledge_information.py @@ -0,0 +1,108 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class LocalizedKnowledgeInformation(object): + """ + Defines the structure of localized knowledge information in the skill manifest. + + + :param answer_attribution: enables skill developers to prepend a custom message to all of their knowledge skill's answers, which can help inform end-users of the skill and data source answering their question. + :type answer_attribution: (optional) str + + """ + deserialized_types = { + 'answer_attribution': 'str' + } # type: Dict + + attribute_map = { + 'answer_attribution': 'answerAttribution' + } # type: Dict + supports_multiple_types = False + + def __init__(self, answer_attribution=None): + # type: (Optional[str]) -> None + """Defines the structure of localized knowledge information in the skill manifest. + + :param answer_attribution: enables skill developers to prepend a custom message to all of their knowledge skill's answers, which can help inform end-users of the skill and data source answering their question. + :type answer_attribution: (optional) str + """ + self.__discriminator_value = None # type: str + + self.answer_attribution = answer_attribution + + 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, LocalizedKnowledgeInformation): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/localized_music_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_music_info.py index 95f4ec9d..5e909272 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_music_info.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_music_info.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.music_alias import MusicAliasV1 - from ask_smapi_model.v1.skill.manifest.music_wordmark import MusicWordmarkV1 - from ask_smapi_model.v1.skill.manifest.music_feature import MusicFeatureV1 + from ask_smapi_model.v1.skill.manifest.music_wordmark import MusicWordmark as MusicWordmark_7fa21758 + from ask_smapi_model.v1.skill.manifest.music_alias import MusicAlias as MusicAlias_d8ed1e1c + from ask_smapi_model.v1.skill.manifest.music_feature import MusicFeature as MusicFeature_126f781c class LocalizedMusicInfo(object): @@ -35,7 +35,7 @@ class LocalizedMusicInfo(object): :param prompt_name: Name to be used when Alexa renders the music skill name. :type prompt_name: (optional) str - :param aliases: + :param aliases: Defines the structure of the music prompt name information in the skill manifest. :type aliases: (optional) list[ask_smapi_model.v1.skill.manifest.music_alias.MusicAlias] :param features: :type features: (optional) list[ask_smapi_model.v1.skill.manifest.music_feature.MusicFeature] @@ -59,12 +59,12 @@ class LocalizedMusicInfo(object): supports_multiple_types = False def __init__(self, prompt_name=None, aliases=None, features=None, wordmark_logos=None): - # type: (Optional[str], Optional[List[MusicAliasV1]], Optional[List[MusicFeatureV1]], Optional[List[MusicWordmarkV1]]) -> None + # type: (Optional[str], Optional[List[MusicAlias_d8ed1e1c]], Optional[List[MusicFeature_126f781c]], Optional[List[MusicWordmark_7fa21758]]) -> None """Defines the structure of localized music information in the skill manifest. :param prompt_name: Name to be used when Alexa renders the music skill name. :type prompt_name: (optional) str - :param aliases: + :param aliases: Defines the structure of the music prompt name information in the skill manifest. :type aliases: (optional) list[ask_smapi_model.v1.skill.manifest.music_alias.MusicAlias] :param features: :type features: (optional) list[ask_smapi_model.v1.skill.manifest.music_feature.MusicFeature] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/create_asr_annotation_set_request_object.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_name.py similarity index 83% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/create_asr_annotation_set_request_object.py rename to ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_name.py index a17e7a0a..8873d5dc 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/create_asr_annotation_set_request_object.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_name.py @@ -21,35 +21,44 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class CreateAsrAnnotationSetRequestObject(object): +class LocalizedName(object): """ + Localized app name - :param name: The name of ASR annotation set. The length of the name cannot exceed 170 chars. Only alphanumeric characters are accepted. + + :param locale: locale + :type locale: (optional) str + :param name: app name :type name: (optional) str """ deserialized_types = { + 'locale': 'str', 'name': 'str' } # type: Dict attribute_map = { + 'locale': 'locale', 'name': 'name' } # type: Dict supports_multiple_types = False - def __init__(self, name=None): - # type: (Optional[str]) -> None - """ + def __init__(self, locale=None, name=None): + # type: (Optional[str], Optional[str]) -> None + """Localized app name - :param name: The name of ASR annotation set. The length of the name cannot exceed 170 chars. Only alphanumeric characters are accepted. + :param locale: locale + :type locale: (optional) str + :param name: app name :type name: (optional) str """ self.__discriminator_value = None # type: str + self.locale = locale self.name = name def to_dict(self): @@ -95,7 +104,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, CreateAsrAnnotationSetRequestObject): + if not isinstance(other, LocalizedName): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/manifest_gadget_support.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/manifest_gadget_support.py index 8204d022..f27e0672 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/manifest_gadget_support.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/manifest_gadget_support.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.gadget_support import GadgetSupportV1 + from ask_smapi_model.v1.skill.manifest.gadget_support_requirement import GadgetSupportRequirement as GadgetSupportRequirement_59434a55 class ManifestGadgetSupport(object): @@ -32,7 +32,7 @@ class ManifestGadgetSupport(object): :param requirement: - :type requirement: (optional) ask_smapi_model.v1.skill.manifest.gadget_support.GadgetSupport + :type requirement: (optional) ask_smapi_model.v1.skill.manifest.gadget_support_requirement.GadgetSupportRequirement :param min_gadget_buttons: Minimum number of gadget buttons required. :type min_gadget_buttons: (optional) int :param max_gadget_buttons: Maximum number of gadget buttons required. @@ -44,7 +44,7 @@ class ManifestGadgetSupport(object): """ deserialized_types = { - 'requirement': 'ask_smapi_model.v1.skill.manifest.gadget_support.GadgetSupport', + 'requirement': 'ask_smapi_model.v1.skill.manifest.gadget_support_requirement.GadgetSupportRequirement', 'min_gadget_buttons': 'int', 'max_gadget_buttons': 'int', 'num_players_max': 'int', @@ -61,11 +61,11 @@ class ManifestGadgetSupport(object): supports_multiple_types = False def __init__(self, requirement=None, min_gadget_buttons=None, max_gadget_buttons=None, num_players_max=None, num_players_min=None): - # type: (Optional[GadgetSupportV1], Optional[int], Optional[int], Optional[int], Optional[int]) -> None + # type: (Optional[GadgetSupportRequirement_59434a55], Optional[int], Optional[int], Optional[int], Optional[int]) -> None """Defines the structure for gadget buttons support in the skill manifest. :param requirement: - :type requirement: (optional) ask_smapi_model.v1.skill.manifest.gadget_support.GadgetSupport + :type requirement: (optional) ask_smapi_model.v1.skill.manifest.gadget_support_requirement.GadgetSupportRequirement :param min_gadget_buttons: Minimum number of gadget buttons required. :type min_gadget_buttons: (optional) int :param max_gadget_buttons: Maximum number of gadget buttons required. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/manifest_version.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/manifest_version.py new file mode 100644 index 00000000..77dcb5d3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/manifest_version.py @@ -0,0 +1,65 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ManifestVersion(Enum): + """ + Version of the skill manifest. + + + + Allowed enum values: [_1_0] + """ + _1_0 = "1.0" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ManifestVersion): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/marketplace_pricing.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/marketplace_pricing.py new file mode 100644 index 00000000..74f21308 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/marketplace_pricing.py @@ -0,0 +1,140 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.free_trial_information import FreeTrialInformation as FreeTrialInformation_dd82f7a7 + from ask_smapi_model.v1.skill.manifest.currency import Currency as Currency_9d815c35 + from ask_smapi_model.v1.skill.manifest.subscription_information import SubscriptionInformation as SubscriptionInformation_8aecb324 + from ask_smapi_model.v1.skill.manifest.offer_type import OfferType as OfferType_c467d5fe + + +class MarketplacePricing(object): + """ + Paid skill product pricing information. + + + :param offer_type: + :type offer_type: (optional) ask_smapi_model.v1.skill.manifest.offer_type.OfferType + :param price: Defines the price of a paid skill product. The price should be your suggested price, not including any VAT or similar taxes. Taxes are included in the final price to end users. + :type price: (optional) float + :param currency: + :type currency: (optional) ask_smapi_model.v1.skill.manifest.currency.Currency + :param free_trial_information: + :type free_trial_information: (optional) ask_smapi_model.v1.skill.manifest.free_trial_information.FreeTrialInformation + :param subscription_information: + :type subscription_information: (optional) ask_smapi_model.v1.skill.manifest.subscription_information.SubscriptionInformation + + """ + deserialized_types = { + 'offer_type': 'ask_smapi_model.v1.skill.manifest.offer_type.OfferType', + 'price': 'float', + 'currency': 'ask_smapi_model.v1.skill.manifest.currency.Currency', + 'free_trial_information': 'ask_smapi_model.v1.skill.manifest.free_trial_information.FreeTrialInformation', + 'subscription_information': 'ask_smapi_model.v1.skill.manifest.subscription_information.SubscriptionInformation' + } # type: Dict + + attribute_map = { + 'offer_type': 'offerType', + 'price': 'price', + 'currency': 'currency', + 'free_trial_information': 'freeTrialInformation', + 'subscription_information': 'subscriptionInformation' + } # type: Dict + supports_multiple_types = False + + def __init__(self, offer_type=None, price=None, currency=None, free_trial_information=None, subscription_information=None): + # type: (Optional[OfferType_c467d5fe], Optional[float], Optional[Currency_9d815c35], Optional[FreeTrialInformation_dd82f7a7], Optional[SubscriptionInformation_8aecb324]) -> None + """Paid skill product pricing information. + + :param offer_type: + :type offer_type: (optional) ask_smapi_model.v1.skill.manifest.offer_type.OfferType + :param price: Defines the price of a paid skill product. The price should be your suggested price, not including any VAT or similar taxes. Taxes are included in the final price to end users. + :type price: (optional) float + :param currency: + :type currency: (optional) ask_smapi_model.v1.skill.manifest.currency.Currency + :param free_trial_information: + :type free_trial_information: (optional) ask_smapi_model.v1.skill.manifest.free_trial_information.FreeTrialInformation + :param subscription_information: + :type subscription_information: (optional) ask_smapi_model.v1.skill.manifest.subscription_information.SubscriptionInformation + """ + self.__discriminator_value = None # type: str + + self.offer_type = offer_type + self.price = price + self.currency = currency + self.free_trial_information = free_trial_information + self.subscription_information = subscription_information + + 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, MarketplacePricing): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/music_alias.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_alias.py index 5697c422..32b42e40 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_alias.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_alias.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_apis.py index c6f250c0..f5a56a36 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_apis.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_apis.py @@ -21,14 +21,14 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.lambda_region import LambdaRegionV1 - from ask_smapi_model.v1.skill.manifest.music_interfaces import MusicInterfacesV1 - from ask_smapi_model.v1.skill.manifest.localized_music_info import LocalizedMusicInfoV1 - from ask_smapi_model.v1.skill.manifest.music_content_type import MusicContentTypeV1 - from ask_smapi_model.v1.skill.manifest.music_capability import MusicCapabilityV1 - from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpointV1 + from ask_smapi_model.v1.skill.manifest.music_capability import MusicCapability as MusicCapability_d0d720da + from ask_smapi_model.v1.skill.manifest.localized_music_info import LocalizedMusicInfo as LocalizedMusicInfo_d0ce0241 + from ask_smapi_model.v1.skill.manifest.lambda_region import LambdaRegion as LambdaRegion_3e305f16 + from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpoint as LambdaEndpoint_87e61436 + from ask_smapi_model.v1.skill.manifest.music_content_type import MusicContentType as MusicContentType_f344db69 + from ask_smapi_model.v1.skill.manifest.music_interfaces import MusicInterfaces as MusicInterfaces_8eb4875e class MusicApis(object): @@ -70,7 +70,7 @@ class MusicApis(object): supports_multiple_types = False def __init__(self, regions=None, endpoint=None, capabilities=None, interfaces=None, locales=None, content_types=None): - # type: (Optional[Dict[str, LambdaRegionV1]], Optional[LambdaEndpointV1], Optional[List[MusicCapabilityV1]], Optional[List[MusicInterfacesV1]], Optional[Dict[str, LocalizedMusicInfoV1]], Optional[List[MusicContentTypeV1]]) -> None + # type: (Optional[Dict[str, LambdaRegion_3e305f16]], Optional[LambdaEndpoint_87e61436], Optional[List[MusicCapability_d0d720da]], Optional[List[MusicInterfaces_8eb4875e]], Optional[Dict[str, LocalizedMusicInfo_d0ce0241]], Optional[List[MusicContentType_f344db69]]) -> None """Defines the structure of music api in the skill manifest. :param regions: Contains an array of the supported <region> Objects. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_capability.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_capability.py index 41cb7ea4..7d934ba9 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_capability.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_capability.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_name.py index 8fc4ee0f..c7d930a1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_name.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_name.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class MusicContentName(Enum): PODCAST = "PODCAST" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, MusicContentName): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_type.py index e9ee7fe6..508c0d17 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_type.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.music_content_name import MusicContentNameV1 + from ask_smapi_model.v1.skill.manifest.music_content_name import MusicContentName as MusicContentName_8780c789 class MusicContentType(object): @@ -45,7 +45,7 @@ class MusicContentType(object): supports_multiple_types = False def __init__(self, name=None): - # type: (Optional[MusicContentNameV1]) -> None + # type: (Optional[MusicContentName_8780c789]) -> None """Defines the structure for content that can be provided by a music skill. :param name: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_feature.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_feature.py index 15aceec8..6d186033 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_feature.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_feature.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_interfaces.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_interfaces.py index 994ec957..d32baa09 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_interfaces.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_interfaces.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.music_request import MusicRequestV1 + from ask_smapi_model.v1.skill.manifest.music_request import MusicRequest as MusicRequest_803658bc class MusicInterfaces(object): @@ -51,7 +51,7 @@ class MusicInterfaces(object): supports_multiple_types = False def __init__(self, namespace=None, version=None, requests=None): - # type: (Optional[str], Optional[str], Optional[List[MusicRequestV1]]) -> None + # type: (Optional[str], Optional[str], Optional[List[MusicRequest_803658bc]]) -> None """ :param namespace: Name of the interface. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_request.py index ce396ccc..1332c216 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_wordmark.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_wordmark.py index dd918809..b5f2beda 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_wordmark.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_wordmark.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/offer_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/offer_type.py new file mode 100644 index 00000000..52f62db9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/offer_type.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class OfferType(Enum): + """ + The type of the offer. + + + + Allowed enum values: [SUBSCRIPTION, ENTITLEMENT] + """ + SUBSCRIPTION = "SUBSCRIPTION" + ENTITLEMENT = "ENTITLEMENT" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, OfferType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/paid_skill_information.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/paid_skill_information.py new file mode 100644 index 00000000..8fdf5d39 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/paid_skill_information.py @@ -0,0 +1,116 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.tax_information import TaxInformation as TaxInformation_ff13e350 + + +class PaidSkillInformation(object): + """ + Defines the structure of the paid skill information of the skill. + + + :param pricing: Defines the structure for marketplace specific pricing information in the skill manifest + :type pricing: (optional) dict(str, list[ask_smapi_model.v1.skill.manifest.marketplace_pricing.MarketplacePricing]) + :param tax_information: + :type tax_information: (optional) ask_smapi_model.v1.skill.manifest.tax_information.TaxInformation + + """ + deserialized_types = { + 'pricing': 'dict(str, list[ask_smapi_model.v1.skill.manifest.marketplace_pricing.MarketplacePricing])', + 'tax_information': 'ask_smapi_model.v1.skill.manifest.tax_information.TaxInformation' + } # type: Dict + + attribute_map = { + 'pricing': 'pricing', + 'tax_information': 'taxInformation' + } # type: Dict + supports_multiple_types = False + + def __init__(self, pricing=None, tax_information=None): + # type: (Optional[Dict[str, object]], Optional[TaxInformation_ff13e350]) -> None + """Defines the structure of the paid skill information of the skill. + + :param pricing: Defines the structure for marketplace specific pricing information in the skill manifest + :type pricing: (optional) dict(str, list[ask_smapi_model.v1.skill.manifest.marketplace_pricing.MarketplacePricing]) + :param tax_information: + :type tax_information: (optional) ask_smapi_model.v1.skill.manifest.tax_information.TaxInformation + """ + self.__discriminator_value = None # type: str + + self.pricing = pricing + self.tax_information = tax_information + + 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, PaidSkillInformation): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/permission_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/permission_items.py index efe456d3..a6395ef3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/permission_items.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/permission_items.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.permission_name import PermissionNameV1 + from ask_smapi_model.v1.skill.manifest.permission_name import PermissionName as PermissionName_64e2a506 class PermissionItems(object): @@ -43,7 +43,7 @@ class PermissionItems(object): supports_multiple_types = False def __init__(self, name=None): - # type: (Optional[PermissionNameV1]) -> None + # type: (Optional[PermissionName_64e2a506]) -> None """ :param name: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/permission_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/permission_name.py index b0f56e93..c46257bc 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/permission_name.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/permission_name.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -31,43 +31,51 @@ class PermissionName(Enum): - Allowed enum values: [payments_autopay_consent, alexa_async_event_write, avs_distributed_audio, alexa_devices_all_address_full_read, alexa_devices_all_address_country_and_postal_code_read, alexa_devices_all_geolocation_read, alexa_health_profile_write, alexa_household_lists_read, alexa_household_lists_write, alexa_personality_explicit_read, alexa_personality_explicit_write, alexa_profile_name_read, alexa_profile_email_read, alexa_profile_mobile_number_read, alexa_profile_given_name_read, alexa_customer_id_read, alexa_person_id_read, alexa_raw_person_id_read, alexa_utterance_id_read, alexa_devices_all_notifications_write, alexa_devices_all_notifications_urgent_write, alexa_alerts_reminders_skill_readwrite, alexa_alerts_timers_skill_readwrite, alexa_skill_cds_monetization, alexa_music_cast, alexa_skill_products_entitlements, alexa_skill_proactive_enablement, alexa_authenticate_2_mandatory, alexa_authenticate_2_optional, alexa_user_experience_guidance_read, alexa_device_id_read, alexa_device_type_read] + Allowed enum values: [alexa_device_id_read, alexa_personality_explicit_read, alexa_authenticate_2_mandatory, alexa_devices_all_address_country_and_postal_code_read, alexa_profile_mobile_number_read, alexa_async_event_write, alexa_device_type_read, alexa_skill_proactive_enablement, alexa_personality_explicit_write, alexa_household_lists_read, alexa_utterance_id_read, alexa_user_experience_guidance_read, alexa_devices_all_notifications_write, avs_distributed_audio, alexa_devices_all_address_full_read, alexa_devices_all_notifications_urgent_write, payments_autopay_consent, alexa_alerts_timers_skill_readwrite, alexa_customer_id_read, alexa_skill_cds_monetization, alexa_music_cast, alexa_profile_given_name_read, alexa_alerts_reminders_skill_readwrite, alexa_household_lists_write, alexa_profile_email_read, alexa_profile_name_read, alexa_devices_all_geolocation_read, alexa_raw_person_id_read, alexa_authenticate_2_optional, alexa_health_profile_write, alexa_person_id_read, alexa_skill_products_entitlements, alexa_energy_devices_state_read, alexa_origin_ip_address_read, alexa_devices_all_coarse_location_read, alexa_devices_all_tokenized_geolocation_read, alexa_devices_all_intent_tokens_read, alexa_measurement_system_readwrite, dash_vendor_read_endpoints, dash_read_endpoints_sensors] """ - payments_autopay_consent = "payments:autopay_consent" - alexa_async_event_write = "alexa::async_event:write" - avs_distributed_audio = "avs::distributed_audio" - alexa_devices_all_address_full_read = "alexa::devices:all:address:full:read" - alexa_devices_all_address_country_and_postal_code_read = "alexa:devices:all:address:country_and_postal_code:read" - alexa_devices_all_geolocation_read = "alexa::devices:all:geolocation:read" - alexa_health_profile_write = "alexa::health:profile:write" - alexa_household_lists_read = "alexa::household:lists:read" - alexa_household_lists_write = "alexa::household:lists:write" + alexa_device_id_read = "alexa::device_id:read" alexa_personality_explicit_read = "alexa::personality:explicit:read" - alexa_personality_explicit_write = "alexa::personality:explicit:write" - alexa_profile_name_read = "alexa::profile:name:read" - alexa_profile_email_read = "alexa::profile:email:read" + alexa_authenticate_2_mandatory = "alexa::authenticate:2:mandatory" + alexa_devices_all_address_country_and_postal_code_read = "alexa:devices:all:address:country_and_postal_code:read" alexa_profile_mobile_number_read = "alexa::profile:mobile_number:read" - alexa_profile_given_name_read = "alexa::profile:given_name:read" - alexa_customer_id_read = "alexa::customer_id:read" - alexa_person_id_read = "alexa::person_id:read" - alexa_raw_person_id_read = "alexa::raw_person_id:read" + alexa_async_event_write = "alexa::async_event:write" + alexa_device_type_read = "alexa::device_type:read" + alexa_skill_proactive_enablement = "alexa::skill:proactive_enablement" + alexa_personality_explicit_write = "alexa::personality:explicit:write" + alexa_household_lists_read = "alexa::household:lists:read" alexa_utterance_id_read = "alexa::utterance_id:read" + alexa_user_experience_guidance_read = "alexa::user_experience_guidance:read" alexa_devices_all_notifications_write = "alexa::devices:all:notifications:write" + avs_distributed_audio = "avs::distributed_audio" + alexa_devices_all_address_full_read = "alexa::devices:all:address:full:read" alexa_devices_all_notifications_urgent_write = "alexa::devices:all:notifications:urgent:write" - alexa_alerts_reminders_skill_readwrite = "alexa::alerts:reminders:skill:readwrite" + payments_autopay_consent = "payments:autopay_consent" alexa_alerts_timers_skill_readwrite = "alexa::alerts:timers:skill:readwrite" + alexa_customer_id_read = "alexa::customer_id:read" alexa_skill_cds_monetization = "alexa::skill:cds:monetization" alexa_music_cast = "alexa::music:cast" - alexa_skill_products_entitlements = "alexa::skill:products:entitlements" - alexa_skill_proactive_enablement = "alexa::skill:proactive_enablement" - alexa_authenticate_2_mandatory = "alexa::authenticate:2:mandatory" + alexa_profile_given_name_read = "alexa::profile:given_name:read" + alexa_alerts_reminders_skill_readwrite = "alexa::alerts:reminders:skill:readwrite" + alexa_household_lists_write = "alexa::household:lists:write" + alexa_profile_email_read = "alexa::profile:email:read" + alexa_profile_name_read = "alexa::profile:name:read" + alexa_devices_all_geolocation_read = "alexa::devices:all:geolocation:read" + alexa_raw_person_id_read = "alexa::raw_person_id:read" alexa_authenticate_2_optional = "alexa::authenticate:2:optional" - alexa_user_experience_guidance_read = "alexa::user_experience_guidance:read" - alexa_device_id_read = "alexa::device_id:read" - alexa_device_type_read = "alexa::device_type:read" + alexa_health_profile_write = "alexa::health:profile:write" + alexa_person_id_read = "alexa::person_id:read" + alexa_skill_products_entitlements = "alexa::skill:products:entitlements" + alexa_energy_devices_state_read = "alexa::energy:devices:state:read" + alexa_origin_ip_address_read = "alexa::origin_ip_address:read" + alexa_devices_all_coarse_location_read = "alexa::devices:all:coarse_location:read" + alexa_devices_all_tokenized_geolocation_read = "alexa::devices:all:tokenized_geolocation:read" + alexa_devices_all_intent_tokens_read = "alexa::devices:all:intent_tokens:read" + alexa_measurement_system_readwrite = "alexa::measurement_system::readwrite" + dash_vendor_read_endpoints = "dash::vendor:read:endpoints" + dash_read_endpoints_sensors = "dash::read:endpoints:sensors" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -83,7 +91,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PermissionName): return False @@ -91,6 +99,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/play_store_common_scheme_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/play_store_common_scheme_name.py new file mode 100644 index 00000000..55868be1 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/play_store_common_scheme_name.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class PlayStoreCommonSchemeName(Enum): + """ + supported common schemes for GOOGLE_PLAY_STORE. MAPS is for \"maps:\" and TEL is for \"tel:\". + + + + Allowed enum values: [MAPS, TEL] + """ + MAPS = "MAPS" + TEL = "TEL" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, PlayStoreCommonSchemeName): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/region.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/region.py index aed8bee6..9dc913a6 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/region.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/region.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpointV1 + from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpoint as SkillManifestEndpoint_b30bcc05 class Region(object): @@ -45,7 +45,7 @@ class Region(object): supports_multiple_types = False def __init__(self, endpoint=None): - # type: (Optional[SkillManifestEndpointV1]) -> None + # type: (Optional[SkillManifestEndpoint_b30bcc05]) -> None """Defines the structure for regional information. :param endpoint: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/shopping_kit.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/shopping_kit.py new file mode 100644 index 00000000..9a06b58c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/shopping_kit.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class ShoppingKit(object): + """ + Defines the structure for Shopping Kit related information in the skill manifest. + + + :param is_shopping_actions_enabled: True if the skill uses Alexa Shopping Actions, false otherwise. + :type is_shopping_actions_enabled: (optional) bool + :param is_amazon_associates_on_alexa_enabled: True if the skill uses Shopping Actions with Amazon Associates, false otherwise. + :type is_amazon_associates_on_alexa_enabled: (optional) bool + + """ + deserialized_types = { + 'is_shopping_actions_enabled': 'bool', + 'is_amazon_associates_on_alexa_enabled': 'bool' + } # type: Dict + + attribute_map = { + 'is_shopping_actions_enabled': 'isShoppingActionsEnabled', + 'is_amazon_associates_on_alexa_enabled': 'isAmazonAssociatesOnAlexaEnabled' + } # type: Dict + supports_multiple_types = False + + def __init__(self, is_shopping_actions_enabled=None, is_amazon_associates_on_alexa_enabled=None): + # type: (Optional[bool], Optional[bool]) -> None + """Defines the structure for Shopping Kit related information in the skill manifest. + + :param is_shopping_actions_enabled: True if the skill uses Alexa Shopping Actions, false otherwise. + :type is_shopping_actions_enabled: (optional) bool + :param is_amazon_associates_on_alexa_enabled: True if the skill uses Shopping Actions with Amazon Associates, false otherwise. + :type is_amazon_associates_on_alexa_enabled: (optional) bool + """ + self.__discriminator_value = None # type: str + + self.is_shopping_actions_enabled = is_shopping_actions_enabled + self.is_amazon_associates_on_alexa_enabled = is_amazon_associates_on_alexa_enabled + + 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, ShoppingKit): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest.py index 9bdfe0b7..bed8d523 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest.py @@ -21,13 +21,15 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.skill_manifest_apis import SkillManifestApisV1 - from ask_smapi_model.v1.skill.manifest.permission_items import PermissionItemsV1 - from ask_smapi_model.v1.skill.manifest.skill_manifest_publishing_information import SkillManifestPublishingInformationV1 - from ask_smapi_model.v1.skill.manifest.skill_manifest_events import SkillManifestEventsV1 - from ask_smapi_model.v1.skill.manifest.skill_manifest_privacy_and_compliance import SkillManifestPrivacyAndComplianceV1 + from ask_smapi_model.v1.skill.manifest.skill_manifest_publishing_information import SkillManifestPublishingInformation as SkillManifestPublishingInformation_eef29c5e + from ask_smapi_model.v1.skill.manifest.skill_manifest_privacy_and_compliance import SkillManifestPrivacyAndCompliance as SkillManifestPrivacyAndCompliance_5c8f839f + from ask_smapi_model.v1.skill.manifest.manifest_version import ManifestVersion as ManifestVersion_579912bc + from ask_smapi_model.v1.skill.manifest.skill_manifest_apis import SkillManifestApis as SkillManifestApis_cbb83f8d + from ask_smapi_model.v1.skill.manifest.permission_items import PermissionItems as PermissionItems_d3460cc + from ask_smapi_model.v1.skill.manifest.skill_manifest_events import SkillManifestEvents as SkillManifestEvents_29025b4d + from ask_smapi_model.v1.skill.manifest.authorized_client import AuthorizedClient as AuthorizedClient_68a7f69e class SkillManifest(object): @@ -35,8 +37,8 @@ class SkillManifest(object): Defines the structure for a skill's metadata. - :param manifest_version: Version of the skill manifest. - :type manifest_version: (optional) str + :param manifest_version: + :type manifest_version: (optional) ask_smapi_model.v1.skill.manifest.manifest_version.ManifestVersion :param publishing_information: :type publishing_information: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_publishing_information.SkillManifestPublishingInformation :param privacy_and_compliance: @@ -45,16 +47,19 @@ class SkillManifest(object): :type events: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_events.SkillManifestEvents :param permissions: Defines the structure for required permissions information in the skill manifest. :type permissions: (optional) list[ask_smapi_model.v1.skill.manifest.permission_items.PermissionItems] + :param authorized_clients: Defines a list of clients authorized for a skill. + :type authorized_clients: (optional) list[ask_smapi_model.v1.skill.manifest.authorized_client.AuthorizedClient] :param apis: :type apis: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_apis.SkillManifestApis """ deserialized_types = { - 'manifest_version': 'str', + 'manifest_version': 'ask_smapi_model.v1.skill.manifest.manifest_version.ManifestVersion', 'publishing_information': 'ask_smapi_model.v1.skill.manifest.skill_manifest_publishing_information.SkillManifestPublishingInformation', 'privacy_and_compliance': 'ask_smapi_model.v1.skill.manifest.skill_manifest_privacy_and_compliance.SkillManifestPrivacyAndCompliance', 'events': 'ask_smapi_model.v1.skill.manifest.skill_manifest_events.SkillManifestEvents', 'permissions': 'list[ask_smapi_model.v1.skill.manifest.permission_items.PermissionItems]', + 'authorized_clients': 'list[ask_smapi_model.v1.skill.manifest.authorized_client.AuthorizedClient]', 'apis': 'ask_smapi_model.v1.skill.manifest.skill_manifest_apis.SkillManifestApis' } # type: Dict @@ -64,16 +69,17 @@ class SkillManifest(object): 'privacy_and_compliance': 'privacyAndCompliance', 'events': 'events', 'permissions': 'permissions', + 'authorized_clients': 'authorizedClients', 'apis': 'apis' } # type: Dict supports_multiple_types = False - def __init__(self, manifest_version=None, publishing_information=None, privacy_and_compliance=None, events=None, permissions=None, apis=None): - # type: (Optional[str], Optional[SkillManifestPublishingInformationV1], Optional[SkillManifestPrivacyAndComplianceV1], Optional[SkillManifestEventsV1], Optional[List[PermissionItemsV1]], Optional[SkillManifestApisV1]) -> None + def __init__(self, manifest_version=None, publishing_information=None, privacy_and_compliance=None, events=None, permissions=None, authorized_clients=None, apis=None): + # type: (Optional[ManifestVersion_579912bc], Optional[SkillManifestPublishingInformation_eef29c5e], Optional[SkillManifestPrivacyAndCompliance_5c8f839f], Optional[SkillManifestEvents_29025b4d], Optional[List[PermissionItems_d3460cc]], Optional[List[AuthorizedClient_68a7f69e]], Optional[SkillManifestApis_cbb83f8d]) -> None """Defines the structure for a skill's metadata. - :param manifest_version: Version of the skill manifest. - :type manifest_version: (optional) str + :param manifest_version: + :type manifest_version: (optional) ask_smapi_model.v1.skill.manifest.manifest_version.ManifestVersion :param publishing_information: :type publishing_information: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_publishing_information.SkillManifestPublishingInformation :param privacy_and_compliance: @@ -82,6 +88,8 @@ def __init__(self, manifest_version=None, publishing_information=None, privacy_a :type events: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_events.SkillManifestEvents :param permissions: Defines the structure for required permissions information in the skill manifest. :type permissions: (optional) list[ask_smapi_model.v1.skill.manifest.permission_items.PermissionItems] + :param authorized_clients: Defines a list of clients authorized for a skill. + :type authorized_clients: (optional) list[ask_smapi_model.v1.skill.manifest.authorized_client.AuthorizedClient] :param apis: :type apis: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_apis.SkillManifestApis """ @@ -92,6 +100,7 @@ def __init__(self, manifest_version=None, publishing_information=None, privacy_a self.privacy_and_compliance = privacy_and_compliance self.events = events self.permissions = permissions + self.authorized_clients = authorized_clients self.apis = apis def to_dict(self): diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_apis.py index 0c2da4ec..fceb638d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_apis.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_apis.py @@ -21,16 +21,17 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.smart_home_apis import SmartHomeApisV1 - from ask_smapi_model.v1.skill.manifest.health_apis import HealthApisV1 - from ask_smapi_model.v1.skill.manifest.flash_briefing_apis import FlashBriefingApisV1 - from ask_smapi_model.v1.skill.manifest.alexa_for_business_apis import AlexaForBusinessApisV1 - from ask_smapi_model.v1.skill.manifest.music_apis import MusicApisV1 - from ask_smapi_model.v1.skill.manifest.video_apis import VideoApisV1 - from ask_smapi_model.v1.skill.manifest.custom_apis import CustomApisV1 - from ask_smapi_model.v1.skill.manifest.house_hold_list import HouseHoldListV1 + from ask_smapi_model.v1.skill.manifest.smart_home_apis import SmartHomeApis as SmartHomeApis_768def7d + from ask_smapi_model.v1.skill.manifest.demand_response_apis import DemandResponseApis as DemandResponseApis_d15fcaf7 + from ask_smapi_model.v1.skill.manifest.music_apis import MusicApis as MusicApis_7489e85c + from ask_smapi_model.v1.skill.manifest.alexa_for_business_apis import AlexaForBusinessApis as AlexaForBusinessApis_8e9dbc0 + from ask_smapi_model.v1.skill.manifest.custom_apis import CustomApis as CustomApis_e197110a + from ask_smapi_model.v1.skill.manifest.house_hold_list import HouseHoldList as HouseHoldList_76371b75 + from ask_smapi_model.v1.skill.manifest.video_apis import VideoApis as VideoApis_f912969c + from ask_smapi_model.v1.skill.manifest.flash_briefing_apis import FlashBriefingApis as FlashBriefingApis_a7aeebab + from ask_smapi_model.v1.skill.manifest.knowledge_apis import KnowledgeApis as KnowledgeApis_966f57bc class SkillManifestApis(object): @@ -42,74 +43,81 @@ class SkillManifestApis(object): :type flash_briefing: (optional) ask_smapi_model.v1.skill.manifest.flash_briefing_apis.FlashBriefingApis :param custom: :type custom: (optional) ask_smapi_model.v1.skill.manifest.custom_apis.CustomApis + :param knowledge: + :type knowledge: (optional) ask_smapi_model.v1.skill.manifest.knowledge_apis.KnowledgeApis :param smart_home: :type smart_home: (optional) ask_smapi_model.v1.skill.manifest.smart_home_apis.SmartHomeApis :param video: :type video: (optional) ask_smapi_model.v1.skill.manifest.video_apis.VideoApis :param alexa_for_business: :type alexa_for_business: (optional) ask_smapi_model.v1.skill.manifest.alexa_for_business_apis.AlexaForBusinessApis - :param health: - :type health: (optional) ask_smapi_model.v1.skill.manifest.health_apis.HealthApis :param household_list: :type household_list: (optional) ask_smapi_model.v1.skill.manifest.house_hold_list.HouseHoldList :param music: :type music: (optional) ask_smapi_model.v1.skill.manifest.music_apis.MusicApis + :param demand_response: + :type demand_response: (optional) ask_smapi_model.v1.skill.manifest.demand_response_apis.DemandResponseApis """ deserialized_types = { 'flash_briefing': 'ask_smapi_model.v1.skill.manifest.flash_briefing_apis.FlashBriefingApis', 'custom': 'ask_smapi_model.v1.skill.manifest.custom_apis.CustomApis', + 'knowledge': 'ask_smapi_model.v1.skill.manifest.knowledge_apis.KnowledgeApis', 'smart_home': 'ask_smapi_model.v1.skill.manifest.smart_home_apis.SmartHomeApis', 'video': 'ask_smapi_model.v1.skill.manifest.video_apis.VideoApis', 'alexa_for_business': 'ask_smapi_model.v1.skill.manifest.alexa_for_business_apis.AlexaForBusinessApis', - 'health': 'ask_smapi_model.v1.skill.manifest.health_apis.HealthApis', 'household_list': 'ask_smapi_model.v1.skill.manifest.house_hold_list.HouseHoldList', - 'music': 'ask_smapi_model.v1.skill.manifest.music_apis.MusicApis' + 'music': 'ask_smapi_model.v1.skill.manifest.music_apis.MusicApis', + 'demand_response': 'ask_smapi_model.v1.skill.manifest.demand_response_apis.DemandResponseApis' } # type: Dict attribute_map = { 'flash_briefing': 'flashBriefing', 'custom': 'custom', + 'knowledge': 'knowledge', 'smart_home': 'smartHome', 'video': 'video', 'alexa_for_business': 'alexaForBusiness', - 'health': 'health', 'household_list': 'householdList', - 'music': 'music' + 'music': 'music', + 'demand_response': 'demandResponse' } # type: Dict supports_multiple_types = False - def __init__(self, flash_briefing=None, custom=None, smart_home=None, video=None, alexa_for_business=None, health=None, household_list=None, music=None): - # type: (Optional[FlashBriefingApisV1], Optional[CustomApisV1], Optional[SmartHomeApisV1], Optional[VideoApisV1], Optional[AlexaForBusinessApisV1], Optional[HealthApisV1], Optional[HouseHoldListV1], Optional[MusicApisV1]) -> None + def __init__(self, flash_briefing=None, custom=None, knowledge=None, smart_home=None, video=None, alexa_for_business=None, household_list=None, music=None, demand_response=None): + # type: (Optional[FlashBriefingApis_a7aeebab], Optional[CustomApis_e197110a], Optional[KnowledgeApis_966f57bc], Optional[SmartHomeApis_768def7d], Optional[VideoApis_f912969c], Optional[AlexaForBusinessApis_8e9dbc0], Optional[HouseHoldList_76371b75], Optional[MusicApis_7489e85c], Optional[DemandResponseApis_d15fcaf7]) -> None """Defines the structure for implemented apis information in the skill manifest. :param flash_briefing: :type flash_briefing: (optional) ask_smapi_model.v1.skill.manifest.flash_briefing_apis.FlashBriefingApis :param custom: :type custom: (optional) ask_smapi_model.v1.skill.manifest.custom_apis.CustomApis + :param knowledge: + :type knowledge: (optional) ask_smapi_model.v1.skill.manifest.knowledge_apis.KnowledgeApis :param smart_home: :type smart_home: (optional) ask_smapi_model.v1.skill.manifest.smart_home_apis.SmartHomeApis :param video: :type video: (optional) ask_smapi_model.v1.skill.manifest.video_apis.VideoApis :param alexa_for_business: :type alexa_for_business: (optional) ask_smapi_model.v1.skill.manifest.alexa_for_business_apis.AlexaForBusinessApis - :param health: - :type health: (optional) ask_smapi_model.v1.skill.manifest.health_apis.HealthApis :param household_list: :type household_list: (optional) ask_smapi_model.v1.skill.manifest.house_hold_list.HouseHoldList :param music: :type music: (optional) ask_smapi_model.v1.skill.manifest.music_apis.MusicApis + :param demand_response: + :type demand_response: (optional) ask_smapi_model.v1.skill.manifest.demand_response_apis.DemandResponseApis """ self.__discriminator_value = None # type: str self.flash_briefing = flash_briefing self.custom = custom + self.knowledge = knowledge self.smart_home = smart_home self.video = video self.alexa_for_business = alexa_for_business - self.health = health self.household_list = household_list self.music = music + self.demand_response = demand_response def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_endpoint.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_endpoint.py index bc15209c..dccc57d6 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_endpoint.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_endpoint.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.ssl_certificate_type import SSLCertificateTypeV1 + from ask_smapi_model.v1.skill.manifest.ssl_certificate_type import SSLCertificateType as SSLCertificateType_b8d91d45 class SkillManifestEndpoint(object): @@ -49,7 +49,7 @@ class SkillManifestEndpoint(object): supports_multiple_types = False def __init__(self, uri=None, ssl_certificate_type=None): - # type: (Optional[str], Optional[SSLCertificateTypeV1]) -> None + # type: (Optional[str], Optional[SSLCertificateType_b8d91d45]) -> None """Defines the structure for endpoint information in the skill manifest. :param uri: Amazon Resource Name (ARN) of the skill's Lambda function or HTTPS URL. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_envelope.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_envelope.py index 47cb3725..fb469ba2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_envelope.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_envelope.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.skill_manifest import SkillManifestV1 + from ask_smapi_model.v1.skill.manifest.skill_manifest import SkillManifest as SkillManifest_312bea88 class SkillManifestEnvelope(object): @@ -43,7 +43,7 @@ class SkillManifestEnvelope(object): supports_multiple_types = False def __init__(self, manifest=None): - # type: (Optional[SkillManifestV1]) -> None + # type: (Optional[SkillManifest_312bea88]) -> None """ :param manifest: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_events.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_events.py index e1a30797..2a62a5d5 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_events.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_events.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpointV1 - from ask_smapi_model.v1.skill.manifest.event_name import EventNameV1 - from ask_smapi_model.v1.skill.manifest.event_publications import EventPublicationsV1 - from ask_smapi_model.v1.skill.manifest.region import RegionV1 + from ask_smapi_model.v1.skill.manifest.event_publications import EventPublications as EventPublications_edd60118 + from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpoint as SkillManifestEndpoint_b30bcc05 + from ask_smapi_model.v1.skill.manifest.event_name import EventName as EventName_36aae8a0 + from ask_smapi_model.v1.skill.manifest.region import Region as Region_10de9595 class SkillManifestEvents(object): @@ -60,7 +60,7 @@ class SkillManifestEvents(object): supports_multiple_types = False def __init__(self, subscriptions=None, publications=None, regions=None, endpoint=None): - # type: (Optional[List[EventNameV1]], Optional[List[EventPublicationsV1]], Optional[Dict[str, RegionV1]], Optional[SkillManifestEndpointV1]) -> None + # type: (Optional[List[EventName_36aae8a0]], Optional[List[EventPublications_edd60118]], Optional[Dict[str, Region_10de9595]], Optional[SkillManifestEndpoint_b30bcc05]) -> None """Defines the structure for subscribed events information in the skill manifest. :param subscriptions: Contains an array of eventName object each of which contains the name of a skill event. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_privacy_and_compliance.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_privacy_and_compliance.py index d22d27aa..fa3c0300 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_privacy_and_compliance.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_privacy_and_compliance.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_publishing_information.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_publishing_information.py index c36f9ed6..e82ef89d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_publishing_information.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_publishing_information.py @@ -21,8 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime + from ask_smapi_model.v1.skill.manifest.custom_product_prompts import CustomProductPrompts as CustomProductPrompts_150953f5 class SkillManifestLocalizedPublishingInformation(object): @@ -46,6 +47,8 @@ class SkillManifestLocalizedPublishingInformation(object): :type example_phrases: (optional) list[str] :param keywords: Sample keyword phrases that describe the skill. :type keywords: (optional) list[str] + :param custom_product_prompts: + :type custom_product_prompts: (optional) ask_smapi_model.v1.skill.manifest.custom_product_prompts.CustomProductPrompts """ deserialized_types = { @@ -56,7 +59,8 @@ class SkillManifestLocalizedPublishingInformation(object): 'description': 'str', 'updates_description': 'str', 'example_phrases': 'list[str]', - 'keywords': 'list[str]' + 'keywords': 'list[str]', + 'custom_product_prompts': 'ask_smapi_model.v1.skill.manifest.custom_product_prompts.CustomProductPrompts' } # type: Dict attribute_map = { @@ -67,12 +71,13 @@ class SkillManifestLocalizedPublishingInformation(object): 'description': 'description', 'updates_description': 'updatesDescription', 'example_phrases': 'examplePhrases', - 'keywords': 'keywords' + 'keywords': 'keywords', + 'custom_product_prompts': 'customProductPrompts' } # type: Dict supports_multiple_types = False - def __init__(self, name=None, small_icon_uri=None, large_icon_uri=None, summary=None, description=None, updates_description=None, example_phrases=None, keywords=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[List[object]], Optional[List[object]]) -> None + def __init__(self, name=None, small_icon_uri=None, large_icon_uri=None, summary=None, description=None, updates_description=None, example_phrases=None, keywords=None, custom_product_prompts=None): + # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[str], Optional[List[object]], Optional[List[object]], Optional[CustomProductPrompts_150953f5]) -> None """Defines the structure for locale specific publishing information in the skill manifest. :param name: Name of the skill that is displayed to customers in the Alexa app. @@ -91,6 +96,8 @@ def __init__(self, name=None, small_icon_uri=None, large_icon_uri=None, summary= :type example_phrases: (optional) list[str] :param keywords: Sample keyword phrases that describe the skill. :type keywords: (optional) list[str] + :param custom_product_prompts: + :type custom_product_prompts: (optional) ask_smapi_model.v1.skill.manifest.custom_product_prompts.CustomProductPrompts """ self.__discriminator_value = None # type: str @@ -102,6 +109,7 @@ def __init__(self, name=None, small_icon_uri=None, large_icon_uri=None, summary= self.updates_description = updates_description self.example_phrases = example_phrases self.keywords = keywords + self.custom_product_prompts = custom_product_prompts def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_privacy_and_compliance.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_privacy_and_compliance.py index e9a81488..2a6c4ee3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_privacy_and_compliance.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_privacy_and_compliance.py @@ -21,9 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.skill_manifest_localized_privacy_and_compliance import SkillManifestLocalizedPrivacyAndComplianceV1 + from ask_smapi_model.v1.skill.manifest.shopping_kit import ShoppingKit as ShoppingKit_3d28df98 + from ask_smapi_model.v1.skill.manifest.skill_manifest_localized_privacy_and_compliance import SkillManifestLocalizedPrivacyAndCompliance as SkillManifestLocalizedPrivacyAndCompliance_ef86fcec class SkillManifestPrivacyAndCompliance(object): @@ -31,7 +32,7 @@ class SkillManifestPrivacyAndCompliance(object): Defines the structure for privacy & compliance information in the skill manifest. - :param locales: Defines the structure for locale specific privacy & compliance information in the skill manifest. + :param locales: Object that contains <locale> objects for each supported locale. :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.skill_manifest_localized_privacy_and_compliance.SkillManifestLocalizedPrivacyAndCompliance) :param allows_purchases: True if the skill allows users to make purchases or spend real money false otherwise. :type allows_purchases: (optional) bool @@ -45,6 +46,8 @@ class SkillManifestPrivacyAndCompliance(object): :type contains_ads: (optional) bool :param uses_health_info: True if the skill developer is a Covered Entity (CE) or Business Associate (BA) as defined by the Health Insurance Portability And Accountability Act (HIPAA) and the skill requires Amazon to process PHI on their behalf, false otherwise. This is an optional property and treated as false if not set. :type uses_health_info: (optional) bool + :param shopping_kit: + :type shopping_kit: (optional) ask_smapi_model.v1.skill.manifest.shopping_kit.ShoppingKit """ deserialized_types = { @@ -54,7 +57,8 @@ class SkillManifestPrivacyAndCompliance(object): 'is_child_directed': 'bool', 'is_export_compliant': 'bool', 'contains_ads': 'bool', - 'uses_health_info': 'bool' + 'uses_health_info': 'bool', + 'shopping_kit': 'ask_smapi_model.v1.skill.manifest.shopping_kit.ShoppingKit' } # type: Dict attribute_map = { @@ -64,15 +68,16 @@ class SkillManifestPrivacyAndCompliance(object): 'is_child_directed': 'isChildDirected', 'is_export_compliant': 'isExportCompliant', 'contains_ads': 'containsAds', - 'uses_health_info': 'usesHealthInfo' + 'uses_health_info': 'usesHealthInfo', + 'shopping_kit': 'shoppingKit' } # type: Dict supports_multiple_types = False - def __init__(self, locales=None, allows_purchases=None, uses_personal_info=None, is_child_directed=None, is_export_compliant=None, contains_ads=None, uses_health_info=None): - # type: (Optional[Dict[str, SkillManifestLocalizedPrivacyAndComplianceV1]], Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[bool]) -> None + def __init__(self, locales=None, allows_purchases=None, uses_personal_info=None, is_child_directed=None, is_export_compliant=None, contains_ads=None, uses_health_info=None, shopping_kit=None): + # type: (Optional[Dict[str, SkillManifestLocalizedPrivacyAndCompliance_ef86fcec]], Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[ShoppingKit_3d28df98]) -> None """Defines the structure for privacy & compliance information in the skill manifest. - :param locales: Defines the structure for locale specific privacy & compliance information in the skill manifest. + :param locales: Object that contains <locale> objects for each supported locale. :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.skill_manifest_localized_privacy_and_compliance.SkillManifestLocalizedPrivacyAndCompliance) :param allows_purchases: True if the skill allows users to make purchases or spend real money false otherwise. :type allows_purchases: (optional) bool @@ -86,6 +91,8 @@ def __init__(self, locales=None, allows_purchases=None, uses_personal_info=None, :type contains_ads: (optional) bool :param uses_health_info: True if the skill developer is a Covered Entity (CE) or Business Associate (BA) as defined by the Health Insurance Portability And Accountability Act (HIPAA) and the skill requires Amazon to process PHI on their behalf, false otherwise. This is an optional property and treated as false if not set. :type uses_health_info: (optional) bool + :param shopping_kit: + :type shopping_kit: (optional) ask_smapi_model.v1.skill.manifest.shopping_kit.ShoppingKit """ self.__discriminator_value = None # type: str @@ -96,6 +103,7 @@ def __init__(self, locales=None, allows_purchases=None, uses_personal_info=None, self.is_export_compliant = is_export_compliant self.contains_ads = contains_ads self.uses_health_info = uses_health_info + self.shopping_kit = shopping_kit def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_publishing_information.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_publishing_information.py index b2595805..696940f4 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_publishing_information.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_publishing_information.py @@ -21,12 +21,15 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.distribution_countries import DistributionCountriesV1 - from ask_smapi_model.v1.skill.manifest.skill_manifest_localized_publishing_information import SkillManifestLocalizedPublishingInformationV1 - from ask_smapi_model.v1.skill.manifest.distribution_mode import DistributionModeV1 - from ask_smapi_model.v1.skill.manifest.manifest_gadget_support import ManifestGadgetSupportV1 + from ask_smapi_model.v1.skill.manifest.automatic_distribution import AutomaticDistribution as AutomaticDistribution_a84fbfb2 + from ask_smapi_model.v1.skill.manifest.skill_manifest_localized_publishing_information import SkillManifestLocalizedPublishingInformation as SkillManifestLocalizedPublishingInformation_1e8ff5fd + from ask_smapi_model.v1.skill.manifest.distribution_countries import DistributionCountries as DistributionCountries_33dc1fd4 + from ask_smapi_model.v1.skill.manifest.distribution_mode import DistributionMode as DistributionMode_7068bbf0 + from ask_smapi_model.v1.skill.manifest.automatic_cloned_locale import AutomaticClonedLocale as AutomaticClonedLocale_4c2a4dc3 + from ask_smapi_model.v1.skill.manifest.manifest_gadget_support import ManifestGadgetSupport as ManifestGadgetSupport_2efdc899 + from ask_smapi_model.v1.skill.manifest.paid_skill_information import PaidSkillInformation as PaidSkillInformation_bed165b1 class SkillManifestPublishingInformation(object): @@ -52,6 +55,12 @@ class SkillManifestPublishingInformation(object): :type category: (optional) str :param distribution_countries: Selected list of countries provided by the skill owner where Amazon can distribute the skill. :type distribution_countries: (optional) list[ask_smapi_model.v1.skill.manifest.distribution_countries.DistributionCountries] + :param automatic_distribution: + :type automatic_distribution: (optional) ask_smapi_model.v1.skill.manifest.automatic_distribution.AutomaticDistribution + :param automatic_cloned_locale: + :type automatic_cloned_locale: (optional) ask_smapi_model.v1.skill.manifest.automatic_cloned_locale.AutomaticClonedLocale + :param paid_skill_information: + :type paid_skill_information: (optional) ask_smapi_model.v1.skill.manifest.paid_skill_information.PaidSkillInformation """ deserialized_types = { @@ -63,7 +72,10 @@ class SkillManifestPublishingInformation(object): 'gadget_support': 'ask_smapi_model.v1.skill.manifest.manifest_gadget_support.ManifestGadgetSupport', 'testing_instructions': 'str', 'category': 'str', - 'distribution_countries': 'list[ask_smapi_model.v1.skill.manifest.distribution_countries.DistributionCountries]' + 'distribution_countries': 'list[ask_smapi_model.v1.skill.manifest.distribution_countries.DistributionCountries]', + 'automatic_distribution': 'ask_smapi_model.v1.skill.manifest.automatic_distribution.AutomaticDistribution', + 'automatic_cloned_locale': 'ask_smapi_model.v1.skill.manifest.automatic_cloned_locale.AutomaticClonedLocale', + 'paid_skill_information': 'ask_smapi_model.v1.skill.manifest.paid_skill_information.PaidSkillInformation' } # type: Dict attribute_map = { @@ -75,12 +87,15 @@ class SkillManifestPublishingInformation(object): 'gadget_support': 'gadgetSupport', 'testing_instructions': 'testingInstructions', 'category': 'category', - 'distribution_countries': 'distributionCountries' + 'distribution_countries': 'distributionCountries', + 'automatic_distribution': 'automaticDistribution', + 'automatic_cloned_locale': 'automaticClonedLocale', + 'paid_skill_information': 'paidSkillInformation' } # type: Dict supports_multiple_types = False - def __init__(self, name=None, description=None, locales=None, is_available_worldwide=None, distribution_mode=None, gadget_support=None, testing_instructions=None, category=None, distribution_countries=None): - # type: (Optional[str], Optional[str], Optional[Dict[str, SkillManifestLocalizedPublishingInformationV1]], Optional[bool], Optional[DistributionModeV1], Optional[ManifestGadgetSupportV1], Optional[str], Optional[str], Optional[List[DistributionCountriesV1]]) -> None + def __init__(self, name=None, description=None, locales=None, is_available_worldwide=None, distribution_mode=None, gadget_support=None, testing_instructions=None, category=None, distribution_countries=None, automatic_distribution=None, automatic_cloned_locale=None, paid_skill_information=None): + # type: (Optional[str], Optional[str], Optional[Dict[str, SkillManifestLocalizedPublishingInformation_1e8ff5fd]], Optional[bool], Optional[DistributionMode_7068bbf0], Optional[ManifestGadgetSupport_2efdc899], Optional[str], Optional[str], Optional[List[DistributionCountries_33dc1fd4]], Optional[AutomaticDistribution_a84fbfb2], Optional[AutomaticClonedLocale_4c2a4dc3], Optional[PaidSkillInformation_bed165b1]) -> None """Defines the structure for publishing information in the skill manifest. :param name: Name of the skill that is displayed to customers in the Alexa app. @@ -101,6 +116,12 @@ def __init__(self, name=None, description=None, locales=None, is_available_world :type category: (optional) str :param distribution_countries: Selected list of countries provided by the skill owner where Amazon can distribute the skill. :type distribution_countries: (optional) list[ask_smapi_model.v1.skill.manifest.distribution_countries.DistributionCountries] + :param automatic_distribution: + :type automatic_distribution: (optional) ask_smapi_model.v1.skill.manifest.automatic_distribution.AutomaticDistribution + :param automatic_cloned_locale: + :type automatic_cloned_locale: (optional) ask_smapi_model.v1.skill.manifest.automatic_cloned_locale.AutomaticClonedLocale + :param paid_skill_information: + :type paid_skill_information: (optional) ask_smapi_model.v1.skill.manifest.paid_skill_information.PaidSkillInformation """ self.__discriminator_value = None # type: str @@ -113,6 +134,9 @@ def __init__(self, name=None, description=None, locales=None, is_available_world self.testing_instructions = testing_instructions self.category = category self.distribution_countries = distribution_countries + self.automatic_distribution = automatic_distribution + self.automatic_cloned_locale = automatic_cloned_locale + self.paid_skill_information = paid_skill_information def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_apis.py index 5393d3a8..c4c25dd6 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_apis.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_apis.py @@ -21,16 +21,17 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.lambda_region import LambdaRegionV1 - from ask_smapi_model.v1.skill.manifest.smart_home_protocol import SmartHomeProtocolV1 - from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpointV1 + from ask_smapi_model.v1.skill.manifest.lambda_region import LambdaRegion as LambdaRegion_3e305f16 + from ask_smapi_model.v1.skill.manifest.supported_controls import SupportedControls as SupportedControls_f80ce036 + from ask_smapi_model.v1.skill.manifest.smart_home_protocol import SmartHomeProtocol as SmartHomeProtocol_65bf853b + from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpoint as LambdaEndpoint_87e61436 class SmartHomeApis(object): """ - Defines the structure for smart home api of the skill. + Defines the structure of smart home api of the skill. :param regions: Contains an array of the supported <region> Objects. @@ -39,24 +40,28 @@ class SmartHomeApis(object): :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint :param protocol_version: :type protocol_version: (optional) ask_smapi_model.v1.skill.manifest.smart_home_protocol.SmartHomeProtocol + :param supported_controls: + :type supported_controls: (optional) ask_smapi_model.v1.skill.manifest.supported_controls.SupportedControls """ deserialized_types = { 'regions': 'dict(str, ask_smapi_model.v1.skill.manifest.lambda_region.LambdaRegion)', 'endpoint': 'ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint', - 'protocol_version': 'ask_smapi_model.v1.skill.manifest.smart_home_protocol.SmartHomeProtocol' + 'protocol_version': 'ask_smapi_model.v1.skill.manifest.smart_home_protocol.SmartHomeProtocol', + 'supported_controls': 'ask_smapi_model.v1.skill.manifest.supported_controls.SupportedControls' } # type: Dict attribute_map = { 'regions': 'regions', 'endpoint': 'endpoint', - 'protocol_version': 'protocolVersion' + 'protocol_version': 'protocolVersion', + 'supported_controls': 'supportedControls' } # type: Dict supports_multiple_types = False - def __init__(self, regions=None, endpoint=None, protocol_version=None): - # type: (Optional[Dict[str, LambdaRegionV1]], Optional[LambdaEndpointV1], Optional[SmartHomeProtocolV1]) -> None - """Defines the structure for smart home api of the skill. + def __init__(self, regions=None, endpoint=None, protocol_version=None, supported_controls=None): + # type: (Optional[Dict[str, LambdaRegion_3e305f16]], Optional[LambdaEndpoint_87e61436], Optional[SmartHomeProtocol_65bf853b], Optional[SupportedControls_f80ce036]) -> None + """Defines the structure of smart home api of the skill. :param regions: Contains an array of the supported <region> Objects. :type regions: (optional) dict(str, ask_smapi_model.v1.skill.manifest.lambda_region.LambdaRegion) @@ -64,12 +69,15 @@ def __init__(self, regions=None, endpoint=None, protocol_version=None): :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint :param protocol_version: :type protocol_version: (optional) ask_smapi_model.v1.skill.manifest.smart_home_protocol.SmartHomeProtocol + :param supported_controls: + :type supported_controls: (optional) ask_smapi_model.v1.skill.manifest.supported_controls.SupportedControls """ self.__discriminator_value = None # type: str self.regions = regions self.endpoint = endpoint self.protocol_version = protocol_version + self.supported_controls = supported_controls def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_protocol.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_protocol.py index 3237073a..031a92c8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_protocol.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_protocol.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -31,16 +31,15 @@ class SmartHomeProtocol(Enum): - Allowed enum values: [_1, _2, _2_5, _2_9, _3] + Allowed enum values: [_2, _2_0, _3, _3_0] """ - _1 = "1" _2 = "2" - _2_5 = "2.5" - _2_9 = "2.9" + _2_0 = "2.0" _3 = "3" + _3_0 = "3.0" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -56,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SmartHomeProtocol): return False @@ -64,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/source_language_for_locales.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/source_language_for_locales.py new file mode 100644 index 00000000..5b2d23d1 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/source_language_for_locales.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SourceLanguageForLocales(object): + """ + maps a language to a locale. During Automatic Skill Distribution, skill metadata and model of the source locale will be copied to other eligible locales of the same language. Eligible destination locales will be determined by the system. + + + :param language: two-letter string representing the language to distribute to. There must be at least one locale in publishingInformation.locales which has this language as the prefix. + :type language: (optional) str + :param source_locale: locale where the metadata and model will be copied from. This locale must already exist in the skill. + :type source_locale: (optional) str + + """ + deserialized_types = { + 'language': 'str', + 'source_locale': 'str' + } # type: Dict + + attribute_map = { + 'language': 'language', + 'source_locale': 'sourceLocale' + } # type: Dict + supports_multiple_types = False + + def __init__(self, language=None, source_locale=None): + # type: (Optional[str], Optional[str]) -> None + """maps a language to a locale. During Automatic Skill Distribution, skill metadata and model of the source locale will be copied to other eligible locales of the same language. Eligible destination locales will be determined by the system. + + :param language: two-letter string representing the language to distribute to. There must be at least one locale in publishingInformation.locales which has this language as the prefix. + :type language: (optional) str + :param source_locale: locale where the metadata and model will be copied from. This locale must already exist in the skill. + :type source_locale: (optional) str + """ + self.__discriminator_value = None # type: str + + self.language = language + self.source_locale = source_locale + + 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, SourceLanguageForLocales): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/ssl_certificate_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/ssl_certificate_type.py index a6def341..ad962e89 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/ssl_certificate_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/ssl_certificate_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class SSLCertificateType(Enum): Trusted = "Trusted" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SSLCertificateType): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/subscription_information.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/subscription_information.py new file mode 100644 index 00000000..cdc7a7c0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/subscription_information.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.subscription_payment_frequency import SubscriptionPaymentFrequency as SubscriptionPaymentFrequency_5e9ea667 + + +class SubscriptionInformation(object): + """ + Defines the structure for paid skill product subscription information. + + + :param subscription_payment_frequency: + :type subscription_payment_frequency: (optional) ask_smapi_model.v1.skill.manifest.subscription_payment_frequency.SubscriptionPaymentFrequency + + """ + deserialized_types = { + 'subscription_payment_frequency': 'ask_smapi_model.v1.skill.manifest.subscription_payment_frequency.SubscriptionPaymentFrequency' + } # type: Dict + + attribute_map = { + 'subscription_payment_frequency': 'subscriptionPaymentFrequency' + } # type: Dict + supports_multiple_types = False + + def __init__(self, subscription_payment_frequency=None): + # type: (Optional[SubscriptionPaymentFrequency_5e9ea667]) -> None + """Defines the structure for paid skill product subscription information. + + :param subscription_payment_frequency: + :type subscription_payment_frequency: (optional) ask_smapi_model.v1.skill.manifest.subscription_payment_frequency.SubscriptionPaymentFrequency + """ + self.__discriminator_value = None # type: str + + self.subscription_payment_frequency = subscription_payment_frequency + + 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, SubscriptionInformation): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/subscription_payment_frequency.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/subscription_payment_frequency.py new file mode 100644 index 00000000..21b65220 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/subscription_payment_frequency.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SubscriptionPaymentFrequency(Enum): + """ + The frequency in which payments are collected for the subscription. + + + + Allowed enum values: [MONTHLY, YEARLY] + """ + MONTHLY = "MONTHLY" + YEARLY = "YEARLY" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SubscriptionPaymentFrequency): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/supported_controls.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/supported_controls.py new file mode 100644 index 00000000..c9a2f219 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/supported_controls.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.supported_controls_type import SupportedControlsType as SupportedControlsType_98e28569 + + +class SupportedControls(object): + """ + (Optional) Contains the attributes specifying additional functionalities supported by the skill. + + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.manifest.supported_controls_type.SupportedControlsType + + """ + deserialized_types = { + 'object_type': 'ask_smapi_model.v1.skill.manifest.supported_controls_type.SupportedControlsType' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None): + # type: (Optional[SupportedControlsType_98e28569]) -> None + """(Optional) Contains the attributes specifying additional functionalities supported by the skill. + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.manifest.supported_controls_type.SupportedControlsType + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + + 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, SupportedControls): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/supported_controls_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/supported_controls_type.py new file mode 100644 index 00000000..81f2b65c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/supported_controls_type.py @@ -0,0 +1,65 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SupportedControlsType(Enum): + """ + Type of the supported functionality. + + + + Allowed enum values: [REMOTE_VEHICLE_CONTROL] + """ + REMOTE_VEHICLE_CONTROL = "REMOTE_VEHICLE_CONTROL" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SupportedControlsType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/tax_information.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/tax_information.py new file mode 100644 index 00000000..36349858 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/tax_information.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.tax_information_category import TaxInformationCategory as TaxInformationCategory_1ae2aa8f + + +class TaxInformation(object): + """ + Defines the structure for paid skill product tax information. + + + :param category: + :type category: (optional) ask_smapi_model.v1.skill.manifest.tax_information_category.TaxInformationCategory + + """ + deserialized_types = { + 'category': 'ask_smapi_model.v1.skill.manifest.tax_information_category.TaxInformationCategory' + } # type: Dict + + attribute_map = { + 'category': 'category' + } # type: Dict + supports_multiple_types = False + + def __init__(self, category=None): + # type: (Optional[TaxInformationCategory_1ae2aa8f]) -> None + """Defines the structure for paid skill product tax information. + + :param category: + :type category: (optional) ask_smapi_model.v1.skill.manifest.tax_information_category.TaxInformationCategory + """ + self.__discriminator_value = None # type: str + + self.category = category + + 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, TaxInformation): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/tax_information_category.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/tax_information_category.py new file mode 100644 index 00000000..505ef076 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/tax_information_category.py @@ -0,0 +1,71 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class TaxInformationCategory(Enum): + """ + The tax category that best describes the paid skill product. + + + + Allowed enum values: [SOFTWARE, STREAMING_AUDIO, STREAMING_RADIO, INFORMATION_SERVICES, VIDEO, PERIODICALS, NEWSPAPERS] + """ + SOFTWARE = "SOFTWARE" + STREAMING_AUDIO = "STREAMING_AUDIO" + STREAMING_RADIO = "STREAMING_RADIO" + INFORMATION_SERVICES = "INFORMATION_SERVICES" + VIDEO = "VIDEO" + PERIODICALS = "PERIODICALS" + NEWSPAPERS = "NEWSPAPERS" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, TaxInformationCategory): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/up_channel_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/up_channel_items.py index fc8ff46c..f295dbd8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/up_channel_items.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/up_channel_items.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/version.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/version.py index 508589af..6e1fc708 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/version.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/version.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -31,12 +31,12 @@ class Version(Enum): - Allowed enum values: [_1] + Allowed enum values: [_1_0] """ - _1 = "1" + _1_0 = "1.0" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Version): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis.py index db9c3db2..d1b00beb 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.video_region import VideoRegionV1 - from ask_smapi_model.v1.skill.manifest.video_apis_locale import VideoApisLocaleV1 - from ask_smapi_model.v1.skill.manifest.video_country_info import VideoCountryInfoV1 - from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpointV1 + from ask_smapi_model.v1.skill.manifest.video_region import VideoRegion as VideoRegion_376628d2 + from ask_smapi_model.v1.skill.manifest.video_apis_locale import VideoApisLocale as VideoApisLocale_4f25f8e3 + from ask_smapi_model.v1.skill.manifest.video_country_info import VideoCountryInfo as VideoCountryInfo_d9ac11a3 + from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpoint as LambdaEndpoint_87e61436 class VideoApis(object): @@ -60,7 +60,7 @@ class VideoApis(object): supports_multiple_types = False def __init__(self, regions=None, locales=None, endpoint=None, countries=None): - # type: (Optional[Dict[str, VideoRegionV1]], Optional[Dict[str, VideoApisLocaleV1]], Optional[LambdaEndpointV1], Optional[Dict[str, VideoCountryInfoV1]]) -> None + # type: (Optional[Dict[str, VideoRegion_376628d2]], Optional[Dict[str, VideoApisLocale_4f25f8e3]], Optional[LambdaEndpoint_87e61436], Optional[Dict[str, VideoCountryInfo_d9ac11a3]]) -> None """Defines the structure for video api of the skill. :param regions: Defines the structure for region information. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis_locale.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis_locale.py index c8c98453..cee3fed8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis_locale.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis_locale.py @@ -21,9 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.video_catalog_info import VideoCatalogInfoV1 + from ask_smapi_model.v1.skill.manifest.video_prompt_name import VideoPromptName as VideoPromptName_d8845a65 + from ask_smapi_model.v1.skill.manifest.video_fire_tv_catalog_ingestion import VideoFireTvCatalogIngestion as VideoFireTvCatalogIngestion_66ff327d + from ask_smapi_model.v1.skill.manifest.video_feature import VideoFeature as VideoFeature_d9ebf070 class VideoApisLocale(object): @@ -35,39 +37,53 @@ class VideoApisLocale(object): :type video_provider_targeting_names: (optional) list[str] :param video_provider_logo_uri: :type video_provider_logo_uri: (optional) str - :param catalog_information: - :type catalog_information: (optional) list[ask_smapi_model.v1.skill.manifest.video_catalog_info.VideoCatalogInfo] + :param fire_tv_catalog_ingestion: + :type fire_tv_catalog_ingestion: (optional) ask_smapi_model.v1.skill.manifest.video_fire_tv_catalog_ingestion.VideoFireTvCatalogIngestion + :param features: Defines the array of video features for this skill. + :type features: (optional) list[ask_smapi_model.v1.skill.manifest.video_feature.VideoFeature] + :param prompt_names: Name to use when Alexa renders the video skill name in a prompt to the user + :type prompt_names: (optional) list[ask_smapi_model.v1.skill.manifest.video_prompt_name.VideoPromptName] """ deserialized_types = { 'video_provider_targeting_names': 'list[str]', 'video_provider_logo_uri': 'str', - 'catalog_information': 'list[ask_smapi_model.v1.skill.manifest.video_catalog_info.VideoCatalogInfo]' + 'fire_tv_catalog_ingestion': 'ask_smapi_model.v1.skill.manifest.video_fire_tv_catalog_ingestion.VideoFireTvCatalogIngestion', + 'features': 'list[ask_smapi_model.v1.skill.manifest.video_feature.VideoFeature]', + 'prompt_names': 'list[ask_smapi_model.v1.skill.manifest.video_prompt_name.VideoPromptName]' } # type: Dict attribute_map = { 'video_provider_targeting_names': 'videoProviderTargetingNames', 'video_provider_logo_uri': 'videoProviderLogoUri', - 'catalog_information': 'catalogInformation' + 'fire_tv_catalog_ingestion': 'fireTvCatalogIngestion', + 'features': 'features', + 'prompt_names': 'promptNames' } # type: Dict supports_multiple_types = False - def __init__(self, video_provider_targeting_names=None, video_provider_logo_uri=None, catalog_information=None): - # type: (Optional[List[object]], Optional[str], Optional[List[VideoCatalogInfoV1]]) -> None + def __init__(self, video_provider_targeting_names=None, video_provider_logo_uri=None, fire_tv_catalog_ingestion=None, features=None, prompt_names=None): + # type: (Optional[List[object]], Optional[str], Optional[VideoFireTvCatalogIngestion_66ff327d], Optional[List[VideoFeature_d9ebf070]], Optional[List[VideoPromptName_d8845a65]]) -> None """Defines the structure for localized video api information. :param video_provider_targeting_names: Defines the video provider's targeting name. :type video_provider_targeting_names: (optional) list[str] :param video_provider_logo_uri: :type video_provider_logo_uri: (optional) str - :param catalog_information: - :type catalog_information: (optional) list[ask_smapi_model.v1.skill.manifest.video_catalog_info.VideoCatalogInfo] + :param fire_tv_catalog_ingestion: + :type fire_tv_catalog_ingestion: (optional) ask_smapi_model.v1.skill.manifest.video_fire_tv_catalog_ingestion.VideoFireTvCatalogIngestion + :param features: Defines the array of video features for this skill. + :type features: (optional) list[ask_smapi_model.v1.skill.manifest.video_feature.VideoFeature] + :param prompt_names: Name to use when Alexa renders the video skill name in a prompt to the user + :type prompt_names: (optional) list[ask_smapi_model.v1.skill.manifest.video_prompt_name.VideoPromptName] """ self.__discriminator_value = None # type: str self.video_provider_targeting_names = video_provider_targeting_names self.video_provider_logo_uri = video_provider_logo_uri - self.catalog_information = catalog_information + self.fire_tv_catalog_ingestion = fire_tv_catalog_ingestion + self.features = features + self.prompt_names = prompt_names def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_app_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_app_interface.py index db90f72b..81d3595a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_app_interface.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_app_interface.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_catalog_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_catalog_info.py index 97dc2a97..d1dc6e93 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_catalog_info.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_catalog_info.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_country_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_country_info.py index 52a37e29..ad3ab224 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_country_info.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_country_info.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.video_catalog_info import VideoCatalogInfoV1 + from ask_smapi_model.v1.skill.manifest.video_catalog_info import VideoCatalogInfo as VideoCatalogInfo_2bd994e9 class VideoCountryInfo(object): @@ -45,7 +45,7 @@ class VideoCountryInfo(object): supports_multiple_types = False def __init__(self, catalog_information=None): - # type: (Optional[List[VideoCatalogInfoV1]]) -> None + # type: (Optional[List[VideoCatalogInfo_2bd994e9]]) -> None """Defines the structure of per-country video info in the skill manifest. :param catalog_information: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_feature.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_feature.py new file mode 100644 index 00000000..63f9c35a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_feature.py @@ -0,0 +1,139 @@ +# 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 abc import ABCMeta, abstractmethod + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class VideoFeature(object): + """ + A feature of an Alexa skill. + + + :param version: + :type version: (optional) str + :param name: + :type name: (optional) str + + .. note:: + + This is an abstract class. Use the following mapping, to figure out + the model class to be instantiated, that sets ``name`` variable. + + | VIDEO_VOICE_PROFILE: :py:class:`ask_smapi_model.v1.skill.manifest.voice_profile_feature.VoiceProfileFeature` + + """ + deserialized_types = { + 'version': 'str', + 'name': 'str' + } # type: Dict + + attribute_map = { + 'version': 'version', + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'VIDEO_VOICE_PROFILE': 'ask_smapi_model.v1.skill.manifest.voice_profile_feature.VoiceProfileFeature' + } + + json_discriminator_key = "name" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, version=None, name=None): + # type: (Optional[str], Optional[str]) -> None + """A feature of an Alexa skill. + + :param version: + :type version: (optional) str + :param name: + :type name: (optional) str + """ + self.__discriminator_value = None # type: str + + self.version = version + self.name = name + + @classmethod + def get_real_child_model(cls, data): + # type: (Dict[str, str]) -> Optional[str] + """Returns the real base class specified by the discriminator""" + discriminator_value = data[cls.json_discriminator_key] + return cls.discriminator_value_class_map.get(discriminator_value) + + 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, VideoFeature): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/video_fire_tv_catalog_ingestion.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_fire_tv_catalog_ingestion.py new file mode 100644 index 00000000..0eb5e79f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_fire_tv_catalog_ingestion.py @@ -0,0 +1,113 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class VideoFireTvCatalogIngestion(object): + """ + + :param fire_tv_catalog_ingestion_source_id: + :type fire_tv_catalog_ingestion_source_id: (optional) str + :param is_fire_tv_catalog_ingestion_enabled: + :type is_fire_tv_catalog_ingestion_enabled: (optional) bool + + """ + deserialized_types = { + 'fire_tv_catalog_ingestion_source_id': 'str', + 'is_fire_tv_catalog_ingestion_enabled': 'bool' + } # type: Dict + + attribute_map = { + 'fire_tv_catalog_ingestion_source_id': 'fireTvCatalogIngestionSourceId', + 'is_fire_tv_catalog_ingestion_enabled': 'isFireTvCatalogIngestionEnabled' + } # type: Dict + supports_multiple_types = False + + def __init__(self, fire_tv_catalog_ingestion_source_id=None, is_fire_tv_catalog_ingestion_enabled=None): + # type: (Optional[str], Optional[bool]) -> None + """ + + :param fire_tv_catalog_ingestion_source_id: + :type fire_tv_catalog_ingestion_source_id: (optional) str + :param is_fire_tv_catalog_ingestion_enabled: + :type is_fire_tv_catalog_ingestion_enabled: (optional) bool + """ + self.__discriminator_value = None # type: str + + self.fire_tv_catalog_ingestion_source_id = fire_tv_catalog_ingestion_source_id + self.is_fire_tv_catalog_ingestion_enabled = is_fire_tv_catalog_ingestion_enabled + + 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, VideoFireTvCatalogIngestion): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/video_prompt_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_prompt_name.py new file mode 100644 index 00000000..d3e19108 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_prompt_name.py @@ -0,0 +1,114 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.video_prompt_name_type import VideoPromptNameType as VideoPromptNameType_342c466 + + +class VideoPromptName(object): + """ + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.manifest.video_prompt_name_type.VideoPromptNameType + :param name: + :type name: (optional) str + + """ + deserialized_types = { + 'object_type': 'ask_smapi_model.v1.skill.manifest.video_prompt_name_type.VideoPromptNameType', + 'name': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, name=None): + # type: (Optional[VideoPromptNameType_342c466], Optional[str]) -> None + """ + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.manifest.video_prompt_name_type.VideoPromptNameType + :param name: + :type name: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.name = name + + 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, VideoPromptName): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/video_prompt_name_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_prompt_name_type.py new file mode 100644 index 00000000..51f78f93 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_prompt_name_type.py @@ -0,0 +1,63 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class VideoPromptNameType(Enum): + """ + + + Allowed enum values: [Default] + """ + Default = "Default" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, VideoPromptNameType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_region.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_region.py index 06e8d238..0e283d13 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_region.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_region.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpointV1 - from ask_smapi_model.v1.skill.manifest.up_channel_items import UpChannelItemsV1 + from ask_smapi_model.v1.skill.manifest.up_channel_items import UpChannelItems as UpChannelItems_408eea2d + from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpoint as SkillManifestEndpoint_b30bcc05 class VideoRegion(object): @@ -33,13 +33,13 @@ class VideoRegion(object): :param endpoint: - :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint :param upchannel: The channel through which the partner skill can communicate to Alexa. :type upchannel: (optional) list[ask_smapi_model.v1.skill.manifest.up_channel_items.UpChannelItems] """ deserialized_types = { - 'endpoint': 'ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint', + 'endpoint': 'ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint', 'upchannel': 'list[ask_smapi_model.v1.skill.manifest.up_channel_items.UpChannelItems]' } # type: Dict @@ -50,11 +50,11 @@ class VideoRegion(object): supports_multiple_types = False def __init__(self, endpoint=None, upchannel=None): - # type: (Optional[LambdaEndpointV1], Optional[List[UpChannelItemsV1]]) -> None + # type: (Optional[SkillManifestEndpoint_b30bcc05], Optional[List[UpChannelItems_408eea2d]]) -> None """Defines the structure for endpoint information. :param endpoint: - :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint :param upchannel: The channel through which the partner skill can communicate to Alexa. :type upchannel: (optional) list[ask_smapi_model.v1.skill.manifest.up_channel_items.UpChannelItems] """ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_mode.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_mode.py index ced0ef2e..321fd049 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_mode.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_mode.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -31,13 +31,16 @@ class ViewportMode(Enum): - Allowed enum values: [HUB, TV] + Allowed enum values: [HUB, TV, MOBILE, PC, AUTO] """ HUB = "HUB" TV = "TV" + MOBILE = "MOBILE" + PC = "PC" + AUTO = "AUTO" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +56,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ViewportMode): return False @@ -61,6 +64,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_shape.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_shape.py index 9c7c64c6..303799f2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_shape.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_shape.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class ViewportShape(Enum): ROUND = "ROUND" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ViewportShape): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_specification.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_specification.py index 947afa44..e9055c91 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_specification.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_specification.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest.viewport_shape import ViewportShapeV1 - from ask_smapi_model.v1.skill.manifest.viewport_mode import ViewportModeV1 + from ask_smapi_model.v1.skill.manifest.viewport_mode import ViewportMode as ViewportMode_ade01bb4 + from ask_smapi_model.v1.skill.manifest.viewport_shape import ViewportShape as ViewportShape_bfdfacae class ViewportSpecification(object): @@ -66,7 +66,7 @@ class ViewportSpecification(object): supports_multiple_types = False def __init__(self, mode=None, shape=None, min_width=None, max_width=None, min_height=None, max_height=None): - # type: (Optional[ViewportModeV1], Optional[ViewportShapeV1], Optional[int], Optional[int], Optional[int], Optional[int]) -> None + # type: (Optional[ViewportMode_ade01bb4], Optional[ViewportShape_bfdfacae], Optional[int], Optional[int], Optional[int], Optional[int]) -> None """Defines a viewport specification. :param mode: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/voice_profile_feature.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/voice_profile_feature.py new file mode 100644 index 00000000..191df33f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/voice_profile_feature.py @@ -0,0 +1,112 @@ +# 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_smapi_model.v1.skill.manifest.video_feature import VideoFeature + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class VoiceProfileFeature(VideoFeature): + """ + Feature for allowing for querying for available partner voice profiles, linking Alexa Speaker ID profiles to partner speaker profiles, and sending partner speaker profiles in directives. + + + :param version: + :type version: (optional) str + + """ + deserialized_types = { + 'version': 'str', + 'name': 'str' + } # type: Dict + + attribute_map = { + 'version': 'version', + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, version=None): + # type: (Optional[str], ) -> None + """Feature for allowing for querying for available partner voice profiles, linking Alexa Speaker ID profiles to partner speaker profiles, and sending partner speaker profiles in directives. + + :param version: + :type version: (optional) str + """ + self.__discriminator_value = "VIDEO_VOICE_PROFILE" # type: str + + self.name = self.__discriminator_value + super(VoiceProfileFeature, self).__init__(version=version, name=self.__discriminator_value) + + 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, VoiceProfileFeature): + 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-smapi-model/ask_smapi_model/v1/skill/manifest_last_update_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest_last_update_request.py index b30f037e..b4d86400 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest_last_update_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest_last_update_request.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.status import StatusV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 + from ask_smapi_model.v1.skill.status import Status as Status_585d1308 + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 class ManifestLastUpdateRequest(object): @@ -58,7 +58,7 @@ class ManifestLastUpdateRequest(object): supports_multiple_types = False def __init__(self, status=None, errors=None, warnings=None, version=None): - # type: (Optional[StatusV1], Optional[List[StandardizedErrorV1]], Optional[List[StandardizedErrorV1]], Optional[str]) -> None + # type: (Optional[Status_585d1308], Optional[List[StandardizedError_f5106a89]], Optional[List[StandardizedError_f5106a89]], Optional[str]) -> None """Contains attributes related to last modification (create/update) request of a resource. :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/manifest_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest_status.py index 7559da43..d822d049 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest_status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest_last_update_request import ManifestLastUpdateRequestV1 + from ask_smapi_model.v1.skill.manifest_last_update_request import ManifestLastUpdateRequest as ManifestLastUpdateRequest_a14b90ab class ManifestStatus(object): @@ -49,7 +49,7 @@ class ManifestStatus(object): supports_multiple_types = False def __init__(self, last_update_request=None, e_tag=None): - # type: (Optional[ManifestLastUpdateRequestV1], Optional[str]) -> None + # type: (Optional[ManifestLastUpdateRequest_a14b90ab], Optional[str]) -> None """Defines the structure for a resource status. :param last_update_request: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/__init__.py index 104ab213..33f00826 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/__init__.py @@ -14,8 +14,8 @@ # from __future__ import absolute_import -from .skill_type import SkillType -from .stage_for_metric import StageForMetric from .metric import Metric +from .stage_for_metric import StageForMetric +from .skill_type import SkillType from .period import Period from .get_metric_data_response import GetMetricDataResponse diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/get_metric_data_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/get_metric_data_response.py index 631c3849..72f2ee71 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/get_metric_data_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/get_metric_data_response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/metric.py b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/metric.py index 8c4cbf59..4fdc0f88 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/metric.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/metric.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -45,7 +45,7 @@ class Metric(Enum): skillEndedSessions = "skillEndedSessions" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -61,7 +61,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Metric): return False @@ -69,6 +69,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/period.py b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/period.py index b314ae3a..8ba5cb93 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/period.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/period.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class Period(Enum): P1D = "P1D" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Period): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/skill_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/skill_type.py index c7a3cbaf..57e616f6 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/skill_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/skill_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class SkillType(Enum): flashBriefing = "flashBriefing" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SkillType): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/stage_for_metric.py b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/stage_for_metric.py index 85b56ce4..214331c3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/metrics/stage_for_metric.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/stage_for_metric.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class StageForMetric(Enum): development = "development" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, StageForMetric): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/__init__.py index 4b8e9f1f..5fe6807f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/__init__.py @@ -14,13 +14,13 @@ # from __future__ import absolute_import +from .create_nlu_annotation_set_request import CreateNLUAnnotationSetRequest from .update_nlu_annotation_set_annotations_request import UpdateNLUAnnotationSetAnnotationsRequest -from .list_nlu_annotation_sets_response import ListNLUAnnotationSetsResponse -from .create_nlu_annotation_set_response import CreateNLUAnnotationSetResponse +from .annotation_set import AnnotationSet from .pagination_context import PaginationContext -from .get_nlu_annotation_set_properties_response import GetNLUAnnotationSetPropertiesResponse -from .create_nlu_annotation_set_request import CreateNLUAnnotationSetRequest -from .annotation_set_entity import AnnotationSetEntity from .links import Links +from .annotation_set_entity import AnnotationSetEntity +from .get_nlu_annotation_set_properties_response import GetNLUAnnotationSetPropertiesResponse +from .list_nlu_annotation_sets_response import ListNLUAnnotationSetsResponse from .update_nlu_annotation_set_properties_request import UpdateNLUAnnotationSetPropertiesRequest -from .annotation_set import AnnotationSet +from .create_nlu_annotation_set_response import CreateNLUAnnotationSetResponse diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/annotation_set.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/annotation_set.py index 4a034dc8..afbcdeef 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/annotation_set.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/annotation_set.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/annotation_set_entity.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/annotation_set_entity.py index 6a37d334..4a5f7234 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/annotation_set_entity.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/annotation_set_entity.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/create_nlu_annotation_set_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/create_nlu_annotation_set_request.py index f4547990..00a395b6 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/create_nlu_annotation_set_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/create_nlu_annotation_set_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/create_nlu_annotation_set_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/create_nlu_annotation_set_response.py index 20765f35..27e9bf58 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/create_nlu_annotation_set_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/create_nlu_annotation_set_response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/get_nlu_annotation_set_properties_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/get_nlu_annotation_set_properties_response.py index e3d220a2..f8e9a6da 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/get_nlu_annotation_set_properties_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/get_nlu_annotation_set_properties_response.py @@ -22,7 +22,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/links.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/links.py index 906416c5..5cab3ab7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/links.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/links.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.link import LinkV1 + from ask_smapi_model.v1.link import Link as Link_5c161ca5 class Links(object): @@ -49,7 +49,7 @@ class Links(object): supports_multiple_types = False def __init__(self, object_self=None, next=None): - # type: (Optional[LinkV1], Optional[LinkV1]) -> None + # type: (Optional[Link_5c161ca5], Optional[Link_5c161ca5]) -> None """Links for the API navigation. :param object_self: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/list_nlu_annotation_sets_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/list_nlu_annotation_sets_response.py index 65454ded..15b31dfc 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/list_nlu_annotation_sets_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/list_nlu_annotation_sets_response.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.annotation_sets.pagination_context import PaginationContextV1 - from ask_smapi_model.v1.skill.nlu.annotation_sets.links import LinksV1 - from ask_smapi_model.v1.skill.nlu.annotation_sets.annotation_set import AnnotationSetV1 + from ask_smapi_model.v1.skill.nlu.annotation_sets.pagination_context import PaginationContext as PaginationContext_c92f317b + from ask_smapi_model.v1.skill.nlu.annotation_sets.links import Links as Links_2dc49e1a + from ask_smapi_model.v1.skill.nlu.annotation_sets.annotation_set import AnnotationSet as AnnotationSet_b0768ac1 class ListNLUAnnotationSetsResponse(object): @@ -53,7 +53,7 @@ class ListNLUAnnotationSetsResponse(object): supports_multiple_types = False def __init__(self, annotation_sets=None, pagination_context=None, links=None): - # type: (Optional[List[AnnotationSetV1]], Optional[PaginationContextV1], Optional[LinksV1]) -> None + # type: (Optional[List[AnnotationSet_b0768ac1]], Optional[PaginationContext_c92f317b], Optional[Links_2dc49e1a]) -> None """ :param annotation_sets: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/pagination_context.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/pagination_context.py index fdb41f11..1a0cddc8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/pagination_context.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/pagination_context.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/update_nlu_annotation_set_annotations_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/update_nlu_annotation_set_annotations_request.py index c1820421..dd62bc6d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/update_nlu_annotation_set_annotations_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/update_nlu_annotation_set_annotations_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/update_nlu_annotation_set_properties_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/update_nlu_annotation_set_properties_request.py index e171e7c1..749da944 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/update_nlu_annotation_set_properties_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/annotation_sets/update_nlu_annotation_set_properties_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/__init__.py index 1bed7ebb..18f344f9 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/__init__.py @@ -14,35 +14,35 @@ # from __future__ import absolute_import -from .list_nlu_evaluations_response import ListNLUEvaluationsResponse +from .source import Source +from .evaluation_inputs import EvaluationInputs from .pagination_context import PaginationContext -from .get_nlu_evaluation_results_response import GetNLUEvaluationResultsResponse -from .results_status import ResultsStatus -from .results import Results -from .resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCode +from .evaluation_entity import EvaluationEntity +from .actual import Actual +from .links import Links +from .resolutions_per_authority_value import ResolutionsPerAuthorityValue +from .slots_props import SlotsProps from .paged_results_response import PagedResultsResponse -from .expected_intent_slots_props import ExpectedIntentSlotsProps -from .evaluate_nlu_request import EvaluateNLURequest +from .get_nlu_evaluation_response import GetNLUEvaluationResponse from .get_nlu_evaluation_response_links import GetNLUEvaluationResponseLinks -from .actual import Actual -from .test_case import TestCase +from .evaluate_response import EvaluateResponse +from .resolutions import Resolutions from .evaluation import Evaluation from .resolutions_per_authority import ResolutionsPerAuthority -from .status import Status -from .paged_results_response_pagination_context import PagedResultsResponsePaginationContext -from .evaluation_entity import EvaluationEntity -from .links import Links -from .inputs import Inputs -from .expected import Expected +from .test_case import TestCase +from .list_nlu_evaluations_response import ListNLUEvaluationsResponse +from .results_status import ResultsStatus +from .evaluate_nlu_request import EvaluateNLURequest from .confirmation_status import ConfirmationStatus -from .evaluation_inputs import EvaluationInputs +from .resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCode from .paged_response import PagedResponse -from .evaluate_response import EvaluateResponse +from .intent import Intent from .resolutions_per_authority_status import ResolutionsPerAuthorityStatus +from .expected_intent_slots_props import ExpectedIntentSlotsProps from .expected_intent import ExpectedIntent -from .resolutions import Resolutions -from .slots_props import SlotsProps -from .get_nlu_evaluation_response import GetNLUEvaluationResponse -from .resolutions_per_authority_value import ResolutionsPerAuthorityValue -from .source import Source -from .intent import Intent +from .expected import Expected +from .get_nlu_evaluation_results_response import GetNLUEvaluationResultsResponse +from .inputs import Inputs +from .paged_results_response_pagination_context import PagedResultsResponsePaginationContext +from .status import Status +from .results import Results diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/actual.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/actual.py index e3bf9b04..4d568cd7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/actual.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/actual.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.intent import IntentV1 + from ask_smapi_model.v1.skill.nlu.evaluations.intent import Intent as Intent_986cde1a class Actual(object): @@ -47,7 +47,7 @@ class Actual(object): supports_multiple_types = False def __init__(self, domain=None, intent=None): - # type: (Optional[str], Optional[IntentV1]) -> None + # type: (Optional[str], Optional[Intent_986cde1a]) -> None """ :param domain: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/confirmation_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/confirmation_status.py index 59b77601..1ffd0640 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/confirmation_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/confirmation_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ConfirmationStatus(Enum): DENIED = "DENIED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ConfirmationStatus): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluate_nlu_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluate_nlu_request.py index d923e741..afaebc92 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluate_nlu_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluate_nlu_request.py @@ -21,16 +21,16 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.source import SourceV1 + from ask_smapi_model.v1.skill.nlu.evaluations.source import Source as Source_89d9013a class EvaluateNLURequest(object): """ :param stage: - :type stage: str + :type stage: (optional) object :param locale: :type locale: (optional) str :param source: @@ -38,7 +38,7 @@ class EvaluateNLURequest(object): """ deserialized_types = { - 'stage': 'str', + 'stage': 'object', 'locale': 'str', 'source': 'ask_smapi_model.v1.skill.nlu.evaluations.source.Source' } # type: Dict @@ -50,12 +50,12 @@ class EvaluateNLURequest(object): } # type: Dict supports_multiple_types = False - def __init__(self, stage='development', locale=None, source=None): - # type: (Optional[str], Optional[str], Optional[SourceV1]) -> None + def __init__(self, stage=None, locale=None, source=None): + # type: (Optional[object], Optional[str], Optional[Source_89d9013a]) -> None """ :param stage: - :type stage: str + :type stage: (optional) object :param locale: :type locale: (optional) str :param source: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluate_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluate_response.py index ea26902b..8c122b38 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluate_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluate_response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation.py index 9d8df9aa..2e474281 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation.py @@ -22,10 +22,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.status import StatusV1 - from ask_smapi_model.v1.skill.nlu.evaluations.evaluation_inputs import EvaluationInputsV1 + from ask_smapi_model.v1.skill.nlu.evaluations.evaluation_inputs import EvaluationInputs as EvaluationInputs_14ada97b + from ask_smapi_model.v1.skill.nlu.evaluations.status import Status as Status_1263d15a class Evaluation(EvaluationEntity): @@ -65,7 +65,7 @@ class Evaluation(EvaluationEntity): supports_multiple_types = False def __init__(self, start_timestamp=None, end_timestamp=None, status=None, error_message=None, inputs=None, id=None): - # type: (Optional[datetime], Optional[datetime], Optional[StatusV1], Optional[str], Optional[EvaluationInputsV1], Optional[str]) -> None + # type: (Optional[datetime], Optional[datetime], Optional[Status_1263d15a], Optional[str], Optional[EvaluationInputs_14ada97b], Optional[str]) -> None """ :param start_timestamp: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation_entity.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation_entity.py index 33e48406..0b2951ee 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation_entity.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation_entity.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.status import StatusV1 - from ask_smapi_model.v1.skill.nlu.evaluations.evaluation_inputs import EvaluationInputsV1 + from ask_smapi_model.v1.skill.nlu.evaluations.evaluation_inputs import EvaluationInputs as EvaluationInputs_14ada97b + from ask_smapi_model.v1.skill.nlu.evaluations.status import Status as Status_1263d15a class EvaluationEntity(object): @@ -60,7 +60,7 @@ class EvaluationEntity(object): supports_multiple_types = False def __init__(self, start_timestamp=None, end_timestamp=None, status=None, error_message=None, inputs=None): - # type: (Optional[datetime], Optional[datetime], Optional[StatusV1], Optional[str], Optional[EvaluationInputsV1]) -> None + # type: (Optional[datetime], Optional[datetime], Optional[Status_1263d15a], Optional[str], Optional[EvaluationInputs_14ada97b]) -> None """ :param start_timestamp: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation_inputs.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation_inputs.py index 540d15aa..1dc9ea84 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation_inputs.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/evaluation_inputs.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.source import SourceV1 + from ask_smapi_model.v1.skill.nlu.evaluations.source import Source as Source_89d9013a class EvaluationInputs(object): @@ -32,14 +32,14 @@ class EvaluationInputs(object): :param locale: :type locale: (optional) str :param stage: - :type stage: (optional) str + :type stage: (optional) object :param source: :type source: (optional) ask_smapi_model.v1.skill.nlu.evaluations.source.Source """ deserialized_types = { 'locale': 'str', - 'stage': 'str', + 'stage': 'object', 'source': 'ask_smapi_model.v1.skill.nlu.evaluations.source.Source' } # type: Dict @@ -51,13 +51,13 @@ class EvaluationInputs(object): supports_multiple_types = False def __init__(self, locale=None, stage=None, source=None): - # type: (Optional[str], Optional[str], Optional[SourceV1]) -> None + # type: (Optional[str], Optional[object], Optional[Source_89d9013a]) -> None """ :param locale: :type locale: (optional) str :param stage: - :type stage: (optional) str + :type stage: (optional) object :param source: :type source: (optional) ask_smapi_model.v1.skill.nlu.evaluations.source.Source """ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected.py index 78572524..2b4a4292 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.expected_intent import ExpectedIntentV1 + from ask_smapi_model.v1.skill.nlu.evaluations.expected_intent import ExpectedIntent as ExpectedIntent_a4c5ac93 class Expected(object): @@ -47,7 +47,7 @@ class Expected(object): supports_multiple_types = False def __init__(self, domain=None, intent=None): - # type: (Optional[str], Optional[ExpectedIntentV1]) -> None + # type: (Optional[str], Optional[ExpectedIntent_a4c5ac93]) -> None """ :param domain: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected_intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected_intent.py index b6505413..5d7547b2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected_intent.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected_intent.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.expected_intent_slots_props import ExpectedIntentSlotsPropsV1 + from ask_smapi_model.v1.skill.nlu.evaluations.expected_intent_slots_props import ExpectedIntentSlotsProps as ExpectedIntentSlotsProps_7e0c5c67 class ExpectedIntent(object): @@ -47,7 +47,7 @@ class ExpectedIntent(object): supports_multiple_types = False def __init__(self, name=None, slots=None): - # type: (Optional[str], Optional[Dict[str, ExpectedIntentSlotsPropsV1]]) -> None + # type: (Optional[str], Optional[Dict[str, ExpectedIntentSlotsProps_7e0c5c67]]) -> None """ :param name: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected_intent_slots_props.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected_intent_slots_props.py index c289e07b..24ac070f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected_intent_slots_props.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/expected_intent_slots_props.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_response.py index 8eb67933..ee824a06 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_response.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.status import StatusV1 - from ask_smapi_model.v1.skill.nlu.evaluations.evaluation_inputs import EvaluationInputsV1 - from ask_smapi_model.v1.skill.nlu.evaluations.get_nlu_evaluation_response_links import GetNLUEvaluationResponseLinksV1 + from ask_smapi_model.v1.skill.nlu.evaluations.evaluation_inputs import EvaluationInputs as EvaluationInputs_14ada97b + from ask_smapi_model.v1.skill.nlu.evaluations.status import Status as Status_1263d15a + from ask_smapi_model.v1.skill.nlu.evaluations.get_nlu_evaluation_response_links import GetNLUEvaluationResponseLinks as GetNLUEvaluationResponseLinks_677aaac6 class GetNLUEvaluationResponse(EvaluationEntity): @@ -66,7 +66,7 @@ class GetNLUEvaluationResponse(EvaluationEntity): supports_multiple_types = False def __init__(self, start_timestamp=None, end_timestamp=None, status=None, error_message=None, inputs=None, links=None): - # type: (Optional[datetime], Optional[datetime], Optional[StatusV1], Optional[str], Optional[EvaluationInputsV1], Optional[GetNLUEvaluationResponseLinksV1]) -> None + # type: (Optional[datetime], Optional[datetime], Optional[Status_1263d15a], Optional[str], Optional[EvaluationInputs_14ada97b], Optional[GetNLUEvaluationResponseLinks_677aaac6]) -> None """ :param start_timestamp: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_response_links.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_response_links.py index 735a6c4f..3c7a57ce 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_response_links.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_response_links.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.results import ResultsV1 + from ask_smapi_model.v1.skill.nlu.evaluations.results import Results as Results_eb19baaa class GetNLUEvaluationResponseLinks(object): @@ -43,7 +43,7 @@ class GetNLUEvaluationResponseLinks(object): supports_multiple_types = False def __init__(self, results=None): - # type: (Optional[ResultsV1]) -> None + # type: (Optional[Results_eb19baaa]) -> None """ :param results: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_results_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_results_response.py index 4a9f881b..8fb072a3 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_results_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/get_nlu_evaluation_results_response.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.paged_results_response_pagination_context import PagedResultsResponsePaginationContextV1 - from ask_smapi_model.v1.skill.nlu.evaluations.test_case import TestCaseV1 - from ask_smapi_model.v1.skill.nlu.evaluations.links import LinksV1 + from ask_smapi_model.v1.skill.nlu.evaluations.links import Links as Links_f9f963f0 + from ask_smapi_model.v1.skill.nlu.evaluations.paged_results_response_pagination_context import PagedResultsResponsePaginationContext as PagedResultsResponsePaginationContext_530bbee6 + from ask_smapi_model.v1.skill.nlu.evaluations.test_case import TestCase as TestCase_ce8e86c7 class GetNLUEvaluationResultsResponse(PagedResultsResponse): @@ -58,7 +58,7 @@ class GetNLUEvaluationResultsResponse(PagedResultsResponse): supports_multiple_types = False def __init__(self, pagination_context=None, links=None, total_failed=None, test_cases=None): - # type: (Optional[PagedResultsResponsePaginationContextV1], Optional[LinksV1], Optional[float], Optional[List[TestCaseV1]]) -> None + # type: (Optional[PagedResultsResponsePaginationContext_530bbee6], Optional[Links_f9f963f0], Optional[float], Optional[List[TestCase_ce8e86c7]]) -> None """ :param pagination_context: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/inputs.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/inputs.py index 72633084..a6ae1ba8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/inputs.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/inputs.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/intent.py index d2dc3f4f..63bbe901 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/intent.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/intent.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.confirmation_status import ConfirmationStatusV1 - from ask_smapi_model.v1.skill.nlu.evaluations.slots_props import SlotsPropsV1 + from ask_smapi_model.v1.skill.nlu.evaluations.confirmation_status import ConfirmationStatus as ConfirmationStatus_5853164d + from ask_smapi_model.v1.skill.nlu.evaluations.slots_props import SlotsProps as SlotsProps_49b87617 class Intent(object): @@ -52,7 +52,7 @@ class Intent(object): supports_multiple_types = False def __init__(self, name=None, confirmation_status=None, slots=None): - # type: (Optional[str], Optional[ConfirmationStatusV1], Optional[Dict[str, SlotsPropsV1]]) -> None + # type: (Optional[str], Optional[ConfirmationStatus_5853164d], Optional[Dict[str, SlotsProps_49b87617]]) -> None """ :param name: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/links.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/links.py index 906416c5..5cab3ab7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/links.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/links.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.link import LinkV1 + from ask_smapi_model.v1.link import Link as Link_5c161ca5 class Links(object): @@ -49,7 +49,7 @@ class Links(object): supports_multiple_types = False def __init__(self, object_self=None, next=None): - # type: (Optional[LinkV1], Optional[LinkV1]) -> None + # type: (Optional[Link_5c161ca5], Optional[Link_5c161ca5]) -> None """Links for the API navigation. :param object_self: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/list_nlu_evaluations_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/list_nlu_evaluations_response.py index 98578391..8918891c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/list_nlu_evaluations_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/list_nlu_evaluations_response.py @@ -22,11 +22,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.evaluation import EvaluationV1 - from ask_smapi_model.v1.skill.nlu.evaluations.pagination_context import PaginationContextV1 - from ask_smapi_model.v1.skill.nlu.evaluations.links import LinksV1 + from ask_smapi_model.v1.skill.nlu.evaluations.links import Links as Links_f9f963f0 + from ask_smapi_model.v1.skill.nlu.evaluations.evaluation import Evaluation as Evaluation_85d2851a + from ask_smapi_model.v1.skill.nlu.evaluations.pagination_context import PaginationContext as PaginationContext_281d8865 class ListNLUEvaluationsResponse(PagedResponse): @@ -56,7 +56,7 @@ class ListNLUEvaluationsResponse(PagedResponse): supports_multiple_types = False def __init__(self, pagination_context=None, links=None, evaluations=None): - # type: (Optional[PaginationContextV1], Optional[LinksV1], Optional[List[EvaluationV1]]) -> None + # type: (Optional[PaginationContext_281d8865], Optional[Links_f9f963f0], Optional[List[Evaluation_85d2851a]]) -> None """response body for a list evaluation API :param pagination_context: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_response.py index 39ef1b0f..4b029c29 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.pagination_context import PaginationContextV1 - from ask_smapi_model.v1.skill.nlu.evaluations.links import LinksV1 + from ask_smapi_model.v1.skill.nlu.evaluations.links import Links as Links_f9f963f0 + from ask_smapi_model.v1.skill.nlu.evaluations.pagination_context import PaginationContext as PaginationContext_281d8865 class PagedResponse(object): @@ -48,7 +48,7 @@ class PagedResponse(object): supports_multiple_types = False def __init__(self, pagination_context=None, links=None): - # type: (Optional[PaginationContextV1], Optional[LinksV1]) -> None + # type: (Optional[PaginationContext_281d8865], Optional[Links_f9f963f0]) -> None """ :param pagination_context: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_results_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_results_response.py index 7fa32279..87beb573 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_results_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_results_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.paged_results_response_pagination_context import PagedResultsResponsePaginationContextV1 - from ask_smapi_model.v1.skill.nlu.evaluations.links import LinksV1 + from ask_smapi_model.v1.skill.nlu.evaluations.links import Links as Links_f9f963f0 + from ask_smapi_model.v1.skill.nlu.evaluations.paged_results_response_pagination_context import PagedResultsResponsePaginationContext as PagedResultsResponsePaginationContext_530bbee6 class PagedResultsResponse(object): @@ -48,7 +48,7 @@ class PagedResultsResponse(object): supports_multiple_types = False def __init__(self, pagination_context=None, links=None): - # type: (Optional[PagedResultsResponsePaginationContextV1], Optional[LinksV1]) -> None + # type: (Optional[PagedResultsResponsePaginationContext_530bbee6], Optional[Links_f9f963f0]) -> None """ :param pagination_context: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_results_response_pagination_context.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_results_response_pagination_context.py index da80439a..4a384dd2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_results_response_pagination_context.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/paged_results_response_pagination_context.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/pagination_context.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/pagination_context.py index 7f1623be..a7d08810 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/pagination_context.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/pagination_context.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions.py index 0538714e..66eaaf9c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority.py index 7f7fd03a..96036f4f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.resolutions_per_authority_status import ResolutionsPerAuthorityStatusV1 - from ask_smapi_model.v1.skill.nlu.evaluations.resolutions_per_authority_value import ResolutionsPerAuthorityValueV1 + from ask_smapi_model.v1.skill.nlu.evaluations.resolutions_per_authority_value import ResolutionsPerAuthorityValue as ResolutionsPerAuthorityValue_2a33306b + from ask_smapi_model.v1.skill.nlu.evaluations.resolutions_per_authority_status import ResolutionsPerAuthorityStatus as ResolutionsPerAuthorityStatus_74ba1d4d class ResolutionsPerAuthority(object): @@ -52,7 +52,7 @@ class ResolutionsPerAuthority(object): supports_multiple_types = False def __init__(self, authority=None, status=None, values=None): - # type: (Optional[str], Optional[ResolutionsPerAuthorityStatusV1], Optional[List[ResolutionsPerAuthorityValueV1]]) -> None + # type: (Optional[str], Optional[ResolutionsPerAuthorityStatus_74ba1d4d], Optional[List[ResolutionsPerAuthorityValue_2a33306b]]) -> None """ :param authority: The name of the authority for the slot values. For custom slot types, this authority label incorporates your skill ID and the slot type name. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_status.py index 6ee84b87..d9deccca 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCodeV1 + from ask_smapi_model.v1.skill.nlu.evaluations.resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCode as ResolutionsPerAuthorityStatusCode_b309d82e class ResolutionsPerAuthorityStatus(object): @@ -43,7 +43,7 @@ class ResolutionsPerAuthorityStatus(object): supports_multiple_types = False def __init__(self, code=None): - # type: (Optional[ResolutionsPerAuthorityStatusCodeV1]) -> None + # type: (Optional[ResolutionsPerAuthorityStatusCode_b309d82e]) -> None """ :param code: A code indicating the results of attempting to resolve the user utterance against the defined slot types. This can be one of the following: ER_SUCCESS_MATCH: The spoken value matched a value or synonym explicitly defined in your custom slot type. ER_SUCCESS_NO_MATCH: The spoken value did not match any values or synonyms explicitly defined in your custom slot type. ER_ERROR_TIMEOUT: An error occurred due to a timeout. ER_ERROR_EXCEPTION: An error occurred due to an exception during processing. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_status_code.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_status_code.py index 4eb4398a..08e06d20 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_status_code.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_status_code.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class ResolutionsPerAuthorityStatusCode(Enum): ER_ERROR_EXCEPTION = "ER_ERROR_EXCEPTION" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ResolutionsPerAuthorityStatusCode): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_value.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_value.py index 86d6d3b0..eef1c05e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_value.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/resolutions_per_authority_value.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/results.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/results.py index d20059b2..8bca7131 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/results.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/results.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/results_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/results_status.py index 6e372ade..ee3c16a4 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/results_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/results_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,7 +35,7 @@ class ResultsStatus(Enum): FAILED = "FAILED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -51,7 +51,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ResultsStatus): return False @@ -59,6 +59,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/slots_props.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/slots_props.py index 12a8f545..feba9da7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/slots_props.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/slots_props.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.confirmation_status import ConfirmationStatusV1 - from ask_smapi_model.v1.skill.nlu.evaluations.resolutions import ResolutionsV1 + from ask_smapi_model.v1.skill.nlu.evaluations.resolutions import Resolutions as Resolutions_4b194bcc + from ask_smapi_model.v1.skill.nlu.evaluations.confirmation_status import ConfirmationStatus as ConfirmationStatus_5853164d class SlotsProps(object): @@ -56,7 +56,7 @@ class SlotsProps(object): supports_multiple_types = False def __init__(self, name=None, value=None, confirmation_status=None, resolutions=None): - # type: (Optional[str], Optional[str], Optional[ConfirmationStatusV1], Optional[ResolutionsV1]) -> None + # type: (Optional[str], Optional[str], Optional[ConfirmationStatus_5853164d], Optional[Resolutions_4b194bcc]) -> None """ :param name: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/source.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/source.py index d6e45246..a4c2a962 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/source.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/source.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/status.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/status.py index 8fafcc80..3cbf26d2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class Status(Enum): ERROR = "ERROR" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Status): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/test_case.py b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/test_case.py index c8cef12f..81679980 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/test_case.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/test_case.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.nlu.evaluations.inputs import InputsV1 - from ask_smapi_model.v1.skill.nlu.evaluations.results_status import ResultsStatusV1 - from ask_smapi_model.v1.skill.nlu.evaluations.expected import ExpectedV1 - from ask_smapi_model.v1.skill.nlu.evaluations.actual import ActualV1 + from ask_smapi_model.v1.skill.nlu.evaluations.expected import Expected as Expected_2f82531a + from ask_smapi_model.v1.skill.nlu.evaluations.results_status import ResultsStatus as ResultsStatus_97dfe1c9 + from ask_smapi_model.v1.skill.nlu.evaluations.inputs import Inputs as Inputs_9b28fd7a + from ask_smapi_model.v1.skill.nlu.evaluations.actual import Actual as Actual_3f8509da class TestCase(object): @@ -58,7 +58,7 @@ class TestCase(object): supports_multiple_types = False def __init__(self, status=None, inputs=None, actual=None, expected=None): - # type: (Optional[ResultsStatusV1], Optional[InputsV1], Optional[ActualV1], Optional[List[ExpectedV1]]) -> None + # type: (Optional[ResultsStatus_97dfe1c9], Optional[Inputs_9b28fd7a], Optional[Actual_3f8509da], Optional[List[Expected_2f82531a]]) -> None """ :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/overwrite_mode.py b/ask-smapi-model/ask_smapi_model/v1/skill/overwrite_mode.py index 1a7eff2e..f35604aa 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/overwrite_mode.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/overwrite_mode.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class OverwriteMode(Enum): OVERWRITE = "OVERWRITE" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, OverwriteMode): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/private/list_private_distribution_accounts_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/private/list_private_distribution_accounts_response.py deleted file mode 100644 index 0bf5844a..00000000 --- a/ask-smapi-model/ask_smapi_model/v1/skill/private/list_private_distribution_accounts_response.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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 - - -if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union - from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 - from ask_smapi_model.v1.skill.private.private_distribution_account import PrivateDistributionAccountV1 - - -class ListPrivateDistributionAccountsResponse(object): - """ - Response of ListPrivateDistributionAccounts. - - - :param links: - :type links: (optional) ask_smapi_model.v1.links.Links - :param private_distribution_accounts: List of PrivateDistributionAccounts. - :type private_distribution_accounts: (optional) list[ask_smapi_model.v1.skill.private.private_distribution_account.PrivateDistributionAccount] - :param next_token: - :type next_token: (optional) str - - """ - deserialized_types = { - 'links': 'ask_smapi_model.v1.links.Links', - 'private_distribution_accounts': 'list[ask_smapi_model.v1.skill.private.private_distribution_account.PrivateDistributionAccount]', - 'next_token': 'str' - } # type: Dict - - attribute_map = { - 'links': '_links', - 'private_distribution_accounts': 'privateDistributionAccounts', - 'next_token': 'nextToken' - } # type: Dict - supports_multiple_types = False - - def __init__(self, links=None, private_distribution_accounts=None, next_token=None): - # type: (Optional[LinksV1], Optional[List[PrivateDistributionAccountV1]], Optional[str]) -> None - """Response of ListPrivateDistributionAccounts. - - :param links: - :type links: (optional) ask_smapi_model.v1.links.Links - :param private_distribution_accounts: List of PrivateDistributionAccounts. - :type private_distribution_accounts: (optional) list[ask_smapi_model.v1.skill.private.private_distribution_account.PrivateDistributionAccount] - :param next_token: - :type next_token: (optional) str - """ - self.__discriminator_value = None # type: str - - self.links = links - self.private_distribution_accounts = private_distribution_accounts - self.next_token = next_token - - 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, ListPrivateDistributionAccountsResponse): - 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-smapi-model/ask_smapi_model/v1/skill/publication/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/publication/__init__.py index 0bc1bfb1..96f1400b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/publication/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/publication/__init__.py @@ -15,5 +15,5 @@ from __future__ import absolute_import from .skill_publication_response import SkillPublicationResponse -from .skill_publication_status import SkillPublicationStatus from .publish_skill_request import PublishSkillRequest +from .skill_publication_status import SkillPublicationStatus diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/publication/publish_skill_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/publication/publish_skill_request.py index 7af47e17..ba787979 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/publication/publish_skill_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/publication/publish_skill_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/publication/skill_publication_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/publication/skill_publication_response.py index 706fc73e..2626ea28 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/publication/skill_publication_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/publication/skill_publication_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.publication.skill_publication_status import SkillPublicationStatusV1 + from ask_smapi_model.v1.skill.publication.skill_publication_status import SkillPublicationStatus as SkillPublicationStatus_99f2cd80 class SkillPublicationResponse(object): @@ -47,7 +47,7 @@ class SkillPublicationResponse(object): supports_multiple_types = False def __init__(self, publishes_at_date=None, status=None): - # type: (Optional[datetime], Optional[SkillPublicationStatusV1]) -> None + # type: (Optional[datetime], Optional[SkillPublicationStatus_99f2cd80]) -> None """ :param publishes_at_date: Used to determine when the skill Publishing should start. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/publication/skill_publication_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/publication/skill_publication_status.py index b47e710b..52bfe536 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/publication/skill_publication_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/publication/skill_publication_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -40,7 +40,7 @@ class SkillPublicationStatus(Enum): SCHEDULED = "SCHEDULED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -56,7 +56,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SkillPublicationStatus): return False @@ -64,6 +64,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/publication_method.py b/ask-smapi-model/ask_smapi_model/v1/skill/publication_method.py index bc99a22d..4976568b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/publication_method.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/publication_method.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class PublicationMethod(Enum): AUTO_PUBLISHING = "AUTO_PUBLISHING" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PublicationMethod): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/publication_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/publication_status.py index 86da1ff3..b1df4c1b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/publication_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/publication_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -41,7 +41,7 @@ class PublicationStatus(Enum): REMOVED = "REMOVED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -57,7 +57,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, PublicationStatus): return False @@ -65,6 +65,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/reason.py b/ask-smapi-model/ask_smapi_model/v1/skill/reason.py index f9149b4f..c2b43403 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/reason.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/reason.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -41,7 +41,7 @@ class Reason(Enum): OTHER = "OTHER" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -57,7 +57,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Reason): return False @@ -65,6 +65,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/regional_ssl_certificate.py b/ask-smapi-model/ask_smapi_model/v1/skill/regional_ssl_certificate.py index d0c25730..2285bd20 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/regional_ssl_certificate.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/regional_ssl_certificate.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/resource_import_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/resource_import_status.py index c0ead5fc..13e98436 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/resource_import_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/resource_import_status.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.response_status import ResponseStatusV1 - from ask_smapi_model.v1.skill.action import ActionV1 - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 + from ask_smapi_model.v1.skill.response_status import ResponseStatus as ResponseStatus_95347977 + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 + from ask_smapi_model.v1.skill.action import Action as Action_fd8d3e88 class ResourceImportStatus(object): @@ -63,7 +63,7 @@ class ResourceImportStatus(object): supports_multiple_types = False def __init__(self, name=None, status=None, action=None, errors=None, warnings=None): - # type: (Optional[str], Optional[ResponseStatusV1], Optional[ActionV1], Optional[List[StandardizedErrorV1]], Optional[List[StandardizedErrorV1]]) -> None + # type: (Optional[str], Optional[ResponseStatus_95347977], Optional[Action_fd8d3e88], Optional[List[StandardizedError_f5106a89]], Optional[List[StandardizedError_f5106a89]]) -> None """Defines the structure for a resource deployment status. :param name: Resource name. eg. manifest, interactionModels.en_US and so on. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/resource_schema/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/resource_schema/__init__.py new file mode 100644 index 00000000..c1799adb --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/resource_schema/__init__.py @@ -0,0 +1,17 @@ +# 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. +# +from __future__ import absolute_import + +from .get_resource_schema_response import GetResourceSchemaResponse diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/audio_asset.py b/ask-smapi-model/ask_smapi_model/v1/skill/resource_schema/get_resource_schema_response.py similarity index 72% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/audio_asset.py rename to ask-smapi-model/ask_smapi_model/v1/skill/resource_schema/get_resource_schema_response.py index c9164a83..70459ecb 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/audio_asset.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/resource_schema/get_resource_schema_response.py @@ -21,44 +21,42 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class AudioAsset(object): +class GetResourceSchemaResponse(object): """ - Object containing information about downloading audio file - - :param download_url: S3 presigned download url for downloading the audio file - :type download_url: (optional) str - :param expiry_time: timestamp when the audio download url expire in ISO 8601 format - :type expiry_time: (optional) str + :param schema_location_url: S3 presigned URL to schema location. + :type schema_location_url: (optional) str + :param expiry_time: Timestamp when the schema location url expires in ISO 8601 format. + :type expiry_time: (optional) datetime """ deserialized_types = { - 'download_url': 'str', - 'expiry_time': 'str' + 'schema_location_url': 'str', + 'expiry_time': 'datetime' } # type: Dict attribute_map = { - 'download_url': 'downloadUrl', + 'schema_location_url': 'schemaLocationUrl', 'expiry_time': 'expiryTime' } # type: Dict supports_multiple_types = False - def __init__(self, download_url=None, expiry_time=None): - # type: (Optional[str], Optional[str]) -> None - """Object containing information about downloading audio file + def __init__(self, schema_location_url=None, expiry_time=None): + # type: (Optional[str], Optional[datetime]) -> None + """ - :param download_url: S3 presigned download url for downloading the audio file - :type download_url: (optional) str - :param expiry_time: timestamp when the audio download url expire in ISO 8601 format - :type expiry_time: (optional) str + :param schema_location_url: S3 presigned URL to schema location. + :type schema_location_url: (optional) str + :param expiry_time: Timestamp when the schema location url expires in ISO 8601 format. + :type expiry_time: (optional) datetime """ self.__discriminator_value = None # type: str - self.download_url = download_url + self.schema_location_url = schema_location_url self.expiry_time = expiry_time def to_dict(self): @@ -104,7 +102,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, AudioAsset): + if not isinstance(other, GetResourceSchemaResponse): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/resource_schema/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/resource_schema/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/response_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/response_status.py index 770cbe7d..99e7de6f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/response_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/response_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -41,7 +41,7 @@ class ResponseStatus(Enum): SKIPPED = "SKIPPED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -57,7 +57,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ResponseStatus): return False @@ -65,6 +65,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/rollback_request_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/rollback_request_status.py index 770b9dce..98ab6575 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/rollback_request_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/rollback_request_status.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.standardized_error import StandardizedErrorV1 - from ask_smapi_model.v1.skill.rollback_request_status_types import RollbackRequestStatusTypesV1 + from ask_smapi_model.v1.skill.rollback_request_status_types import RollbackRequestStatusTypes as RollbackRequestStatusTypes_721f9239 + from ask_smapi_model.v1.skill.standardized_error import StandardizedError as StandardizedError_f5106a89 class RollbackRequestStatus(object): @@ -62,7 +62,7 @@ class RollbackRequestStatus(object): supports_multiple_types = False def __init__(self, id=None, target_version=None, submission_time=None, status=None, errors=None): - # type: (Optional[str], Optional[str], Optional[datetime], Optional[RollbackRequestStatusTypesV1], Optional[List[StandardizedErrorV1]]) -> None + # type: (Optional[str], Optional[str], Optional[datetime], Optional[RollbackRequestStatusTypes_721f9239], Optional[List[StandardizedError_f5106a89]]) -> None """Rollback request for a skill :param id: rollback request id diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/rollback_request_status_types.py b/ask-smapi-model/ask_smapi_model/v1/skill/rollback_request_status_types.py index 48928bce..0a330f96 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/rollback_request_status_types.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/rollback_request_status_types.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class RollbackRequestStatusTypes(Enum): SUCCEEDED = "SUCCEEDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, RollbackRequestStatusTypes): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/__init__.py index 6d117a7e..7db54ebd 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/__init__.py @@ -14,18 +14,20 @@ # from __future__ import absolute_import +from .alexa_execution_info import AlexaExecutionInfo +from .invocation import Invocation +from .invocation_response import InvocationResponse +from .session_mode import SessionMode from .alexa_response_content import AlexaResponseContent -from .simulations_api_request import SimulationsApiRequest -from .input import Input +from .alexa_response import AlexaResponse +from .invocation_request import InvocationRequest from .simulations_api_response import SimulationsApiResponse -from .simulation_result import SimulationResult +from .simulation import Simulation from .simulations_api_response_status import SimulationsApiResponseStatus -from .alexa_execution_info import AlexaExecutionInfo -from .device import Device -from .invocation_request import InvocationRequest -from .alexa_response import AlexaResponse -from .session import Session +from .input import Input +from .simulation_result import SimulationResult +from .simulations_api_request import SimulationsApiRequest from .metrics import Metrics -from .invocation_response import InvocationResponse -from .invocation import Invocation -from .session_mode import SessionMode +from .simulation_type import SimulationType +from .session import Session +from .device import Device diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_execution_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_execution_info.py index b1d2626d..a7bc85d7 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_execution_info.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_execution_info.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.simulations.alexa_response import AlexaResponseV1 + from ask_smapi_model.v1.skill.simulations.alexa_response import AlexaResponse as AlexaResponse_d3763fbb class AlexaExecutionInfo(object): @@ -43,7 +43,7 @@ class AlexaExecutionInfo(object): supports_multiple_types = False def __init__(self, alexa_responses=None): - # type: (Optional[List[AlexaResponseV1]]) -> None + # type: (Optional[List[AlexaResponse_d3763fbb]]) -> None """ :param alexa_responses: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_response.py index 78557675..d88834a2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.simulations.alexa_response_content import AlexaResponseContentV1 + from ask_smapi_model.v1.skill.simulations.alexa_response_content import AlexaResponseContent as AlexaResponseContent_2bb01644 class AlexaResponse(object): @@ -47,7 +47,7 @@ class AlexaResponse(object): supports_multiple_types = False def __init__(self, object_type=None, content=None): - # type: (Optional[str], Optional[AlexaResponseContentV1]) -> None + # type: (Optional[str], Optional[AlexaResponseContent_2bb01644]) -> None """ :param object_type: The type of Alexa response diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_response_content.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_response_content.py index 9634a8c2..370ff904 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_response_content.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_response_content.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/device.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/device.py index 100e8fc7..1f500a83 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/device.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/device.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/input.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/input.py index b0c07538..fd3d4c50 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/input.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/input.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation.py index 6f7ebc94..8cdfa294 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.simulations.metrics import MetricsV1 - from ask_smapi_model.v1.skill.simulations.invocation_request import InvocationRequestV1 - from ask_smapi_model.v1.skill.simulations.invocation_response import InvocationResponseV1 + from ask_smapi_model.v1.skill.simulations.metrics import Metrics as Metrics_7045efd0 + from ask_smapi_model.v1.skill.simulations.invocation_request import InvocationRequest as InvocationRequest_325188d9 + from ask_smapi_model.v1.skill.simulations.invocation_response import InvocationResponse as InvocationResponse_9e900857 class Invocation(object): @@ -53,7 +53,7 @@ class Invocation(object): supports_multiple_types = False def __init__(self, invocation_request=None, invocation_response=None, metrics=None): - # type: (Optional[InvocationRequestV1], Optional[InvocationResponseV1], Optional[MetricsV1]) -> None + # type: (Optional[InvocationRequest_325188d9], Optional[InvocationResponse_9e900857], Optional[Metrics_7045efd0]) -> None """ :param invocation_request: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_request.py index 28dbdce0..183964ed 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_response.py index b84ba5f6..8345e81b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/metrics.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/metrics.py index b474c621..1dd68344 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/metrics.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/metrics.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/session.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/session.py index ecc3a336..8f96546e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/session.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/session.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.simulations.session_mode import SessionModeV1 + from ask_smapi_model.v1.skill.simulations.session_mode import SessionMode as SessionMode_8a5f999f class Session(object): @@ -45,7 +45,7 @@ class Session(object): supports_multiple_types = False def __init__(self, mode=None): - # type: (Optional[SessionModeV1]) -> None + # type: (Optional[SessionMode_8a5f999f]) -> None """Session settings for running current simulation. :param mode: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/session_mode.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/session_mode.py index 9c8d1338..1e131247 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/session_mode.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/session_mode.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class SessionMode(Enum): FORCE_NEW_SESSION = "FORCE_NEW_SESSION" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SessionMode): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulation.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulation.py new file mode 100644 index 00000000..275a84d7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulation.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.skill.simulations.simulation_type import SimulationType as SimulationType_e617dca5 + + +class Simulation(object): + """ + Simulation settings for the current simulation request. + + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.simulations.simulation_type.SimulationType + + """ + deserialized_types = { + 'object_type': 'ask_smapi_model.v1.skill.simulations.simulation_type.SimulationType' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None): + # type: (Optional[SimulationType_e617dca5]) -> None + """Simulation settings for the current simulation request. + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.simulations.simulation_type.SimulationType + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + + 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, Simulation): + 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-smapi-model/ask_smapi_model/v1/skill/simulations/simulation_result.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulation_result.py index 6be7bd4c..f4190be2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulation_result.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulation_result.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.simulations.alexa_execution_info import AlexaExecutionInfoV1 - from ask_smapi_model.v1.skill.simulations.invocation import InvocationV1 - from ask_smapi_model.v1.error import ErrorV1 + from ask_smapi_model.v1.skill.simulations.invocation import Invocation as Invocation_e7f6d826 + from ask_smapi_model.v1.skill.simulations.alexa_execution_info import AlexaExecutionInfo as AlexaExecutionInfo_84a001f8 + from ask_smapi_model.v1.error import Error as Error_fbe913d9 class SimulationResult(object): @@ -53,7 +53,7 @@ class SimulationResult(object): supports_multiple_types = False def __init__(self, alexa_execution_info=None, skill_execution_info=None, error=None): - # type: (Optional[AlexaExecutionInfoV1], Optional[InvocationV1], Optional[ErrorV1]) -> None + # type: (Optional[AlexaExecutionInfo_84a001f8], Optional[Invocation_e7f6d826], Optional[Error_fbe913d9]) -> None """ :param alexa_execution_info: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulation_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulation_type.py new file mode 100644 index 00000000..cb989586 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulation_type.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SimulationType(Enum): + """ + String indicating the type of simulation request. Possible values are \"DEFAULT\" and \"NFI_ISOLATED_SIMULATION\". \"NFI_ISOLATED_SIMULATION\" is used to test the NFI(Name Free Interaction) enabled skills in isolation. This field is reserved for testing Name Free Interactions(NFI). Skills that are eligible to add NFI can only use this field. To learn more, visit https://developer.amazon.com/en-US/docs/alexa/custom-skills/understand-name-free-interaction-for-custom-skills.html + + + + Allowed enum values: [DEFAULT, NFI_ISOLATED_SIMULATION] + """ + DEFAULT = "DEFAULT" + NFI_ISOLATED_SIMULATION = "NFI_ISOLATED_SIMULATION" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SimulationType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_request.py index 8f6fd918..076b74ef 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_request.py @@ -21,11 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.simulations.session import SessionV1 - from ask_smapi_model.v1.skill.simulations.input import InputV1 - from ask_smapi_model.v1.skill.simulations.device import DeviceV1 + from ask_smapi_model.v1.skill.simulations.session import Session as Session_700bf076 + from ask_smapi_model.v1.skill.simulations.device import Device as Device_88be9466 + from ask_smapi_model.v1.skill.simulations.input import Input as Input_7307d1de + from ask_smapi_model.v1.skill.simulations.simulation import Simulation as Simulation_618c97c6 class SimulationsApiRequest(object): @@ -37,23 +38,27 @@ class SimulationsApiRequest(object): :type device: (optional) ask_smapi_model.v1.skill.simulations.device.Device :param session: :type session: (optional) ask_smapi_model.v1.skill.simulations.session.Session + :param simulation: + :type simulation: (optional) ask_smapi_model.v1.skill.simulations.simulation.Simulation """ deserialized_types = { 'input': 'ask_smapi_model.v1.skill.simulations.input.Input', 'device': 'ask_smapi_model.v1.skill.simulations.device.Device', - 'session': 'ask_smapi_model.v1.skill.simulations.session.Session' + 'session': 'ask_smapi_model.v1.skill.simulations.session.Session', + 'simulation': 'ask_smapi_model.v1.skill.simulations.simulation.Simulation' } # type: Dict attribute_map = { 'input': 'input', 'device': 'device', - 'session': 'session' + 'session': 'session', + 'simulation': 'simulation' } # type: Dict supports_multiple_types = False - def __init__(self, input=None, device=None, session=None): - # type: (Optional[InputV1], Optional[DeviceV1], Optional[SessionV1]) -> None + def __init__(self, input=None, device=None, session=None, simulation=None): + # type: (Optional[Input_7307d1de], Optional[Device_88be9466], Optional[Session_700bf076], Optional[Simulation_618c97c6]) -> None """ :param input: @@ -62,12 +67,15 @@ def __init__(self, input=None, device=None, session=None): :type device: (optional) ask_smapi_model.v1.skill.simulations.device.Device :param session: :type session: (optional) ask_smapi_model.v1.skill.simulations.session.Session + :param simulation: + :type simulation: (optional) ask_smapi_model.v1.skill.simulations.simulation.Simulation """ self.__discriminator_value = None # type: str self.input = input self.device = device self.session = session + self.simulation = simulation def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response.py index 1e7f1390..484ffcc8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.simulations.simulations_api_response_status import SimulationsApiResponseStatusV1 - from ask_smapi_model.v1.skill.simulations.simulation_result import SimulationResultV1 + from ask_smapi_model.v1.skill.simulations.simulation_result import SimulationResult as SimulationResult_1c241445 + from ask_smapi_model.v1.skill.simulations.simulations_api_response_status import SimulationsApiResponseStatus as SimulationsApiResponseStatus_e76dde3f class SimulationsApiResponse(object): @@ -52,7 +52,7 @@ class SimulationsApiResponse(object): supports_multiple_types = False def __init__(self, id=None, status=None, result=None): - # type: (Optional[str], Optional[SimulationsApiResponseStatusV1], Optional[SimulationResultV1]) -> None + # type: (Optional[str], Optional[SimulationsApiResponseStatus_e76dde3f], Optional[SimulationResult_1c241445]) -> None """ :param id: Id of the simulation resource. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response_status.py index fadaf84e..2ab1c693 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class SimulationsApiResponseStatus(Enum): FAILED = "FAILED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SimulationsApiResponseStatus): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/skill_credentials.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_credentials.py index 73da56bb..0be4ec5f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/skill_credentials.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_credentials.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.skill_messaging_credentials import SkillMessagingCredentialsV1 + from ask_smapi_model.v1.skill.skill_messaging_credentials import SkillMessagingCredentials as SkillMessagingCredentials_a95ce148 class SkillCredentials(object): @@ -45,7 +45,7 @@ class SkillCredentials(object): supports_multiple_types = False def __init__(self, skill_messaging_credentials=None): - # type: (Optional[SkillMessagingCredentialsV1]) -> None + # type: (Optional[SkillMessagingCredentials_a95ce148]) -> None """Structure for skill credentials response. :param skill_messaging_credentials: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/skill_interaction_model_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_interaction_model_status.py index 70515e7d..ab7d6f7d 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/skill_interaction_model_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_interaction_model_status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.interaction_model_last_update_request import InteractionModelLastUpdateRequestV1 + from ask_smapi_model.v1.skill.interaction_model_last_update_request import InteractionModelLastUpdateRequest as InteractionModelLastUpdateRequest_f980bda4 class SkillInteractionModelStatus(object): @@ -53,7 +53,7 @@ class SkillInteractionModelStatus(object): supports_multiple_types = False def __init__(self, last_update_request=None, e_tag=None, version=None): - # type: (Optional[InteractionModelLastUpdateRequestV1], Optional[str], Optional[str]) -> None + # type: (Optional[InteractionModelLastUpdateRequest_f980bda4], Optional[str], Optional[str]) -> None """Defines the structure for interaction model build status. :param last_update_request: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/skill_messaging_credentials.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_messaging_credentials.py index 3c9d1f32..c37c1802 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/skill_messaging_credentials.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_messaging_credentials.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/skill_resources_enum.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_resources_enum.py index 3e1c2a09..377f8a8b 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/skill_resources_enum.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_resources_enum.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class SkillResourcesEnum(Enum): hostedSkillProvisioning = "hostedSkillProvisioning" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SkillResourcesEnum): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/skill_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_status.py index 45bf332e..6a636568 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/skill_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_status.py @@ -21,12 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.manifest_status import ManifestStatusV1 - from ask_smapi_model.v1.skill.hosted_skill_deployment_status import HostedSkillDeploymentStatusV1 - from ask_smapi_model.v1.skill.skill_interaction_model_status import SkillInteractionModelStatusV1 - from ask_smapi_model.v1.skill.hosted_skill_provisioning_status import HostedSkillProvisioningStatusV1 + from ask_smapi_model.v1.skill.manifest_status import ManifestStatus as ManifestStatus_3a40bc53 + from ask_smapi_model.v1.skill.hosted_skill_deployment_status import HostedSkillDeploymentStatus as HostedSkillDeploymentStatus_501287f + from ask_smapi_model.v1.skill.hosted_skill_provisioning_status import HostedSkillProvisioningStatus as HostedSkillProvisioningStatus_2c3cd17f + from ask_smapi_model.v1.skill.skill_interaction_model_status import SkillInteractionModelStatus as SkillInteractionModelStatus_6331b4f5 class SkillStatus(object): @@ -60,7 +60,7 @@ class SkillStatus(object): supports_multiple_types = False def __init__(self, manifest=None, interaction_model=None, hosted_skill_deployment=None, hosted_skill_provisioning=None): - # type: (Optional[ManifestStatusV1], Optional[Dict[str, SkillInteractionModelStatusV1]], Optional[HostedSkillDeploymentStatusV1], Optional[HostedSkillProvisioningStatusV1]) -> None + # type: (Optional[ManifestStatus_3a40bc53], Optional[Dict[str, SkillInteractionModelStatus_6331b4f5]], Optional[HostedSkillDeploymentStatus_501287f], Optional[HostedSkillProvisioningStatus_2c3cd17f]) -> None """Defines the structure for skill status response. :param manifest: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary.py index 542a8252..fff6f0bc 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary.py @@ -21,11 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.links import LinksV1 - from ask_smapi_model.v1.skill.publication_status import PublicationStatusV1 - from ask_smapi_model.v1.skill.skill_summary_apis import SkillSummaryApisV1 + from ask_smapi_model.v1.stage_v2_type import StageV2Type as StageV2Type_72e74959 + from ask_smapi_model.v1.skill.skill_summary_apis import SkillSummaryApis as SkillSummaryApis_dd99d3d6 + from ask_smapi_model.v1.links import Links as Links_bc43467b + from ask_smapi_model.v1.skill.publication_status import PublicationStatus as PublicationStatus_faee621b class SkillSummary(object): @@ -35,6 +36,8 @@ class SkillSummary(object): :param skill_id: :type skill_id: (optional) str + :param stage: + :type stage: (optional) ask_smapi_model.v1.stage_v2_type.StageV2Type :param apis: List of APIs currently implemented by the skill. :type apis: (optional) list[ask_smapi_model.v1.skill.skill_summary_apis.SkillSummaryApis] :param publication_status: @@ -51,6 +54,7 @@ class SkillSummary(object): """ deserialized_types = { 'skill_id': 'str', + 'stage': 'ask_smapi_model.v1.stage_v2_type.StageV2Type', 'apis': 'list[ask_smapi_model.v1.skill.skill_summary_apis.SkillSummaryApis]', 'publication_status': 'ask_smapi_model.v1.skill.publication_status.PublicationStatus', 'last_updated': 'datetime', @@ -61,6 +65,7 @@ class SkillSummary(object): attribute_map = { 'skill_id': 'skillId', + 'stage': 'stage', 'apis': 'apis', 'publication_status': 'publicationStatus', 'last_updated': 'lastUpdated', @@ -70,12 +75,14 @@ class SkillSummary(object): } # type: Dict supports_multiple_types = False - def __init__(self, skill_id=None, apis=None, publication_status=None, last_updated=None, name_by_locale=None, asin=None, links=None): - # type: (Optional[str], Optional[List[SkillSummaryApisV1]], Optional[PublicationStatusV1], Optional[datetime], Optional[Dict[str, object]], Optional[str], Optional[LinksV1]) -> None + def __init__(self, skill_id=None, stage=None, apis=None, publication_status=None, last_updated=None, name_by_locale=None, asin=None, links=None): + # type: (Optional[str], Optional[StageV2Type_72e74959], Optional[List[SkillSummaryApis_dd99d3d6]], Optional[PublicationStatus_faee621b], Optional[datetime], Optional[Dict[str, object]], Optional[str], Optional[Links_bc43467b]) -> None """Information about the skills. :param skill_id: :type skill_id: (optional) str + :param stage: + :type stage: (optional) ask_smapi_model.v1.stage_v2_type.StageV2Type :param apis: List of APIs currently implemented by the skill. :type apis: (optional) list[ask_smapi_model.v1.skill.skill_summary_apis.SkillSummaryApis] :param publication_status: @@ -92,6 +99,7 @@ def __init__(self, skill_id=None, apis=None, publication_status=None, last_updat self.__discriminator_value = None # type: str self.skill_id = skill_id + self.stage = stage self.apis = apis self.publication_status = publication_status self.last_updated = last_updated diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary_apis.py index 8334f799..807e3f17 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary_apis.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary_apis.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -29,7 +29,7 @@ class SkillSummaryApis(Enum): """ - Allowed enum values: [custom, smartHome, flashBriefing, video, music, householdList, health, alexaForBusiness] + Allowed enum values: [custom, smartHome, flashBriefing, video, music, householdList, health, alexaForBusiness, demandResponse] """ custom = "custom" smartHome = "smartHome" @@ -39,9 +39,10 @@ class SkillSummaryApis(Enum): householdList = "householdList" health = "health" alexaForBusiness = "alexaForBusiness" + demandResponse = "demandResponse" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -57,7 +58,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SkillSummaryApis): return False @@ -65,6 +66,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/skill_version.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_version.py index 124f89b5..9f9460d1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/skill_version.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_version.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.version_submission import VersionSubmissionV1 + from ask_smapi_model.v1.skill.version_submission import VersionSubmission as VersionSubmission_65be74f class SkillVersion(object): @@ -57,7 +57,7 @@ class SkillVersion(object): supports_multiple_types = False def __init__(self, version=None, message=None, creation_time=None, submissions=None): - # type: (Optional[str], Optional[str], Optional[datetime], Optional[List[VersionSubmissionV1]]) -> None + # type: (Optional[str], Optional[str], Optional[datetime], Optional[List[VersionSubmission_65be74f]]) -> None """Information about the skill version :param version: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/ssl_certificate_payload.py b/ask-smapi-model/ask_smapi_model/v1/skill/ssl_certificate_payload.py index 38650a53..25307877 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/ssl_certificate_payload.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/ssl_certificate_payload.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.regional_ssl_certificate import RegionalSSLCertificateV1 + from ask_smapi_model.v1.skill.regional_ssl_certificate import RegionalSSLCertificate as RegionalSSLCertificate_6484866e class SSLCertificatePayload(object): @@ -47,7 +47,7 @@ class SSLCertificatePayload(object): supports_multiple_types = False def __init__(self, ssl_certificate=None, regions=None): - # type: (Optional[str], Optional[Dict[str, RegionalSSLCertificateV1]]) -> None + # type: (Optional[str], Optional[Dict[str, RegionalSSLCertificate_6484866e]]) -> None """ :param ssl_certificate: The default ssl certificate for the skill. If a request is made for a region without an explicit ssl certificate, this certificate will be used. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/standardized_error.py b/ask-smapi-model/ask_smapi_model/v1/skill/standardized_error.py index d37268d4..f332dcae 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/standardized_error.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/standardized_error.py @@ -22,9 +22,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.validation_details import ValidationDetailsV1 + from ask_smapi_model.v1.skill.validation_details import ValidationDetails as ValidationDetails_f05a8bbd class StandardizedError(Error): @@ -54,7 +54,7 @@ class StandardizedError(Error): supports_multiple_types = False def __init__(self, validation_details=None, code=None, message=None): - # type: (Optional[ValidationDetailsV1], Optional[str], Optional[str]) -> None + # type: (Optional[ValidationDetails_f05a8bbd], Optional[str], Optional[str]) -> None """Standardized structure which wraps machine parsable and human readable information about an error. :param validation_details: Standardized, machine readable structure that wraps all the information about a specific occurrence of an error of the type specified by the code. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/status.py b/ask-smapi-model/ask_smapi_model/v1/skill/status.py index 676d6ea2..7910a6cc 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class Status(Enum): SUCCEEDED = "SUCCEEDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Status): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/submit_skill_for_certification_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/submit_skill_for_certification_request.py index 8daa38e6..f3efd114 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/submit_skill_for_certification_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/submit_skill_for_certification_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.publication_method import PublicationMethodV1 + from ask_smapi_model.v1.skill.publication_method import PublicationMethod as PublicationMethod_98efa639 class SubmitSkillForCertificationRequest(object): @@ -47,7 +47,7 @@ class SubmitSkillForCertificationRequest(object): supports_multiple_types = False def __init__(self, publication_method=None, version_message=None): - # type: (Optional[PublicationMethodV1], Optional[str]) -> None + # type: (Optional[PublicationMethod_98efa639], Optional[str]) -> None """ :param publication_method: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/update_skill_with_package_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/update_skill_with_package_request.py index eab94b70..2a8ed61f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/update_skill_with_package_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/update_skill_with_package_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/upload_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/upload_response.py index ff736586..943ab426 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/upload_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/upload_response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -32,7 +32,7 @@ class UploadResponse(object): :param upload_url: The upload URL to upload a skill package. :type upload_url: (optional) str - :param expires_at: + :param expires_at: The expiration time of the URL :type expires_at: (optional) datetime """ @@ -53,7 +53,7 @@ def __init__(self, upload_url=None, expires_at=None): :param upload_url: The upload URL to upload a skill package. :type upload_url: (optional) str - :param expires_at: + :param expires_at: The expiration time of the URL :type expires_at: (optional) datetime """ self.__discriminator_value = None # type: str diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validation_data_types.py b/ask-smapi-model/ask_smapi_model/v1/skill/validation_data_types.py index adbbc8b9..2167d56f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validation_data_types.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validation_data_types.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class ValidationDataTypes(Enum): null = "null" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ValidationDataTypes): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validation_details.py b/ask-smapi-model/ask_smapi_model/v1/skill/validation_details.py index 92b42f30..0d4c058e 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validation_details.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validation_details.py @@ -21,16 +21,16 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.image_attributes import ImageAttributesV1 - from ask_smapi_model.v1.skill.agreement_type import AgreementTypeV1 - from ask_smapi_model.v1.skill.instance import InstanceV1 - from ask_smapi_model.v1.skill.format import FormatV1 - from ask_smapi_model.v1.skill.validation_feature import ValidationFeatureV1 - from ask_smapi_model.v1.skill.validation_failure_reason import ValidationFailureReasonV1 - from ask_smapi_model.v1.skill.validation_data_types import ValidationDataTypesV1 - from ask_smapi_model.v1.skill.validation_endpoint import ValidationEndpointV1 + from ask_smapi_model.v1.skill.image_attributes import ImageAttributes as ImageAttributes_c561cc05 + from ask_smapi_model.v1.skill.validation_failure_reason import ValidationFailureReason as ValidationFailureReason_56689f00 + from ask_smapi_model.v1.skill.validation_data_types import ValidationDataTypes as ValidationDataTypes_30c76c0c + from ask_smapi_model.v1.skill.validation_endpoint import ValidationEndpoint as ValidationEndpoint_86396347 + from ask_smapi_model.v1.skill.instance import Instance as Instance_7ed45668 + from ask_smapi_model.v1.skill.agreement_type import AgreementType as AgreementType_25fa482b + from ask_smapi_model.v1.skill.validation_feature import ValidationFeature as ValidationFeature_a1685825 + from ask_smapi_model.v1.skill.format import Format as Format_685f368 class ValidationDetails(object): @@ -144,7 +144,7 @@ class ValidationDetails(object): supports_multiple_types = False def __init__(self, actual_image_attributes=None, actual_number_of_items=None, actual_string_length=None, allowed_content_types=None, allowed_data_types=None, allowed_image_attributes=None, conflicting_instance=None, expected_format=None, expected_instance=None, expected_regex_pattern=None, agreement_type=None, feature=None, inconsistent_endpoint=None, minimum_integer_value=None, minimum_number_of_items=None, minimum_string_length=None, maximum_integer_value=None, maximum_number_of_items=None, maximum_string_length=None, original_endpoint=None, original_instance=None, reason=None, required_property=None, unexpected_property=None): - # type: (Optional[ImageAttributesV1], Optional[int], Optional[int], Optional[List[object]], Optional[List[ValidationDataTypesV1]], Optional[List[ImageAttributesV1]], Optional[InstanceV1], Optional[FormatV1], Optional[InstanceV1], Optional[str], Optional[AgreementTypeV1], Optional[ValidationFeatureV1], Optional[ValidationEndpointV1], Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[ValidationEndpointV1], Optional[InstanceV1], Optional[ValidationFailureReasonV1], Optional[str], Optional[str]) -> None + # type: (Optional[ImageAttributes_c561cc05], Optional[int], Optional[int], Optional[List[object]], Optional[List[ValidationDataTypes_30c76c0c]], Optional[List[ImageAttributes_c561cc05]], Optional[Instance_7ed45668], Optional[Format_685f368], Optional[Instance_7ed45668], Optional[str], Optional[AgreementType_25fa482b], Optional[ValidationFeature_a1685825], Optional[ValidationEndpoint_86396347], Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[ValidationEndpoint_86396347], Optional[Instance_7ed45668], Optional[ValidationFailureReason_56689f00], Optional[str], Optional[str]) -> None """Standardized, machine readable structure that wraps all the information about a specific occurrence of an error of the type specified by the code. :param actual_image_attributes: Set of properties of the image provided by the customer. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validation_endpoint.py b/ask-smapi-model/ask_smapi_model/v1/skill/validation_endpoint.py index 0f96a767..97cff8c1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validation_endpoint.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validation_endpoint.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validation_failure_reason.py b/ask-smapi-model/ask_smapi_model/v1/skill/validation_failure_reason.py index 1e5f9a65..803271eb 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validation_failure_reason.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validation_failure_reason.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.validation_failure_type import ValidationFailureTypeV1 + from ask_smapi_model.v1.skill.validation_failure_type import ValidationFailureType as ValidationFailureType_f9b43cac class ValidationFailureReason(object): @@ -45,7 +45,7 @@ class ValidationFailureReason(object): supports_multiple_types = False def __init__(self, object_type=None): - # type: (Optional[ValidationFailureTypeV1]) -> None + # type: (Optional[ValidationFailureType_f9b43cac]) -> None """Object representing what is wrong in the request. :param object_type: Enum for type of validation failure in the request. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validation_failure_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/validation_failure_type.py index 6359cba6..c1256d5f 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validation_failure_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validation_failure_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -47,7 +47,7 @@ class ValidationFailureType(Enum): MISSING_RESOURCE_PROPERTY = "MISSING_RESOURCE_PROPERTY" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -63,7 +63,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ValidationFailureType): return False @@ -71,6 +71,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validation_feature.py b/ask-smapi-model/ask_smapi_model/v1/skill/validation_feature.py index 34ccb5c0..79641a00 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validation_feature.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validation_feature.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validations/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/__init__.py index 315184b2..2ef4731c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validations/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/__init__.py @@ -14,10 +14,10 @@ # from __future__ import absolute_import -from .validations_api_response_result import ValidationsApiResponseResult -from .validations_api_request import ValidationsApiRequest -from .validations_api_response_status import ValidationsApiResponseStatus from .response_validation_importance import ResponseValidationImportance +from .validations_api_response_status import ValidationsApiResponseStatus from .response_validation_status import ResponseValidationStatus from .validations_api_response import ValidationsApiResponse from .response_validation import ResponseValidation +from .validations_api_response_result import ValidationsApiResponseResult +from .validations_api_request import ValidationsApiRequest diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation.py index 7282e0de..14098bf1 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.validations.response_validation_status import ResponseValidationStatusV1 - from ask_smapi_model.v1.skill.validations.response_validation_importance import ResponseValidationImportanceV1 + from ask_smapi_model.v1.skill.validations.response_validation_importance import ResponseValidationImportance as ResponseValidationImportance_c1ef7626 + from ask_smapi_model.v1.skill.validations.response_validation_status import ResponseValidationStatus as ResponseValidationStatus_b15167e6 class ResponseValidation(object): @@ -64,7 +64,7 @@ class ResponseValidation(object): supports_multiple_types = False def __init__(self, title=None, description=None, category=None, locale=None, importance=None, status=None): - # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[ResponseValidationImportanceV1], Optional[ResponseValidationStatusV1]) -> None + # type: (Optional[str], Optional[str], Optional[str], Optional[str], Optional[ResponseValidationImportance_c1ef7626], Optional[ResponseValidationStatus_b15167e6]) -> None """ :param title: Short, human readable title of the validation performed. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_importance.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_importance.py index 41c2c6fb..f3ab12e9 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_importance.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_importance.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class ResponseValidationImportance(Enum): RECOMMENDED = "RECOMMENDED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ResponseValidationImportance): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_status.py index a7130eb2..871dea3c 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class ResponseValidationStatus(Enum): FAILED = "FAILED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ResponseValidationStatus): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_request.py index 630129f8..765530a0 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response.py index 0a1b53be..6bb7e9cf 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.validations.validations_api_response_result import ValidationsApiResponseResultV1 - from ask_smapi_model.v1.skill.validations.validations_api_response_status import ValidationsApiResponseStatusV1 + from ask_smapi_model.v1.skill.validations.validations_api_response_status import ValidationsApiResponseStatus as ValidationsApiResponseStatus_f5b7115 + from ask_smapi_model.v1.skill.validations.validations_api_response_result import ValidationsApiResponseResult as ValidationsApiResponseResult_b6ff44f5 class ValidationsApiResponse(object): @@ -52,7 +52,7 @@ class ValidationsApiResponse(object): supports_multiple_types = False def __init__(self, id=None, status=None, result=None): - # type: (Optional[str], Optional[ValidationsApiResponseStatusV1], Optional[ValidationsApiResponseResultV1]) -> None + # type: (Optional[str], Optional[ValidationsApiResponseStatus_f5b7115], Optional[ValidationsApiResponseResult_b6ff44f5]) -> None """ :param id: Id of the validation resource. diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_result.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_result.py index 964e7e4f..f1ecad35 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_result.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_result.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.validations.response_validation import ResponseValidationV1 - from ask_smapi_model.v1.error import ErrorV1 + from ask_smapi_model.v1.error import Error as Error_fbe913d9 + from ask_smapi_model.v1.skill.validations.response_validation import ResponseValidation as ResponseValidation_30c99beb class ValidationsApiResponseResult(object): @@ -48,7 +48,7 @@ class ValidationsApiResponseResult(object): supports_multiple_types = False def __init__(self, validations=None, error=None): - # type: (Optional[List[ResponseValidationV1]], Optional[ErrorV1]) -> None + # type: (Optional[List[ResponseValidation_30c99beb]], Optional[Error_fbe913d9]) -> None """ :param validations: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_status.py index a6b1a792..1e4c76e6 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ValidationsApiResponseStatus(Enum): FAILED = "FAILED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ValidationsApiResponseStatus): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/version_submission.py b/ask-smapi-model/ask_smapi_model/v1/skill/version_submission.py index aea3a0de..55bd7182 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/version_submission.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/version_submission.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.version_submission_status import VersionSubmissionStatusV1 + from ask_smapi_model.v1.skill.version_submission_status import VersionSubmissionStatus as VersionSubmissionStatus_c5134e60 class VersionSubmission(object): @@ -49,7 +49,7 @@ class VersionSubmission(object): supports_multiple_types = False def __init__(self, status=None, submission_time=None): - # type: (Optional[VersionSubmissionStatusV1], Optional[datetime]) -> None + # type: (Optional[VersionSubmissionStatus_c5134e60], Optional[datetime]) -> None """Submission for a skill version :param status: diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/version_submission_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/version_submission_status.py index 1467d709..ca659a79 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/version_submission_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/version_submission_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -42,7 +42,7 @@ class VersionSubmissionStatus(Enum): WITHDRAWN_FROM_CERTIFICATION = "WITHDRAWN_FROM_CERTIFICATION" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -58,7 +58,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, VersionSubmissionStatus): return False @@ -66,6 +66,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/withdraw_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/withdraw_request.py index d7b24676..df39ded8 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/withdraw_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/skill/withdraw_request.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.skill.reason import ReasonV1 + from ask_smapi_model.v1.skill.reason import Reason as Reason_7e9f32c8 class WithdrawRequest(object): @@ -49,7 +49,7 @@ class WithdrawRequest(object): supports_multiple_types = False def __init__(self, reason=None, message=None): - # type: (Optional[ReasonV1], Optional[str]) -> None + # type: (Optional[Reason_7e9f32c8], Optional[str]) -> None """The payload for the withdraw operation. :param reason: diff --git a/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/__init__.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/__init__.py new file mode 100644 index 00000000..d3387b06 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/__init__.py @@ -0,0 +1,39 @@ +# 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. +# +from __future__ import absolute_import + +from .sh_capability_error import SHCapabilityError +from .list_sh_capability_evaluations_response import ListSHCapabilityEvaluationsResponse +from .sh_capability_directive import SHCapabilityDirective +from .get_sh_capability_evaluation_response import GetSHCapabilityEvaluationResponse +from .pagination_context import PaginationContext +from .list_sh_test_plan_item import ListSHTestPlanItem +from .test_case_result_status import TestCaseResultStatus +from .evaluate_sh_capability_response import EvaluateSHCapabilityResponse +from .sh_capability_response import SHCapabilityResponse +from .capability_test_plan import CapabilityTestPlan +from .sh_capability_state import SHCapabilityState +from .evaluation_object import EvaluationObject +from .get_sh_capability_evaluation_results_response import GetSHCapabilityEvaluationResultsResponse +from .sh_evaluation_results_metric import SHEvaluationResultsMetric +from .sh_capability_error_code import SHCapabilityErrorCode +from .endpoint import Endpoint +from .pagination_context_token import PaginationContextToken +from .evaluation_entity_status import EvaluationEntityStatus +from .paged_response import PagedResponse +from .test_case_result import TestCaseResult +from .stage import Stage +from .evaluate_sh_capability_request import EvaluateSHCapabilityRequest +from .list_sh_capability_test_plans_response import ListSHCapabilityTestPlansResponse diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/create_asr_annotation_set_response.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/capability_test_plan.py similarity index 91% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/create_asr_annotation_set_response.py rename to ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/capability_test_plan.py index 0c3e3711..ad636974 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/create_asr_annotation_set_response.py +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/capability_test_plan.py @@ -21,14 +21,14 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class CreateAsrAnnotationSetResponse(object): +class CapabilityTestPlan(object): """ - :param id: ID used to retrieve the ASR annotation set. + :param id: :type id: (optional) str """ @@ -45,7 +45,7 @@ def __init__(self, id=None): # type: (Optional[str]) -> None """ - :param id: ID used to retrieve the ASR annotation set. + :param id: :type id: (optional) str """ self.__discriminator_value = None # type: str @@ -95,7 +95,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, CreateAsrAnnotationSetResponse): + if not isinstance(other, CapabilityTestPlan): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/endpoint.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/endpoint.py new file mode 100644 index 00000000..2017eb6e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/endpoint.py @@ -0,0 +1,106 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class Endpoint(object): + """ + + :param endpoint_id: + :type endpoint_id: (optional) str + + """ + deserialized_types = { + 'endpoint_id': 'str' + } # type: Dict + + attribute_map = { + 'endpoint_id': 'endpointId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, endpoint_id=None): + # type: (Optional[str]) -> None + """ + + :param endpoint_id: + :type endpoint_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.endpoint_id = endpoint_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, Endpoint): + 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-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluate_sh_capability_request.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluate_sh_capability_request.py new file mode 100644 index 00000000..2e9c520a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluate_sh_capability_request.py @@ -0,0 +1,123 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.smart_home_evaluation.capability_test_plan import CapabilityTestPlan as CapabilityTestPlan_7d93b401 + from ask_smapi_model.v1.smart_home_evaluation.stage import Stage as Stage_5c1d183d + from ask_smapi_model.v1.smart_home_evaluation.endpoint import Endpoint as Endpoint_912f62fd + + +class EvaluateSHCapabilityRequest(object): + """ + + :param capability_test_plan: + :type capability_test_plan: (optional) ask_smapi_model.v1.smart_home_evaluation.capability_test_plan.CapabilityTestPlan + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.smart_home_evaluation.endpoint.Endpoint + :param stage: + :type stage: (optional) ask_smapi_model.v1.smart_home_evaluation.stage.Stage + + """ + deserialized_types = { + 'capability_test_plan': 'ask_smapi_model.v1.smart_home_evaluation.capability_test_plan.CapabilityTestPlan', + 'endpoint': 'ask_smapi_model.v1.smart_home_evaluation.endpoint.Endpoint', + 'stage': 'ask_smapi_model.v1.smart_home_evaluation.stage.Stage' + } # type: Dict + + attribute_map = { + 'capability_test_plan': 'capabilityTestPlan', + 'endpoint': 'endpoint', + 'stage': 'stage' + } # type: Dict + supports_multiple_types = False + + def __init__(self, capability_test_plan=None, endpoint=None, stage=None): + # type: (Optional[CapabilityTestPlan_7d93b401], Optional[Endpoint_912f62fd], Optional[Stage_5c1d183d]) -> None + """ + + :param capability_test_plan: + :type capability_test_plan: (optional) ask_smapi_model.v1.smart_home_evaluation.capability_test_plan.CapabilityTestPlan + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.smart_home_evaluation.endpoint.Endpoint + :param stage: + :type stage: (optional) ask_smapi_model.v1.smart_home_evaluation.stage.Stage + """ + self.__discriminator_value = None # type: str + + self.capability_test_plan = capability_test_plan + self.endpoint = endpoint + self.stage = stage + + 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, EvaluateSHCapabilityRequest): + 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-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluate_sh_capability_response.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluate_sh_capability_response.py new file mode 100644 index 00000000..9f44b461 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluate_sh_capability_response.py @@ -0,0 +1,129 @@ +# 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_smapi_model.v1.smart_home_evaluation.evaluate_sh_capability_request import EvaluateSHCapabilityRequest + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.smart_home_evaluation.capability_test_plan import CapabilityTestPlan as CapabilityTestPlan_7d93b401 + from ask_smapi_model.v1.smart_home_evaluation.stage import Stage as Stage_5c1d183d + from ask_smapi_model.v1.smart_home_evaluation.endpoint import Endpoint as Endpoint_912f62fd + + +class EvaluateSHCapabilityResponse(EvaluateSHCapabilityRequest): + """ + + :param capability_test_plan: + :type capability_test_plan: (optional) ask_smapi_model.v1.smart_home_evaluation.capability_test_plan.CapabilityTestPlan + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.smart_home_evaluation.endpoint.Endpoint + :param stage: + :type stage: (optional) ask_smapi_model.v1.smart_home_evaluation.stage.Stage + :param id: + :type id: (optional) str + + """ + deserialized_types = { + 'capability_test_plan': 'ask_smapi_model.v1.smart_home_evaluation.capability_test_plan.CapabilityTestPlan', + 'endpoint': 'ask_smapi_model.v1.smart_home_evaluation.endpoint.Endpoint', + 'stage': 'ask_smapi_model.v1.smart_home_evaluation.stage.Stage', + 'id': 'str' + } # type: Dict + + attribute_map = { + 'capability_test_plan': 'capabilityTestPlan', + 'endpoint': 'endpoint', + 'stage': 'stage', + 'id': 'id' + } # type: Dict + supports_multiple_types = False + + def __init__(self, capability_test_plan=None, endpoint=None, stage=None, id=None): + # type: (Optional[CapabilityTestPlan_7d93b401], Optional[Endpoint_912f62fd], Optional[Stage_5c1d183d], Optional[str]) -> None + """ + + :param capability_test_plan: + :type capability_test_plan: (optional) ask_smapi_model.v1.smart_home_evaluation.capability_test_plan.CapabilityTestPlan + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.smart_home_evaluation.endpoint.Endpoint + :param stage: + :type stage: (optional) ask_smapi_model.v1.smart_home_evaluation.stage.Stage + :param id: + :type id: (optional) str + """ + self.__discriminator_value = None # type: str + + super(EvaluateSHCapabilityResponse, self).__init__(capability_test_plan=capability_test_plan, endpoint=endpoint, stage=stage) + self.id = 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, EvaluateSHCapabilityResponse): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_detection_job_status.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluation_entity_status.py similarity index 79% rename from ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_detection_job_status.py rename to ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluation_entity_status.py index b6d3d2bb..3c116233 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/conflict_detection_job_status.py +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluation_entity_status.py @@ -21,24 +21,23 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class ConflictDetectionJobStatus(Enum): +class EvaluationEntityStatus(Enum): """ - The status of conflict detection job. - - Allowed enum values: [IN_PROGRESS, COMPLETED, FAILED] + Allowed enum values: [PASSED, FAILED, IN_PROGRESS, ERROR] """ - IN_PROGRESS = "IN_PROGRESS" - COMPLETED = "COMPLETED" + PASSED = "PASSED" FAILED = "FAILED" + IN_PROGRESS = "IN_PROGRESS" + ERROR = "ERROR" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,14 +53,14 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" - if not isinstance(other, ConflictDetectionJobStatus): + if not isinstance(other, EvaluationEntityStatus): return False return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation_set_items.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluation_object.py similarity index 52% rename from ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation_set_items.py rename to ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluation_object.py index bce06407..57e39cd2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/asr/annotation_sets/annotation_set_items.py +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/evaluation_object.py @@ -18,65 +18,82 @@ import six import typing from enum import Enum -from ask_smapi_model.v1.skill.asr.annotation_sets.annotation_set_metadata import AnnotationSetMetadata if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime + from ask_smapi_model.v1.smart_home_evaluation.evaluation_entity_status import EvaluationEntityStatus as EvaluationEntityStatus_996e143 -class AnnotationSetItems(AnnotationSetMetadata): +class EvaluationObject(object): """ - :param name: Name of the ASR annotation set - :type name: (optional) str - :param annotation_count: Number of annotations within an annotation set - :type annotation_count: (optional) int - :param last_updated_timestamp: The timestamp for the most recent update of ASR annotation set - :type last_updated_timestamp: (optional) datetime - :param eligible_for_evaluation: Indicates if the annotation set is eligible for evaluation. A set is not eligible for evaluation if any annotation within the set has a missing uploadId, filePathInUpload, expectedTranscription, or evaluationWeight. - :type eligible_for_evaluation: (optional) bool - :param id: The Annotation set id + :param end_timestamp: + :type end_timestamp: (optional) datetime + :param start_timestamp: + :type start_timestamp: (optional) datetime + :param status: + :type status: (optional) ask_smapi_model.v1.smart_home_evaluation.evaluation_entity_status.EvaluationEntityStatus + :param endpoint_id: + :type endpoint_id: (optional) str + :param id: :type id: (optional) str + :param source_test_plan_ids: + :type source_test_plan_ids: (optional) list[str] + :param test_plan_id: + :type test_plan_id: (optional) str """ deserialized_types = { - 'name': 'str', - 'annotation_count': 'int', - 'last_updated_timestamp': 'datetime', - 'eligible_for_evaluation': 'bool', - 'id': 'str' + 'end_timestamp': 'datetime', + 'start_timestamp': 'datetime', + 'status': 'ask_smapi_model.v1.smart_home_evaluation.evaluation_entity_status.EvaluationEntityStatus', + 'endpoint_id': 'str', + 'id': 'str', + 'source_test_plan_ids': 'list[str]', + 'test_plan_id': 'str' } # type: Dict attribute_map = { - 'name': 'name', - 'annotation_count': 'annotationCount', - 'last_updated_timestamp': 'lastUpdatedTimestamp', - 'eligible_for_evaluation': 'eligibleForEvaluation', - 'id': 'id' + 'end_timestamp': 'endTimestamp', + 'start_timestamp': 'startTimestamp', + 'status': 'status', + 'endpoint_id': 'endpointId', + 'id': 'id', + 'source_test_plan_ids': 'sourceTestPlanIds', + 'test_plan_id': 'testPlanId' } # type: Dict supports_multiple_types = False - def __init__(self, name=None, annotation_count=None, last_updated_timestamp=None, eligible_for_evaluation=None, id=None): - # type: (Optional[str], Optional[int], Optional[datetime], Optional[bool], Optional[str]) -> None + def __init__(self, end_timestamp=None, start_timestamp=None, status=None, endpoint_id=None, id=None, source_test_plan_ids=None, test_plan_id=None): + # type: (Optional[datetime], Optional[datetime], Optional[EvaluationEntityStatus_996e143], Optional[str], Optional[str], Optional[List[object]], Optional[str]) -> None """ - :param name: Name of the ASR annotation set - :type name: (optional) str - :param annotation_count: Number of annotations within an annotation set - :type annotation_count: (optional) int - :param last_updated_timestamp: The timestamp for the most recent update of ASR annotation set - :type last_updated_timestamp: (optional) datetime - :param eligible_for_evaluation: Indicates if the annotation set is eligible for evaluation. A set is not eligible for evaluation if any annotation within the set has a missing uploadId, filePathInUpload, expectedTranscription, or evaluationWeight. - :type eligible_for_evaluation: (optional) bool - :param id: The Annotation set id + :param end_timestamp: + :type end_timestamp: (optional) datetime + :param start_timestamp: + :type start_timestamp: (optional) datetime + :param status: + :type status: (optional) ask_smapi_model.v1.smart_home_evaluation.evaluation_entity_status.EvaluationEntityStatus + :param endpoint_id: + :type endpoint_id: (optional) str + :param id: :type id: (optional) str + :param source_test_plan_ids: + :type source_test_plan_ids: (optional) list[str] + :param test_plan_id: + :type test_plan_id: (optional) str """ self.__discriminator_value = None # type: str - super(AnnotationSetItems, self).__init__(name=name, annotation_count=annotation_count, last_updated_timestamp=last_updated_timestamp, eligible_for_evaluation=eligible_for_evaluation) + self.end_timestamp = end_timestamp + self.start_timestamp = start_timestamp + self.status = status + self.endpoint_id = endpoint_id self.id = id + self.source_test_plan_ids = source_test_plan_ids + self.test_plan_id = test_plan_id def to_dict(self): # type: () -> Dict[str, object] @@ -121,7 +138,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, AnnotationSetItems): + if not isinstance(other, EvaluationObject): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/get_sh_capability_evaluation_response.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/get_sh_capability_evaluation_response.py new file mode 100644 index 00000000..314f373c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/get_sh_capability_evaluation_response.py @@ -0,0 +1,145 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.smart_home_evaluation.evaluate_sh_capability_request import EvaluateSHCapabilityRequest as EvaluateSHCapabilityRequest_2d391178 + from ask_smapi_model.v1.smart_home_evaluation.evaluation_entity_status import EvaluationEntityStatus as EvaluationEntityStatus_996e143 + from ask_smapi_model.v1.smart_home_evaluation.sh_evaluation_results_metric import SHEvaluationResultsMetric as SHEvaluationResultsMetric_64305eca + from ask_smapi_model.v1.smart_home_evaluation.sh_capability_error import SHCapabilityError as SHCapabilityError_806131e7 + + +class GetSHCapabilityEvaluationResponse(object): + """ + + :param end_timestamp: + :type end_timestamp: (optional) datetime + :param start_timestamp: + :type start_timestamp: (optional) datetime + :param status: + :type status: (optional) ask_smapi_model.v1.smart_home_evaluation.evaluation_entity_status.EvaluationEntityStatus + :param error: + :type error: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_error.SHCapabilityError + :param input: + :type input: (optional) ask_smapi_model.v1.smart_home_evaluation.evaluate_sh_capability_request.EvaluateSHCapabilityRequest + :param metrics: + :type metrics: (optional) dict(str, ask_smapi_model.v1.smart_home_evaluation.sh_evaluation_results_metric.SHEvaluationResultsMetric) + + """ + deserialized_types = { + 'end_timestamp': 'datetime', + 'start_timestamp': 'datetime', + 'status': 'ask_smapi_model.v1.smart_home_evaluation.evaluation_entity_status.EvaluationEntityStatus', + 'error': 'ask_smapi_model.v1.smart_home_evaluation.sh_capability_error.SHCapabilityError', + 'input': 'ask_smapi_model.v1.smart_home_evaluation.evaluate_sh_capability_request.EvaluateSHCapabilityRequest', + 'metrics': 'dict(str, ask_smapi_model.v1.smart_home_evaluation.sh_evaluation_results_metric.SHEvaluationResultsMetric)' + } # type: Dict + + attribute_map = { + 'end_timestamp': 'endTimestamp', + 'start_timestamp': 'startTimestamp', + 'status': 'status', + 'error': 'error', + 'input': 'input', + 'metrics': 'metrics' + } # type: Dict + supports_multiple_types = False + + def __init__(self, end_timestamp=None, start_timestamp=None, status=None, error=None, input=None, metrics=None): + # type: (Optional[datetime], Optional[datetime], Optional[EvaluationEntityStatus_996e143], Optional[SHCapabilityError_806131e7], Optional[EvaluateSHCapabilityRequest_2d391178], Optional[Dict[str, SHEvaluationResultsMetric_64305eca]]) -> None + """ + + :param end_timestamp: + :type end_timestamp: (optional) datetime + :param start_timestamp: + :type start_timestamp: (optional) datetime + :param status: + :type status: (optional) ask_smapi_model.v1.smart_home_evaluation.evaluation_entity_status.EvaluationEntityStatus + :param error: + :type error: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_error.SHCapabilityError + :param input: + :type input: (optional) ask_smapi_model.v1.smart_home_evaluation.evaluate_sh_capability_request.EvaluateSHCapabilityRequest + :param metrics: + :type metrics: (optional) dict(str, ask_smapi_model.v1.smart_home_evaluation.sh_evaluation_results_metric.SHEvaluationResultsMetric) + """ + self.__discriminator_value = None # type: str + + self.end_timestamp = end_timestamp + self.start_timestamp = start_timestamp + self.status = status + self.error = error + self.input = input + self.metrics = metrics + + 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, GetSHCapabilityEvaluationResponse): + 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-smapi-model/ask_smapi_model/v1/smart_home_evaluation/get_sh_capability_evaluation_results_response.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/get_sh_capability_evaluation_results_response.py new file mode 100644 index 00000000..38143d5b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/get_sh_capability_evaluation_results_response.py @@ -0,0 +1,116 @@ +# 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_smapi_model.v1.smart_home_evaluation.paged_response import PagedResponse + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.smart_home_evaluation.pagination_context import PaginationContext as PaginationContext_1a5b9c42 + from ask_smapi_model.v1.smart_home_evaluation.test_case_result import TestCaseResult as TestCaseResult_ec2c4a7d + + +class GetSHCapabilityEvaluationResultsResponse(PagedResponse): + """ + + :param pagination_context: + :type pagination_context: (optional) ask_smapi_model.v1.smart_home_evaluation.pagination_context.PaginationContext + :param test_case_results: + :type test_case_results: (optional) list[ask_smapi_model.v1.smart_home_evaluation.test_case_result.TestCaseResult] + + """ + deserialized_types = { + 'pagination_context': 'ask_smapi_model.v1.smart_home_evaluation.pagination_context.PaginationContext', + 'test_case_results': 'list[ask_smapi_model.v1.smart_home_evaluation.test_case_result.TestCaseResult]' + } # type: Dict + + attribute_map = { + 'pagination_context': 'paginationContext', + 'test_case_results': 'testCaseResults' + } # type: Dict + supports_multiple_types = False + + def __init__(self, pagination_context=None, test_case_results=None): + # type: (Optional[PaginationContext_1a5b9c42], Optional[List[TestCaseResult_ec2c4a7d]]) -> None + """ + + :param pagination_context: + :type pagination_context: (optional) ask_smapi_model.v1.smart_home_evaluation.pagination_context.PaginationContext + :param test_case_results: + :type test_case_results: (optional) list[ask_smapi_model.v1.smart_home_evaluation.test_case_result.TestCaseResult] + """ + self.__discriminator_value = None # type: str + + super(GetSHCapabilityEvaluationResultsResponse, self).__init__(pagination_context=pagination_context) + self.test_case_results = test_case_results + + 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, GetSHCapabilityEvaluationResultsResponse): + 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-smapi-model/ask_smapi_model/v1/smart_home_evaluation/list_sh_capability_evaluations_response.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/list_sh_capability_evaluations_response.py new file mode 100644 index 00000000..3fd9bcb0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/list_sh_capability_evaluations_response.py @@ -0,0 +1,115 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.smart_home_evaluation.pagination_context_token import PaginationContextToken as PaginationContextToken_8a4288dd + from ask_smapi_model.v1.smart_home_evaluation.evaluation_object import EvaluationObject as EvaluationObject_c72d2758 + + +class ListSHCapabilityEvaluationsResponse(object): + """ + + :param pagination_context_token: + :type pagination_context_token: (optional) ask_smapi_model.v1.smart_home_evaluation.pagination_context_token.PaginationContextToken + :param evaluations: + :type evaluations: (optional) list[ask_smapi_model.v1.smart_home_evaluation.evaluation_object.EvaluationObject] + + """ + deserialized_types = { + 'pagination_context_token': 'ask_smapi_model.v1.smart_home_evaluation.pagination_context_token.PaginationContextToken', + 'evaluations': 'list[ask_smapi_model.v1.smart_home_evaluation.evaluation_object.EvaluationObject]' + } # type: Dict + + attribute_map = { + 'pagination_context_token': 'paginationContextToken', + 'evaluations': 'evaluations' + } # type: Dict + supports_multiple_types = False + + def __init__(self, pagination_context_token=None, evaluations=None): + # type: (Optional[PaginationContextToken_8a4288dd], Optional[List[EvaluationObject_c72d2758]]) -> None + """ + + :param pagination_context_token: + :type pagination_context_token: (optional) ask_smapi_model.v1.smart_home_evaluation.pagination_context_token.PaginationContextToken + :param evaluations: + :type evaluations: (optional) list[ask_smapi_model.v1.smart_home_evaluation.evaluation_object.EvaluationObject] + """ + self.__discriminator_value = None # type: str + + self.pagination_context_token = pagination_context_token + self.evaluations = evaluations + + 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, ListSHCapabilityEvaluationsResponse): + 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-smapi-model/ask_smapi_model/v1/smart_home_evaluation/list_sh_capability_test_plans_response.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/list_sh_capability_test_plans_response.py new file mode 100644 index 00000000..b9251018 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/list_sh_capability_test_plans_response.py @@ -0,0 +1,116 @@ +# 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_smapi_model.v1.smart_home_evaluation.paged_response import PagedResponse + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.smart_home_evaluation.pagination_context import PaginationContext as PaginationContext_1a5b9c42 + from ask_smapi_model.v1.smart_home_evaluation.list_sh_test_plan_item import ListSHTestPlanItem as ListSHTestPlanItem_9e4ab799 + + +class ListSHCapabilityTestPlansResponse(PagedResponse): + """ + + :param pagination_context: + :type pagination_context: (optional) ask_smapi_model.v1.smart_home_evaluation.pagination_context.PaginationContext + :param test_plans: + :type test_plans: (optional) list[ask_smapi_model.v1.smart_home_evaluation.list_sh_test_plan_item.ListSHTestPlanItem] + + """ + deserialized_types = { + 'pagination_context': 'ask_smapi_model.v1.smart_home_evaluation.pagination_context.PaginationContext', + 'test_plans': 'list[ask_smapi_model.v1.smart_home_evaluation.list_sh_test_plan_item.ListSHTestPlanItem]' + } # type: Dict + + attribute_map = { + 'pagination_context': 'paginationContext', + 'test_plans': 'testPlans' + } # type: Dict + supports_multiple_types = False + + def __init__(self, pagination_context=None, test_plans=None): + # type: (Optional[PaginationContext_1a5b9c42], Optional[List[ListSHTestPlanItem_9e4ab799]]) -> None + """ + + :param pagination_context: + :type pagination_context: (optional) ask_smapi_model.v1.smart_home_evaluation.pagination_context.PaginationContext + :param test_plans: + :type test_plans: (optional) list[ask_smapi_model.v1.smart_home_evaluation.list_sh_test_plan_item.ListSHTestPlanItem] + """ + self.__discriminator_value = None # type: str + + super(ListSHCapabilityTestPlansResponse, self).__init__(pagination_context=pagination_context) + self.test_plans = test_plans + + 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, ListSHCapabilityTestPlansResponse): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/health_request.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/list_sh_test_plan_item.py similarity index 86% rename from ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_request.py rename to ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/list_sh_test_plan_item.py index 578fda8a..3621301a 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_request.py +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/list_sh_test_plan_item.py @@ -21,35 +21,42 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class HealthRequest(object): +class ListSHTestPlanItem(object): """ - :param name: Defines the name of request, each request has their own payload format. + :param id: + :type id: (optional) str + :param name: :type name: (optional) str """ deserialized_types = { + 'id': 'str', 'name': 'str' } # type: Dict attribute_map = { + 'id': 'id', 'name': 'name' } # type: Dict supports_multiple_types = False - def __init__(self, name=None): - # type: (Optional[str]) -> None + def __init__(self, id=None, name=None): + # type: (Optional[str], Optional[str]) -> None """ - :param name: Defines the name of request, each request has their own payload format. + :param id: + :type id: (optional) str + :param name: :type name: (optional) str """ self.__discriminator_value = None # type: str + self.id = id self.name = name def to_dict(self): @@ -95,7 +102,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, HealthRequest): + if not isinstance(other, ListSHTestPlanItem): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/paged_response.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/paged_response.py new file mode 100644 index 00000000..3b534269 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/paged_response.py @@ -0,0 +1,107 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.smart_home_evaluation.pagination_context import PaginationContext as PaginationContext_1a5b9c42 + + +class PagedResponse(object): + """ + + :param pagination_context: + :type pagination_context: (optional) ask_smapi_model.v1.smart_home_evaluation.pagination_context.PaginationContext + + """ + deserialized_types = { + 'pagination_context': 'ask_smapi_model.v1.smart_home_evaluation.pagination_context.PaginationContext' + } # type: Dict + + attribute_map = { + 'pagination_context': 'paginationContext' + } # type: Dict + supports_multiple_types = False + + def __init__(self, pagination_context=None): + # type: (Optional[PaginationContext_1a5b9c42]) -> None + """ + + :param pagination_context: + :type pagination_context: (optional) ask_smapi_model.v1.smart_home_evaluation.pagination_context.PaginationContext + """ + self.__discriminator_value = None # type: str + + self.pagination_context = pagination_context + + 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, PagedResponse): + 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-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/pagination_context.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/pagination_context.py similarity index 84% rename from ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/pagination_context.py rename to ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/pagination_context.py index c3b5b52f..0001c9ea 100644 --- a/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/conflict_detection/pagination_context.py +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/pagination_context.py @@ -21,16 +21,16 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class PaginationContext(object): """ - :param next_token: A token returned if there are more results for the given inputs than `maxResults` from the request. It should also be used in the next request to retrieve more results. + :param next_token: :type next_token: (optional) str - :param total_count: Total avaliable results for the given query. + :param total_count: :type total_count: (optional) int """ @@ -49,9 +49,9 @@ def __init__(self, next_token=None, total_count=None): # type: (Optional[str], Optional[int]) -> None """ - :param next_token: A token returned if there are more results for the given inputs than `maxResults` from the request. It should also be used in the next request to retrieve more results. + :param next_token: :type next_token: (optional) str - :param total_count: Total avaliable results for the given query. + :param total_count: :type total_count: (optional) int """ self.__discriminator_value = None # type: str diff --git a/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/pagination_context_token.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/pagination_context_token.py new file mode 100644 index 00000000..c2d2fbc5 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/pagination_context_token.py @@ -0,0 +1,106 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class PaginationContextToken(object): + """ + + :param next_token: + :type next_token: (optional) str + + """ + deserialized_types = { + 'next_token': 'str' + } # type: Dict + + attribute_map = { + 'next_token': 'nextToken' + } # type: Dict + supports_multiple_types = False + + def __init__(self, next_token=None): + # type: (Optional[str]) -> None + """ + + :param next_token: + :type next_token: (optional) str + """ + self.__discriminator_value = None # type: str + + self.next_token = next_token + + 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, PaginationContextToken): + 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-smapi-model/ask_smapi_model/v1/smart_home_evaluation/py.typed b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/ask-smapi-model/ask_smapi_model/v0/link.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_directive.py similarity index 88% rename from ask-smapi-model/ask_smapi_model/v0/link.py rename to ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_directive.py index f49885a8..0c0c63f5 100644 --- a/ask-smapi-model/ask_smapi_model/v0/link.py +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_directive.py @@ -21,37 +21,29 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime -class Link(object): +class SHCapabilityDirective(object): """ - :param href: - :type href: (optional) str """ deserialized_types = { - 'href': 'str' } # type: Dict attribute_map = { - 'href': 'href' } # type: Dict supports_multiple_types = False - def __init__(self, href=None): - # type: (Optional[str]) -> None + def __init__(self): + # type: () -> None """ - :param href: - :type href: (optional) str """ self.__discriminator_value = None # type: str - self.href = href - def to_dict(self): # type: () -> Dict[str, object] """Returns the model properties as a dict""" @@ -95,7 +87,7 @@ def __repr__(self): def __eq__(self, other): # type: (object) -> bool """Returns true if both objects are equal""" - if not isinstance(other, Link): + if not isinstance(other, SHCapabilityDirective): return False return self.__dict__ == other.__dict__ diff --git a/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_error.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_error.py new file mode 100644 index 00000000..a3445422 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_error.py @@ -0,0 +1,114 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.smart_home_evaluation.sh_capability_error_code import SHCapabilityErrorCode as SHCapabilityErrorCode_45c6414c + + +class SHCapabilityError(object): + """ + + :param code: + :type code: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_error_code.SHCapabilityErrorCode + :param message: + :type message: (optional) str + + """ + deserialized_types = { + 'code': 'ask_smapi_model.v1.smart_home_evaluation.sh_capability_error_code.SHCapabilityErrorCode', + 'message': 'str' + } # type: Dict + + attribute_map = { + 'code': 'code', + 'message': 'message' + } # type: Dict + supports_multiple_types = False + + def __init__(self, code=None, message=None): + # type: (Optional[SHCapabilityErrorCode_45c6414c], Optional[str]) -> None + """ + + :param code: + :type code: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_error_code.SHCapabilityErrorCode + :param message: + :type message: (optional) str + """ + self.__discriminator_value = None # type: str + + self.code = code + self.message = message + + 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, SHCapabilityError): + 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-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_error_code.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_error_code.py new file mode 100644 index 00000000..54675b79 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_error_code.py @@ -0,0 +1,70 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SHCapabilityErrorCode(Enum): + """ + + + Allowed enum values: [NO_SUCH_ENDPOINT, NO_SUCH_SKILL_STAGE, NO_SUCH_TEST_PLAN, MULTIPLE_MATCHED_ENDPOINTS, MULTIPLE_MATCHED_TEST_PLANS, CAPABILITY_NOT_SUPPORTED, DISCOVERY_FAILED, TEST_CASE_TIME_OUT] + """ + NO_SUCH_ENDPOINT = "NO_SUCH_ENDPOINT" + NO_SUCH_SKILL_STAGE = "NO_SUCH_SKILL_STAGE" + NO_SUCH_TEST_PLAN = "NO_SUCH_TEST_PLAN" + MULTIPLE_MATCHED_ENDPOINTS = "MULTIPLE_MATCHED_ENDPOINTS" + MULTIPLE_MATCHED_TEST_PLANS = "MULTIPLE_MATCHED_TEST_PLANS" + CAPABILITY_NOT_SUPPORTED = "CAPABILITY_NOT_SUPPORTED" + DISCOVERY_FAILED = "DISCOVERY_FAILED" + TEST_CASE_TIME_OUT = "TEST_CASE_TIME_OUT" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SHCapabilityErrorCode): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_response.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_response.py new file mode 100644 index 00000000..04b654d5 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_response.py @@ -0,0 +1,98 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SHCapabilityResponse(object): + """ + + + """ + deserialized_types = { + } # type: Dict + + attribute_map = { + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """ + + """ + self.__discriminator_value = None # type: str + + 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, SHCapabilityResponse): + 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-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_state.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_state.py new file mode 100644 index 00000000..84bfd400 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_capability_state.py @@ -0,0 +1,98 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SHCapabilityState(object): + """ + + + """ + deserialized_types = { + } # type: Dict + + attribute_map = { + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """ + + """ + self.__discriminator_value = None # type: str + + 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, SHCapabilityState): + 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-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_evaluation_results_metric.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_evaluation_results_metric.py new file mode 100644 index 00000000..2da9a443 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/sh_evaluation_results_metric.py @@ -0,0 +1,127 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SHEvaluationResultsMetric(object): + """ + + :param error_test_cases: + :type error_test_cases: (optional) int + :param failed_test_cases: + :type failed_test_cases: (optional) int + :param passed_test_cases: + :type passed_test_cases: (optional) int + :param total_test_cases: + :type total_test_cases: (optional) int + + """ + deserialized_types = { + 'error_test_cases': 'int', + 'failed_test_cases': 'int', + 'passed_test_cases': 'int', + 'total_test_cases': 'int' + } # type: Dict + + attribute_map = { + 'error_test_cases': 'errorTestCases', + 'failed_test_cases': 'failedTestCases', + 'passed_test_cases': 'passedTestCases', + 'total_test_cases': 'totalTestCases' + } # type: Dict + supports_multiple_types = False + + def __init__(self, error_test_cases=None, failed_test_cases=None, passed_test_cases=None, total_test_cases=None): + # type: (Optional[int], Optional[int], Optional[int], Optional[int]) -> None + """ + + :param error_test_cases: + :type error_test_cases: (optional) int + :param failed_test_cases: + :type failed_test_cases: (optional) int + :param passed_test_cases: + :type passed_test_cases: (optional) int + :param total_test_cases: + :type total_test_cases: (optional) int + """ + self.__discriminator_value = None # type: str + + self.error_test_cases = error_test_cases + self.failed_test_cases = failed_test_cases + self.passed_test_cases = passed_test_cases + self.total_test_cases = total_test_cases + + 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, SHEvaluationResultsMetric): + 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-smapi-model/ask_smapi_model/v1/isp/stage.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/stage.py similarity index 89% rename from ask-smapi-model/ask_smapi_model/v1/isp/stage.py rename to ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/stage.py index 15413f83..938afc54 100644 --- a/ask-smapi-model/ask_smapi_model/v1/isp/stage.py +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/stage.py @@ -21,14 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class Stage(Enum): """ - Stage of in-skill product. - Allowed enum values: [development, live] @@ -37,7 +35,7 @@ class Stage(Enum): live = "live" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +51,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, Stage): return False @@ -61,6 +59,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/test_case_result.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/test_case_result.py new file mode 100644 index 00000000..73a37a8e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/test_case_result.py @@ -0,0 +1,160 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v1.smart_home_evaluation.sh_capability_directive import SHCapabilityDirective as SHCapabilityDirective_72bbfeb5 + from ask_smapi_model.v1.smart_home_evaluation.test_case_result_status import TestCaseResultStatus as TestCaseResultStatus_5c4be03e + from ask_smapi_model.v1.smart_home_evaluation.sh_capability_error import SHCapabilityError as SHCapabilityError_806131e7 + from ask_smapi_model.v1.smart_home_evaluation.sh_capability_response import SHCapabilityResponse as SHCapabilityResponse_5c94224d + from ask_smapi_model.v1.smart_home_evaluation.sh_capability_state import SHCapabilityState as SHCapabilityState_db42e6b9 + + +class TestCaseResult(object): + """ + + :param actual_capability_states: + :type actual_capability_states: (optional) list[ask_smapi_model.v1.smart_home_evaluation.sh_capability_state.SHCapabilityState] + :param actual_response: + :type actual_response: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_response.SHCapabilityResponse + :param directive: + :type directive: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_directive.SHCapabilityDirective + :param error: + :type error: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_error.SHCapabilityError + :param expected_capability_states: + :type expected_capability_states: (optional) list[ask_smapi_model.v1.smart_home_evaluation.sh_capability_state.SHCapabilityState] + :param expected_response: + :type expected_response: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_response.SHCapabilityResponse + :param name: + :type name: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.smart_home_evaluation.test_case_result_status.TestCaseResultStatus + + """ + deserialized_types = { + 'actual_capability_states': 'list[ask_smapi_model.v1.smart_home_evaluation.sh_capability_state.SHCapabilityState]', + 'actual_response': 'ask_smapi_model.v1.smart_home_evaluation.sh_capability_response.SHCapabilityResponse', + 'directive': 'ask_smapi_model.v1.smart_home_evaluation.sh_capability_directive.SHCapabilityDirective', + 'error': 'ask_smapi_model.v1.smart_home_evaluation.sh_capability_error.SHCapabilityError', + 'expected_capability_states': 'list[ask_smapi_model.v1.smart_home_evaluation.sh_capability_state.SHCapabilityState]', + 'expected_response': 'ask_smapi_model.v1.smart_home_evaluation.sh_capability_response.SHCapabilityResponse', + 'name': 'str', + 'status': 'ask_smapi_model.v1.smart_home_evaluation.test_case_result_status.TestCaseResultStatus' + } # type: Dict + + attribute_map = { + 'actual_capability_states': 'actualCapabilityStates', + 'actual_response': 'actualResponse', + 'directive': 'directive', + 'error': 'error', + 'expected_capability_states': 'expectedCapabilityStates', + 'expected_response': 'expectedResponse', + 'name': 'name', + 'status': 'status' + } # type: Dict + supports_multiple_types = False + + def __init__(self, actual_capability_states=None, actual_response=None, directive=None, error=None, expected_capability_states=None, expected_response=None, name=None, status=None): + # type: (Optional[List[SHCapabilityState_db42e6b9]], Optional[SHCapabilityResponse_5c94224d], Optional[SHCapabilityDirective_72bbfeb5], Optional[SHCapabilityError_806131e7], Optional[List[SHCapabilityState_db42e6b9]], Optional[SHCapabilityResponse_5c94224d], Optional[str], Optional[TestCaseResultStatus_5c4be03e]) -> None + """ + + :param actual_capability_states: + :type actual_capability_states: (optional) list[ask_smapi_model.v1.smart_home_evaluation.sh_capability_state.SHCapabilityState] + :param actual_response: + :type actual_response: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_response.SHCapabilityResponse + :param directive: + :type directive: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_directive.SHCapabilityDirective + :param error: + :type error: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_error.SHCapabilityError + :param expected_capability_states: + :type expected_capability_states: (optional) list[ask_smapi_model.v1.smart_home_evaluation.sh_capability_state.SHCapabilityState] + :param expected_response: + :type expected_response: (optional) ask_smapi_model.v1.smart_home_evaluation.sh_capability_response.SHCapabilityResponse + :param name: + :type name: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.smart_home_evaluation.test_case_result_status.TestCaseResultStatus + """ + self.__discriminator_value = None # type: str + + self.actual_capability_states = actual_capability_states + self.actual_response = actual_response + self.directive = directive + self.error = error + self.expected_capability_states = expected_capability_states + self.expected_response = expected_response + self.name = name + self.status = status + + 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, TestCaseResult): + 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-smapi-model/ask_smapi_model/v1/smart_home_evaluation/test_case_result_status.py b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/test_case_result_status.py new file mode 100644 index 00000000..741db28d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/smart_home_evaluation/test_case_result_status.py @@ -0,0 +1,65 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class TestCaseResultStatus(Enum): + """ + + + Allowed enum values: [PASSED, FAILED, ERROR] + """ + PASSED = "PASSED" + FAILED = "FAILED" + ERROR = "ERROR" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, TestCaseResultStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/stage_type.py b/ask-smapi-model/ask_smapi_model/v1/stage_type.py index 95d13e64..c5093a45 100644 --- a/ask-smapi-model/ask_smapi_model/v1/stage_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/stage_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -35,7 +35,7 @@ class StageType(Enum): live = "live" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -51,7 +51,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, StageType): return False @@ -59,6 +59,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/stage_v2_type.py b/ask-smapi-model/ask_smapi_model/v1/stage_v2_type.py index e7853d7f..dc17f616 100644 --- a/ask-smapi-model/ask_smapi_model/v1/stage_v2_type.py +++ b/ask-smapi-model/ask_smapi_model/v1/stage_v2_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -36,7 +36,7 @@ class StageV2Type(Enum): development = "development" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -52,7 +52,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, StageV2Type): return False @@ -60,6 +60,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v1/vendor_management/vendor.py b/ask-smapi-model/ask_smapi_model/v1/vendor_management/vendor.py index c0ed244a..4a9c4944 100644 --- a/ask-smapi-model/ask_smapi_model/v1/vendor_management/vendor.py +++ b/ask-smapi-model/ask_smapi_model/v1/vendor_management/vendor.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v1/vendor_management/vendors.py b/ask-smapi-model/ask_smapi_model/v1/vendor_management/vendors.py index 0c6f00ea..d5361fd2 100644 --- a/ask-smapi-model/ask_smapi_model/v1/vendor_management/vendors.py +++ b/ask-smapi-model/ask_smapi_model/v1/vendor_management/vendors.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v1.vendor_management.vendor import VendorV1 + from ask_smapi_model.v1.vendor_management.vendor import Vendor as Vendor_761d0951 class Vendors(object): @@ -45,7 +45,7 @@ class Vendors(object): supports_multiple_types = False def __init__(self, vendors=None): - # type: (Optional[List[VendorV1]]) -> None + # type: (Optional[List[Vendor_761d0951]]) -> None """List of Vendors. :param vendors: diff --git a/ask-smapi-model/ask_smapi_model/v2/bad_request_error.py b/ask-smapi-model/ask_smapi_model/v2/bad_request_error.py index 5085b540..f9793919 100644 --- a/ask-smapi-model/ask_smapi_model/v2/bad_request_error.py +++ b/ask-smapi-model/ask_smapi_model/v2/bad_request_error.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.error import ErrorV2 + from ask_smapi_model.v2.error import Error as Error_ea6c1a5a class BadRequestError(object): @@ -47,7 +47,7 @@ class BadRequestError(object): supports_multiple_types = False def __init__(self, message=None, violations=None): - # type: (Optional[str], Optional[List[ErrorV2]]) -> None + # type: (Optional[str], Optional[List[Error_ea6c1a5a]]) -> None """ :param message: Human readable description of error. diff --git a/ask-smapi-model/ask_smapi_model/v2/error.py b/ask-smapi-model/ask_smapi_model/v2/error.py index 7de1f24d..e31fd1cc 100644 --- a/ask-smapi-model/ask_smapi_model/v2/error.py +++ b/ask-smapi-model/ask_smapi_model/v2/error.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/__init__.py b/ask-smapi-model/ask_smapi_model/v2/skill/__init__.py index 465ed344..6de2a292 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/__init__.py @@ -14,7 +14,7 @@ # from __future__ import absolute_import +from .invocation import Invocation +from .invocation_response import InvocationResponse from .invocation_request import InvocationRequest from .metrics import Metrics -from .invocation_response import InvocationResponse -from .invocation import Invocation diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/invocation.py b/ask-smapi-model/ask_smapi_model/v2/skill/invocation.py index 1d9ef955..d23005ae 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/invocation.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/invocation.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.invocation_response import InvocationResponseV2 - from ask_smapi_model.v2.skill.invocation_request import InvocationRequestV2 - from ask_smapi_model.v2.skill.metrics import MetricsV2 + from ask_smapi_model.v2.skill.invocation_response import InvocationResponse as InvocationResponse_92ff1a14 + from ask_smapi_model.v2.skill.metrics import Metrics as Metrics_f81eceb3 + from ask_smapi_model.v2.skill.invocation_request import InvocationRequest as InvocationRequest_c1e3e5d6 class Invocation(object): @@ -53,7 +53,7 @@ class Invocation(object): supports_multiple_types = False def __init__(self, invocation_request=None, invocation_response=None, metrics=None): - # type: (Optional[InvocationRequestV2], Optional[InvocationResponseV2], Optional[MetricsV2]) -> None + # type: (Optional[InvocationRequest_c1e3e5d6], Optional[InvocationResponse_92ff1a14], Optional[Metrics_f81eceb3]) -> None """ :param invocation_request: diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/invocation_request.py b/ask-smapi-model/ask_smapi_model/v2/skill/invocation_request.py index 28dbdce0..183964ed 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/invocation_request.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/invocation_request.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/invocation_response.py b/ask-smapi-model/ask_smapi_model/v2/skill/invocation_response.py index b84ba5f6..8345e81b 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/invocation_response.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/invocation_response.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/__init__.py b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/__init__.py index 9e94b549..d493b063 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/__init__.py @@ -14,9 +14,9 @@ # from __future__ import absolute_import -from .invocation_response_status import InvocationResponseStatus from .invocations_api_response import InvocationsApiResponse -from .end_point_regions import EndPointRegions from .invocation_response_result import InvocationResponseResult +from .end_point_regions import EndPointRegions from .skill_request import SkillRequest from .invocations_api_request import InvocationsApiRequest +from .invocation_response_status import InvocationResponseStatus diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/end_point_regions.py b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/end_point_regions.py index 3b3dc332..5eb54e27 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/end_point_regions.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/end_point_regions.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class EndPointRegions(Enum): default = "default" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, EndPointRegions): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocation_response_result.py b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocation_response_result.py index a18838f8..21b78dd1 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocation_response_result.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocation_response_result.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.invocation import InvocationV2 - from ask_smapi_model.v2.error import ErrorV2 + from ask_smapi_model.v2.error import Error as Error_ea6c1a5a + from ask_smapi_model.v2.skill.invocation import Invocation as Invocation_bd57c0c9 class InvocationResponseResult(object): @@ -48,7 +48,7 @@ class InvocationResponseResult(object): supports_multiple_types = False def __init__(self, skill_execution_info=None, error=None): - # type: (Optional[InvocationV2], Optional[ErrorV2]) -> None + # type: (Optional[Invocation_bd57c0c9], Optional[Error_ea6c1a5a]) -> None """ :param skill_execution_info: diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocation_response_status.py b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocation_response_status.py index 46cdc3d6..3d6dd547 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocation_response_status.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocation_response_status.py @@ -21,23 +21,23 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class InvocationResponseStatus(Enum): """ - String that specifies the status of skill invocation. Possible values are \"SUCCEEDED\", and \"FAILED\". + String that specifies the status of skill invocation. Possible values are \"SUCCESSFUL\", and \"FAILED\". - Allowed enum values: [SUCCEEDED, FAILED] + Allowed enum values: [SUCCESSFUL, FAILED] """ - SUCCEEDED = "SUCCEEDED" + SUCCESSFUL = "SUCCESSFUL" FAILED = "FAILED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, InvocationResponseStatus): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocations_api_request.py b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocations_api_request.py index d799a97b..dd12c961 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocations_api_request.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocations_api_request.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.invocations.end_point_regions import EndPointRegionsV2 - from ask_smapi_model.v2.skill.invocations.skill_request import SkillRequestV2 + from ask_smapi_model.v2.skill.invocations.skill_request import SkillRequest as SkillRequest_eec4e59b + from ask_smapi_model.v2.skill.invocations.end_point_regions import EndPointRegions as EndPointRegions_8b6a8458 class InvocationsApiRequest(object): @@ -48,7 +48,7 @@ class InvocationsApiRequest(object): supports_multiple_types = False def __init__(self, endpoint_region=None, skill_request=None): - # type: (Optional[EndPointRegionsV2], Optional[SkillRequestV2]) -> None + # type: (Optional[EndPointRegions_8b6a8458], Optional[SkillRequest_eec4e59b]) -> None """ :param endpoint_region: diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocations_api_response.py b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocations_api_response.py index 6da833d1..6fe33793 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocations_api_response.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/invocations_api_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.invocations.invocation_response_result import InvocationResponseResultV2 - from ask_smapi_model.v2.skill.invocations.invocation_response_status import InvocationResponseStatusV2 + from ask_smapi_model.v2.skill.invocations.invocation_response_status import InvocationResponseStatus as InvocationResponseStatus_ba4e3760 + from ask_smapi_model.v2.skill.invocations.invocation_response_result import InvocationResponseResult as InvocationResponseResult_6f362dc0 class InvocationsApiResponse(object): @@ -48,7 +48,7 @@ class InvocationsApiResponse(object): supports_multiple_types = False def __init__(self, status=None, result=None): - # type: (Optional[InvocationResponseStatusV2], Optional[InvocationResponseResultV2]) -> None + # type: (Optional[InvocationResponseStatus_ba4e3760], Optional[InvocationResponseResult_6f362dc0]) -> None """ :param status: diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/skill_request.py b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/skill_request.py index ce65870c..51322922 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/invocations/skill_request.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/invocations/skill_request.py @@ -21,14 +21,14 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime class SkillRequest(object): """ - :param body: ASK request body schema as defined in the public facing documentation (https://tiny.amazon.com/1h8keglep/deveamazpublsolualexalexdocs) + :param body: ASK request body schema as defined in the public facing documentation (https://developer.amazon.com/en-US/docs/alexa/custom-skills/request-and-response-json-reference.html#request-body-syntax) :type body: (optional) object """ @@ -45,7 +45,7 @@ def __init__(self, body=None): # type: (Optional[object]) -> None """ - :param body: ASK request body schema as defined in the public facing documentation (https://tiny.amazon.com/1h8keglep/deveamazpublsolualexalexdocs) + :param body: ASK request body schema as defined in the public facing documentation (https://developer.amazon.com/en-US/docs/alexa/custom-skills/request-and-response-json-reference.html#request-body-syntax) :type body: (optional) object """ self.__discriminator_value = None # type: str diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/metrics.py b/ask-smapi-model/ask_smapi_model/v2/skill/metrics.py index b474c621..1dd68344 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/metrics.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/metrics.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/__init__.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/__init__.py index eb87051b..7db5b1b3 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/__init__.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/__init__.py @@ -14,23 +14,25 @@ # from __future__ import absolute_import -from .resolutions_per_authority_items import ResolutionsPerAuthorityItems +from .alexa_execution_info import AlexaExecutionInfo +from .session_mode import SessionMode from .alexa_response_content import AlexaResponseContent -from .confirmation_status_type import ConfirmationStatusType -from .simulations_api_request import SimulationsApiRequest -from .input import Input +from .alexa_response import AlexaResponse +from .resolutions_per_authority_value_items import ResolutionsPerAuthorityValueItems from .simulations_api_response import SimulationsApiResponse -from .slot_resolutions import SlotResolutions +from .simulation import Simulation +from .resolutions_per_authority_items import ResolutionsPerAuthorityItems +from .simulations_api_response_status import SimulationsApiResponseStatus +from .input import Input from .slot import Slot -from .simulation_result import SimulationResult from .resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCode -from .simulations_api_response_status import SimulationsApiResponseStatus -from .resolutions_per_authority_value_items import ResolutionsPerAuthorityValueItems -from .alexa_execution_info import AlexaExecutionInfo -from .device import Device -from .alexa_response import AlexaResponse -from .session import Session -from .resolutions_per_authority_status import ResolutionsPerAuthorityStatus from .skill_execution_info import SkillExecutionInfo -from .session_mode import SessionMode +from .simulation_result import SimulationResult +from .simulations_api_request import SimulationsApiRequest from .intent import Intent +from .resolutions_per_authority_status import ResolutionsPerAuthorityStatus +from .confirmation_status_type import ConfirmationStatusType +from .simulation_type import SimulationType +from .session import Session +from .slot_resolutions import SlotResolutions +from .device import Device diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_execution_info.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_execution_info.py index 9f58f615..67be97f2 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_execution_info.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_execution_info.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.simulations.intent import IntentV2 - from ask_smapi_model.v2.skill.simulations.alexa_response import AlexaResponseV2 + from ask_smapi_model.v2.skill.simulations.alexa_response import AlexaResponse as AlexaResponse_d40e19a + from ask_smapi_model.v2.skill.simulations.intent import Intent as Intent_779d95a7 class AlexaExecutionInfo(object): @@ -48,7 +48,7 @@ class AlexaExecutionInfo(object): supports_multiple_types = False def __init__(self, alexa_responses=None, considered_intents=None): - # type: (Optional[List[AlexaResponseV2]], Optional[List[IntentV2]]) -> None + # type: (Optional[List[AlexaResponse_d40e19a]], Optional[List[Intent_779d95a7]]) -> None """ :param alexa_responses: diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_response.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_response.py index 573494a2..ab859eb8 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_response.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_response.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.simulations.alexa_response_content import AlexaResponseContentV2 + from ask_smapi_model.v2.skill.simulations.alexa_response_content import AlexaResponseContent as AlexaResponseContent_1f3f9a85 class AlexaResponse(object): @@ -47,7 +47,7 @@ class AlexaResponse(object): supports_multiple_types = False def __init__(self, object_type=None, content=None): - # type: (Optional[str], Optional[AlexaResponseContentV2]) -> None + # type: (Optional[str], Optional[AlexaResponseContent_1f3f9a85]) -> None """ :param object_type: The type of Alexa response diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_response_content.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_response_content.py index ffae86ed..5f4f79f8 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_response_content.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/alexa_response_content.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/confirmation_status_type.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/confirmation_status_type.py index 034ee510..a6752a6d 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/confirmation_status_type.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/confirmation_status_type.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class ConfirmationStatusType(Enum): DENIED = "DENIED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ConfirmationStatusType): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/device.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/device.py index 100e8fc7..1f500a83 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/device.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/device.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/input.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/input.py index b0c07538..fd3d4c50 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/input.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/input.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/intent.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/intent.py index 5b642df8..252c9101 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/intent.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/intent.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.simulations.slot import SlotV2 - from ask_smapi_model.v2.skill.simulations.confirmation_status_type import ConfirmationStatusTypeV2 + from ask_smapi_model.v2.skill.simulations.confirmation_status_type import ConfirmationStatusType as ConfirmationStatusType_c768444b + from ask_smapi_model.v2.skill.simulations.slot import Slot as Slot_3a233be7 class Intent(object): @@ -52,7 +52,7 @@ class Intent(object): supports_multiple_types = False def __init__(self, name=None, confirmation_status=None, slots=None): - # type: (Optional[str], Optional[ConfirmationStatusTypeV2], Optional[Dict[str, SlotV2]]) -> None + # type: (Optional[str], Optional[ConfirmationStatusType_c768444b], Optional[Dict[str, Slot_3a233be7]]) -> None """ :param name: diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_items.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_items.py index 668f37f1..cd3a7f6c 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_items.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_items.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.simulations.resolutions_per_authority_value_items import ResolutionsPerAuthorityValueItemsV2 - from ask_smapi_model.v2.skill.simulations.resolutions_per_authority_status import ResolutionsPerAuthorityStatusV2 + from ask_smapi_model.v2.skill.simulations.resolutions_per_authority_value_items import ResolutionsPerAuthorityValueItems as ResolutionsPerAuthorityValueItems_accac0a3 + from ask_smapi_model.v2.skill.simulations.resolutions_per_authority_status import ResolutionsPerAuthorityStatus as ResolutionsPerAuthorityStatus_fbbac560 class ResolutionsPerAuthorityItems(object): @@ -52,7 +52,7 @@ class ResolutionsPerAuthorityItems(object): supports_multiple_types = False def __init__(self, authority=None, status=None, values=None): - # type: (Optional[str], Optional[ResolutionsPerAuthorityStatusV2], Optional[List[ResolutionsPerAuthorityValueItemsV2]]) -> None + # type: (Optional[str], Optional[ResolutionsPerAuthorityStatus_fbbac560], Optional[List[ResolutionsPerAuthorityValueItems_accac0a3]]) -> None """ :param authority: The name of the authority for the slot values. For custom slot types, this authority label incorporates your skill ID and the slot type name. diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_status.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_status.py index 74fdf4a2..f5bbf14d 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_status.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_status.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.simulations.resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCodeV2 + from ask_smapi_model.v2.skill.simulations.resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCode as ResolutionsPerAuthorityStatusCode_5fb9957b class ResolutionsPerAuthorityStatus(object): @@ -45,7 +45,7 @@ class ResolutionsPerAuthorityStatus(object): supports_multiple_types = False def __init__(self, code=None): - # type: (Optional[ResolutionsPerAuthorityStatusCodeV2]) -> None + # type: (Optional[ResolutionsPerAuthorityStatusCode_5fb9957b]) -> None """An object representing the status of entity resolution for the slot. :param code: diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_status_code.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_status_code.py index 4eb4398a..08e06d20 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_status_code.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_status_code.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -39,7 +39,7 @@ class ResolutionsPerAuthorityStatusCode(Enum): ER_ERROR_EXCEPTION = "ER_ERROR_EXCEPTION" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -55,7 +55,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, ResolutionsPerAuthorityStatusCode): return False @@ -63,6 +63,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_value_items.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_value_items.py index 4f372328..a5aa939f 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_value_items.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/resolutions_per_authority_value_items.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/session.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/session.py index 1f4e67e0..ae354c4f 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/session.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/session.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.simulations.session_mode import SessionModeV2 + from ask_smapi_model.v2.skill.simulations.session_mode import SessionMode as SessionMode_4d4c02fe class Session(object): @@ -45,7 +45,7 @@ class Session(object): supports_multiple_types = False def __init__(self, mode=None): - # type: (Optional[SessionModeV2]) -> None + # type: (Optional[SessionMode_4d4c02fe]) -> None """Session settings for running current simulation. :param mode: diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/session_mode.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/session_mode.py index 9c8d1338..1e131247 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/session_mode.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/session_mode.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -37,7 +37,7 @@ class SessionMode(Enum): FORCE_NEW_SESSION = "FORCE_NEW_SESSION" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -53,7 +53,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SessionMode): return False @@ -61,6 +61,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulation.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulation.py new file mode 100644 index 00000000..1affd6ce --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulation.py @@ -0,0 +1,109 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + from ask_smapi_model.v2.skill.simulations.simulation_type import SimulationType as SimulationType_d7c182c4 + + +class Simulation(object): + """ + Simulation settings for the current simulation request. + + + :param object_type: + :type object_type: (optional) ask_smapi_model.v2.skill.simulations.simulation_type.SimulationType + + """ + deserialized_types = { + 'object_type': 'ask_smapi_model.v2.skill.simulations.simulation_type.SimulationType' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None): + # type: (Optional[SimulationType_d7c182c4]) -> None + """Simulation settings for the current simulation request. + + :param object_type: + :type object_type: (optional) ask_smapi_model.v2.skill.simulations.simulation_type.SimulationType + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + + 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, Simulation): + 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-smapi-model/ask_smapi_model/v2/skill/simulations/simulation_result.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulation_result.py index cbca7a7f..7495eb60 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulation_result.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulation_result.py @@ -21,11 +21,11 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.error import ErrorV2 - from ask_smapi_model.v2.skill.simulations.skill_execution_info import SkillExecutionInfoV2 - from ask_smapi_model.v2.skill.simulations.alexa_execution_info import AlexaExecutionInfoV2 + from ask_smapi_model.v2.skill.simulations.alexa_execution_info import AlexaExecutionInfo as AlexaExecutionInfo_9555ceb9 + from ask_smapi_model.v2.skill.simulations.skill_execution_info import SkillExecutionInfo as SkillExecutionInfo_232ba9f9 + from ask_smapi_model.v2.error import Error as Error_ea6c1a5a class SimulationResult(object): @@ -53,7 +53,7 @@ class SimulationResult(object): supports_multiple_types = False def __init__(self, alexa_execution_info=None, skill_execution_info=None, error=None): - # type: (Optional[AlexaExecutionInfoV2], Optional[SkillExecutionInfoV2], Optional[ErrorV2]) -> None + # type: (Optional[AlexaExecutionInfo_9555ceb9], Optional[SkillExecutionInfo_232ba9f9], Optional[Error_ea6c1a5a]) -> None """ :param alexa_execution_info: diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulation_type.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulation_type.py new file mode 100644 index 00000000..cb989586 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulation_type.py @@ -0,0 +1,66 @@ +# 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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union, Any + from datetime import datetime + + +class SimulationType(Enum): + """ + String indicating the type of simulation request. Possible values are \"DEFAULT\" and \"NFI_ISOLATED_SIMULATION\". \"NFI_ISOLATED_SIMULATION\" is used to test the NFI(Name Free Interaction) enabled skills in isolation. This field is reserved for testing Name Free Interactions(NFI). Skills that are eligible to add NFI can only use this field. To learn more, visit https://developer.amazon.com/en-US/docs/alexa/custom-skills/understand-name-free-interaction-for-custom-skills.html + + + + Allowed enum values: [DEFAULT, NFI_ISOLATED_SIMULATION] + """ + DEFAULT = "DEFAULT" + NFI_ISOLATED_SIMULATION = "NFI_ISOLATED_SIMULATION" + + def to_dict(self): + # type: () -> Dict[str, Any] + """Returns the model properties as a dict""" + result = {self.name: self.value} + return result + + def to_str(self): + # type: () -> str + """Returns the string representation of the model""" + return pprint.pformat(self.value) + + def __repr__(self): + # type: () -> str + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + # type: (Any) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SimulationType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + # type: (Any) -> bool + """Returns true if both objects are not equal""" + return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_request.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_request.py index e19a3de3..3309cf52 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_request.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_request.py @@ -21,11 +21,12 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.simulations.device import DeviceV2 - from ask_smapi_model.v2.skill.simulations.input import InputV2 - from ask_smapi_model.v2.skill.simulations.session import SessionV2 + from ask_smapi_model.v2.skill.simulations.device import Device as Device_6965067 + from ask_smapi_model.v2.skill.simulations.input import Input as Input_87f09a1f + from ask_smapi_model.v2.skill.simulations.simulation import Simulation as Simulation_ee2cc2c7 + from ask_smapi_model.v2.skill.simulations.session import Session as Session_d6e4b037 class SimulationsApiRequest(object): @@ -37,23 +38,27 @@ class SimulationsApiRequest(object): :type device: (optional) ask_smapi_model.v2.skill.simulations.device.Device :param session: :type session: (optional) ask_smapi_model.v2.skill.simulations.session.Session + :param simulation: + :type simulation: (optional) ask_smapi_model.v2.skill.simulations.simulation.Simulation """ deserialized_types = { 'input': 'ask_smapi_model.v2.skill.simulations.input.Input', 'device': 'ask_smapi_model.v2.skill.simulations.device.Device', - 'session': 'ask_smapi_model.v2.skill.simulations.session.Session' + 'session': 'ask_smapi_model.v2.skill.simulations.session.Session', + 'simulation': 'ask_smapi_model.v2.skill.simulations.simulation.Simulation' } # type: Dict attribute_map = { 'input': 'input', 'device': 'device', - 'session': 'session' + 'session': 'session', + 'simulation': 'simulation' } # type: Dict supports_multiple_types = False - def __init__(self, input=None, device=None, session=None): - # type: (Optional[InputV2], Optional[DeviceV2], Optional[SessionV2]) -> None + def __init__(self, input=None, device=None, session=None, simulation=None): + # type: (Optional[Input_87f09a1f], Optional[Device_6965067], Optional[Session_d6e4b037], Optional[Simulation_ee2cc2c7]) -> None """ :param input: @@ -62,12 +67,15 @@ def __init__(self, input=None, device=None, session=None): :type device: (optional) ask_smapi_model.v2.skill.simulations.device.Device :param session: :type session: (optional) ask_smapi_model.v2.skill.simulations.session.Session + :param simulation: + :type simulation: (optional) ask_smapi_model.v2.skill.simulations.simulation.Simulation """ self.__discriminator_value = None # type: str self.input = input self.device = device self.session = session + self.simulation = simulation def to_dict(self): # type: () -> Dict[str, object] diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_response.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_response.py index e765cd22..bbe3f687 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_response.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_response.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.simulations.simulations_api_response_status import SimulationsApiResponseStatusV2 - from ask_smapi_model.v2.skill.simulations.simulation_result import SimulationResultV2 + from ask_smapi_model.v2.skill.simulations.simulation_result import SimulationResult as SimulationResult_363f92e4 + from ask_smapi_model.v2.skill.simulations.simulations_api_response_status import SimulationsApiResponseStatus as SimulationsApiResponseStatus_c561441e class SimulationsApiResponse(object): @@ -52,7 +52,7 @@ class SimulationsApiResponse(object): supports_multiple_types = False def __init__(self, id=None, status=None, result=None): - # type: (Optional[str], Optional[SimulationsApiResponseStatusV2], Optional[SimulationResultV2]) -> None + # type: (Optional[str], Optional[SimulationsApiResponseStatus_c561441e], Optional[SimulationResult_363f92e4]) -> None """ :param id: Id of the simulation resource. diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_response_status.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_response_status.py index fadaf84e..2ab1c693 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_response_status.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/simulations_api_response_status.py @@ -21,7 +21,7 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime @@ -38,7 +38,7 @@ class SimulationsApiResponseStatus(Enum): FAILED = "FAILED" def to_dict(self): - # type: () -> Dict[str, object] + # type: () -> Dict[str, Any] """Returns the model properties as a dict""" result = {self.name: self.value} return result @@ -54,7 +54,7 @@ def __repr__(self): return self.to_str() def __eq__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are equal""" if not isinstance(other, SimulationsApiResponseStatus): return False @@ -62,6 +62,6 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ def __ne__(self, other): - # type: (object) -> bool + # type: (Any) -> bool """Returns true if both objects are not equal""" return not self == other diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/skill_execution_info.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/skill_execution_info.py index 25a7f57e..37d3add4 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/skill_execution_info.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/skill_execution_info.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.invocation import InvocationV2 + from ask_smapi_model.v2.skill.invocation import Invocation as Invocation_bd57c0c9 class SkillExecutionInfo(object): @@ -43,7 +43,7 @@ class SkillExecutionInfo(object): supports_multiple_types = False def __init__(self, invocations=None): - # type: (Optional[List[InvocationV2]]) -> None + # type: (Optional[List[Invocation_bd57c0c9]]) -> None """ :param invocations: diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/slot.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/slot.py index a42092e8..320ecd1c 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/slot.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/slot.py @@ -21,10 +21,10 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.simulations.confirmation_status_type import ConfirmationStatusTypeV2 - from ask_smapi_model.v2.skill.simulations.slot_resolutions import SlotResolutionsV2 + from ask_smapi_model.v2.skill.simulations.slot_resolutions import SlotResolutions as SlotResolutions_137aee8 + from ask_smapi_model.v2.skill.simulations.confirmation_status_type import ConfirmationStatusType as ConfirmationStatusType_c768444b class Slot(object): @@ -56,7 +56,7 @@ class Slot(object): supports_multiple_types = False def __init__(self, name=None, value=None, confirmation_status=None, resolutions=None): - # type: (Optional[str], Optional[str], Optional[ConfirmationStatusTypeV2], Optional[SlotResolutionsV2]) -> None + # type: (Optional[str], Optional[str], Optional[ConfirmationStatusType_c768444b], Optional[SlotResolutions_137aee8]) -> None """ :param name: diff --git a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/slot_resolutions.py b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/slot_resolutions.py index 63837165..acae00ee 100644 --- a/ask-smapi-model/ask_smapi_model/v2/skill/simulations/slot_resolutions.py +++ b/ask-smapi-model/ask_smapi_model/v2/skill/simulations/slot_resolutions.py @@ -21,9 +21,9 @@ if typing.TYPE_CHECKING: - from typing import Dict, List, Optional, Union + from typing import Dict, List, Optional, Union, Any from datetime import datetime - from ask_smapi_model.v2.skill.simulations.resolutions_per_authority_items import ResolutionsPerAuthorityItemsV2 + from ask_smapi_model.v2.skill.simulations.resolutions_per_authority_items import ResolutionsPerAuthorityItems as ResolutionsPerAuthorityItems_57e5779e class SlotResolutions(object): @@ -45,7 +45,7 @@ class SlotResolutions(object): supports_multiple_types = False def __init__(self, resolutions_per_authority=None): - # type: (Optional[List[ResolutionsPerAuthorityItemsV2]]) -> None + # type: (Optional[List[ResolutionsPerAuthorityItems_57e5779e]]) -> None """A resolutions object representing the results of resolving the words captured from the user's utterance. :param resolutions_per_authority: An array of objects representing each possible authority for entity resolution. An authority represents the source for the data provided for the slot. For a custom slot type, the authority is the slot type you defined. diff --git a/ask-smapi-model/setup.py b/ask-smapi-model/setup.py index f2d8a908..6066eae7 100644 --- a/ask-smapi-model/setup.py +++ b/ask-smapi-model/setup.py @@ -19,7 +19,7 @@ here = os.path.abspath(os.path.dirname(__file__)) -about = {} +about = {} # type: ignore with open(os.path.join(here, 'ask_smapi_model', '__version__.py'), 'r', 'utf-8') as f: exec(f.read(), about)