diff --git a/ask-smapi-model/CHANGELOG.rst b/ask-smapi-model/CHANGELOG.rst index 5b85c1c4..3fa39ba2 100644 --- a/ask-smapi-model/CHANGELOG.rst +++ b/ask-smapi-model/CHANGELOG.rst @@ -215,3 +215,10 @@ This release contains the following changes : 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 `__. diff --git a/ask-smapi-model/ask_smapi_model/__version__.py b/ask-smapi-model/ask_smapi_model/__version__.py index 27e63f73..877b9656 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.13.1' +__version__ = '1.14.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'] - +__keywords__ = ['SMAPI SDK', 'ASK SDK', 'Alexa Skills Kit', 'Alexa', 'Models', 'Smapi'] \ No newline at end of file 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 87f0724f..aaaf7b95 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 @@ -66,14 +66,17 @@ from .app_link_interface import AppLinkInterface from .catalog_type import CatalogType from .video_fire_tv_catalog_ingestion import VideoFireTvCatalogIngestion +from .linked_common_schemes import LinkedCommonSchemes from .amazon_conversations_dialog_manager import AMAZONConversationsDialogManager from .flash_briefing_genre import FlashBriefingGenre from .app_link_v2_interface import AppLinkV2Interface +from .linked_android_common_intent import LinkedAndroidCommonIntent from .alexa_presentation_html_interface import AlexaPresentationHtmlInterface from .subscription_payment_frequency import SubscriptionPaymentFrequency from .video_apis_locale import VideoApisLocale from .alexa_for_business_interface_request_name import AlexaForBusinessInterfaceRequestName from .paid_skill_information import PaidSkillInformation +from .android_custom_intent import AndroidCustomIntent from .ssl_certificate_type import SSLCertificateType from .music_request import MusicRequest from .video_catalog_info import VideoCatalogInfo @@ -91,6 +94,7 @@ from .offer_type import OfferType from .alexa_for_business_interface_request import AlexaForBusinessInterfaceRequest from .friendly_name import FriendlyName +from .ios_app_store_common_scheme_name import IOSAppStoreCommonSchemeName from .health_interface import HealthInterface from .authorized_client import AuthorizedClient from .permission_items import PermissionItems @@ -103,10 +107,12 @@ from .locales_by_automatic_cloned_locale import LocalesByAutomaticClonedLocale from .custom_localized_information_dialog_management import CustomLocalizedInformationDialogManagement from .authorized_client_lwa import AuthorizedClientLwa +from .play_store_common_scheme_name import PlayStoreCommonSchemeName from .event_name_type import EventNameType from .video_prompt_name_type import VideoPromptNameType from .voice_profile_feature import VoiceProfileFeature from .tax_information_category import TaxInformationCategory +from .catalog_name import CatalogName from .smart_home_apis import SmartHomeApis from .currency import Currency from .flash_briefing_apis import FlashBriefingApis @@ -130,3 +136,4 @@ from .video_app_interface import VideoAppInterface from .video_apis import VideoApis from .display_interface_template_version import DisplayInterfaceTemplateVersion +from .android_common_intent_name import AndroidCommonIntentName 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 index 416159e4..e31885d3 100644 --- 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 @@ -23,6 +23,8 @@ 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 @@ -33,27 +35,48 @@ class AppLink(object): :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_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_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): - # type: (Optional[List[LinkedApplication_85efe66c]]) -> None + 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] 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/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/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 index 5b72638d..cbc97988 100644 --- 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 @@ -24,6 +24,7 @@ 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 @@ -40,25 +41,29 @@ class LinkedApplication(object): :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' + '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' + '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): - # type: (Optional[CatalogInfo_3fade9c6], Optional[List[object]], Optional[List[object]], Optional[FriendlyName_168112fe]) -> None + 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: @@ -69,6 +74,8 @@ def __init__(self, catalog_info=None, custom_schemes=None, domains=None, friendl :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 @@ -76,6 +83,7 @@ def __init__(self, catalog_info=None, custom_schemes=None, domains=None, friendl 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] 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/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