diff --git a/ask-smapi-model/.gitignore b/ask-smapi-model/.gitignore new file mode 100644 index 0000000..a655050 --- /dev/null +++ b/ask-smapi-model/.gitignore @@ -0,0 +1,64 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/ask-smapi-model/CHANGELOG.rst b/ask-smapi-model/CHANGELOG.rst new file mode 100644 index 0000000..df9e26c --- /dev/null +++ b/ask-smapi-model/CHANGELOG.rst @@ -0,0 +1,8 @@ +========= +CHANGELOG +========= + +1.0.0 +----- + +* Initial release of ask smapi models. \ No newline at end of file diff --git a/ask-smapi-model/LICENSE b/ask-smapi-model/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/ask-smapi-model/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. diff --git a/ask-smapi-model/MANIFEST.in b/ask-smapi-model/MANIFEST.in new file mode 100644 index 0000000..bd2e07a --- /dev/null +++ b/ask-smapi-model/MANIFEST.in @@ -0,0 +1,7 @@ +include README.rst +include CHANGELOG.rst +include LICENSE +include requirements.txt +include THIRD-PARTY.txt +include NOTICE.txt +recursive-include ask_smapi_model py.typed \ No newline at end of file diff --git a/ask-smapi-model/NOTICE.txt b/ask-smapi-model/NOTICE.txt new file mode 100644 index 0000000..e69de29 diff --git a/ask-smapi-model/README.rst b/ask-smapi-model/README.rst new file mode 100644 index 0000000..4aa1dab --- /dev/null +++ b/ask-smapi-model/README.rst @@ -0,0 +1,18 @@ +================================================= +ASK SMAPI Model - Model definitions for SMAPI SDK +================================================= + +ask-smapi-model is the model definitions package for Skill Management APIs (SMAPI) by +the Software Development Kit (SDK) team for Python. It allows Python developers +to model the requests, responses and related JSON structures, as defined in +`SMAPI Documentation `_. + +Getting Help +------------ + +The model definitions in this package are auto-generated. The issues and pull requests +on the repository are not monitored and may get closed without investigation. Please use +these community resources for getting help: + +* Use the `ASK SDK `_ for building skills and filing bugs. +* Request and vote for `Alexa features `_! diff --git a/ask-smapi-model/THIRD-PARTY.txt b/ask-smapi-model/THIRD-PARTY.txt new file mode 100644 index 0000000..9599852 --- /dev/null +++ b/ask-smapi-model/THIRD-PARTY.txt @@ -0,0 +1,560 @@ +ASK SMAPI SDK for Python includes the following third-party software/licensing: + +** python-dateutil; version 2.8.1 -- https://github.com/dateutil/dateutil +Copyright 2017- Paul Ganssle +Copyright 2017- dateutil contributors (see AUTHORS file) +** requests; version 3.7.4 -- https://github.com/psf/requests +Copyright 2019 Kenneth Reitz + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND +DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, and + distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by the + copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all other + entities that control, are controlled by, or are under common control + with that entity. For the purposes of this definition, "control" means + (i) the power, direct or indirect, to cause the direction or management + of such entity, whether by contract or otherwise, or (ii) ownership of + fifty percent (50%) or more of the outstanding shares, or (iii) + beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity exercising + permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation source, + and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but not limited + to compiled object code, generated documentation, and conversions to + other media types. + + "Work" shall mean the work of authorship, whether in Source or Object + form, made available under the License, as indicated by a copyright + notice that is included in or attached to the work (an example is + provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object form, + that is based on (or derived from) the Work and for which the editorial + revisions, annotations, elaborations, or other modifications represent, + as a whole, an original work of authorship. For the purposes of this + License, Derivative Works shall not include works that remain separable + from, or merely link (or bind by name) to the interfaces of, the Work and + Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including the original + version of the Work and any modifications or additions to that Work or + Derivative Works thereof, that is intentionally submitted to Licensor for + inclusion in the Work by the copyright owner or by an individual or Legal + Entity authorized to submit on behalf of the copyright owner. For the + purposes of this definition, "submitted" means any form of electronic, + verbal, or written communication sent to the Licensor or its + representatives, including but not limited to communication on electronic + mailing lists, source code control systems, and issue tracking systems + that are managed by, or on behalf of, the Licensor for the purpose of + discussing and improving the Work, but excluding communication that is + conspicuously marked or otherwise designated in writing by the copyright + owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity on + behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this + License, each Contributor hereby grants to You a perpetual, worldwide, + non-exclusive, no-charge, royalty-free, irrevocable copyright license to + reproduce, prepare Derivative Works of, publicly display, publicly perform, + sublicense, and distribute the Work and such Derivative Works in Source or + Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this + License, each Contributor hereby grants to You a perpetual, worldwide, + non-exclusive, no-charge, royalty-free, irrevocable (except as stated in + this section) patent license to make, have made, use, offer to sell, sell, + import, and otherwise transfer the Work, where such license applies only to + those patent claims licensable by such Contributor that are necessarily + infringed by their Contribution(s) alone or by combination of their + Contribution(s) with the Work to which such Contribution(s) was submitted. + If You institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work or a + Contribution incorporated within the Work constitutes direct or contributory + patent infringement, then any patent licenses granted to You under this + License for that Work shall terminate as of the date such litigation is + filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or + Derivative Works thereof in any medium, with or without modifications, and + in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a + copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating + that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You + distribute, all copyright, patent, trademark, and attribution notices + from the Source form of the Work, excluding those notices that do not + pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must include + a readable copy of the attribution notices contained within such NOTICE + file, excluding those notices that do not pertain to any part of the + Derivative Works, in at least one of the following places: within a + NOTICE text file distributed as part of the Derivative Works; within the + Source form or documentation, if provided along with the Derivative + Works; or, within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents of the + NOTICE file are for informational purposes only and do not modify the + License. You may add Your own attribution notices within Derivative Works + that You distribute, alongside or as an addendum to the NOTICE text from + the Work, provided that such additional attribution notices cannot be + construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may + provide additional or different license terms and conditions for use, + reproduction, or distribution of Your modifications, or for any such + Derivative Works as a whole, provided Your use, reproduction, and + distribution of the Work otherwise complies with the conditions stated in + this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any + Contribution intentionally submitted for inclusion in the Work by You to the + Licensor shall be under the terms and conditions of this License, without + any additional terms or conditions. Notwithstanding the above, nothing + herein shall supersede or modify the terms of any separate license agreement + you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, except + as required for reasonable and customary use in describing the origin of the + Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in + writing, Licensor provides the Work (and each Contributor provides its + Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied, including, without limitation, any + warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or + FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining + the appropriateness of using or redistributing the Work and assume any risks + associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether + in tort (including negligence), contract, or otherwise, unless required by + applicable law (such as deliberate and grossly negligent acts) or agreed to + in writing, shall any Contributor be liable to You for damages, including + any direct, indirect, special, incidental, or consequential damages of any + character arising as a result of this License or out of the use or inability + to use the Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all other + commercial damages or losses), even if such Contributor has been advised of + the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work + or Derivative Works thereof, You may choose to offer, and charge a fee for, + acceptance of support, warranty, indemnity, or other liability obligations + and/or rights consistent with this License. However, in accepting such + obligations, You may act only on Your own behalf and on Your sole + responsibility, not on behalf of any other Contributor, and only if You + agree to indemnify, defend, and hold each Contributor harmless for any + liability incurred by, or claims asserted against, such Contributor by + reason of your accepting any such warranty or additional liability. END OF + TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification +within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License 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. + +* For python-dateutil see also this required NOTICE: + Copyright 2017- Paul Ganssle + Copyright 2017- dateutil contributors (see AUTHORS file) +* For requests see also this required NOTICE: + Copyright 2019 Kenneth Reitz + +------ + +** enum34; version 1.1.6 -- https://pypi.python.org/pypi/enum34/1.1.6 +Copyright (c) 2013, Ethan Furman. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + Neither the name Ethan Furman nor the names of any + contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------ + +** setuptools; version 21.0.0 -- https://github.com/pypa/setuptools +Copyright (C) 2016 Jason R Coombs + +Copyright (C) 2016 Jason R Coombs + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +------ + +** python-six; version 1.1.0 -- https://github.com/benjaminp/six +Copyright (c) 2010-2014 Benjamin Peterson + + +Copyright (c) 2010-2019 Benjamin Peterson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------ + +** typing; version 3.7.4.1 -- https://github.com/python/typing +No copyright + +A. HISTORY OF THE SOFTWARE +========================== + +Python was created in the early 1990s by Guido van Rossum at Stichting +Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands +as a successor of a language called ABC. Guido remains Python's +principal author, although it includes many contributions from others. + +In 1995, Guido continued his work on Python at the Corporation for +National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) +in Reston, Virginia where he released several versions of the +software. + +In May 2000, Guido and the Python core development team moved to +BeOpen.com to form the BeOpen PythonLabs team. In October of the same +year, the PythonLabs team moved to Digital Creations (now Zope +Corporation, see http://www.zope.com). In 2001, the Python Software +Foundation (PSF, see http://www.python.org/psf/) was formed, a +non-profit organization created specifically to own Python-related +Intellectual Property. Zope Corporation is a sponsoring member of +the PSF. + +All Python releases are Open Source (see http://www.opensource.org for +the Open Source Definition). Historically, most, but not all, Python +releases have also been GPL-compatible; the table below summarizes +the various releases. + + Release Derived Year Owner GPL- + from compatible? (1) + + 0.9.0 thru 1.2 1991-1995 CWI yes + 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes + 1.6 1.5.2 2000 CNRI no + 2.0 1.6 2000 BeOpen.com no + 1.6.1 1.6 2001 CNRI yes (2) + 2.1 2.0+1.6.1 2001 PSF no + 2.0.1 2.0+1.6.1 2001 PSF yes + 2.1.1 2.1+2.0.1 2001 PSF yes + 2.1.2 2.1.1 2002 PSF yes + 2.1.3 2.1.2 2002 PSF yes + 2.2 and above 2.1.1 2001-now PSF yes + +Footnotes: + +(1) GPL-compatible doesn't mean that we're distributing Python under + the GPL. All Python licenses, unlike the GPL, let you distribute + a modified version without making your changes open source. The + GPL-compatible licenses make it possible to combine Python with + other software that is released under the GPL; the others don't. + +(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, + because its license has a choice of law clause. According to + CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 + is "not incompatible" with the GPL. + +Thanks to the many outside volunteers who have worked under Guido's +direction to make these releases possible. + + +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON +=============================================================== + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, +2010, +2011, 2012, 2013, 2014 Python Software Foundation; All Rights Reserved" are +retained in Python alone or in any derivative version prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 +------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 +--------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the Internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the Internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 +-------------------------------------------------- + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, +The Netherlands. All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/ask-smapi-model/ask_smapi_model/__init__.py b/ask-smapi-model/ask_smapi_model/__init__.py new file mode 100644 index 0000000..c557047 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/__init__.py @@ -0,0 +1,16 @@ +# 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 + diff --git a/ask-smapi-model/ask_smapi_model/__version__.py b/ask-smapi-model/ask_smapi_model/__version__.py new file mode 100644 index 0000000..9353c85 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/__version__.py @@ -0,0 +1,22 @@ +# +# 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. +# + +__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.0.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/py.typed b/ask-smapi-model/ask_smapi_model/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/ask-smapi-model/ask_smapi_model/services/__init__.py b/ask-smapi-model/ask_smapi_model/services/__init__.py new file mode 100644 index 0000000..c557047 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/services/__init__.py @@ -0,0 +1,16 @@ +# 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 + diff --git a/ask-smapi-model/ask_smapi_model/services/py.typed b/ask-smapi-model/ask_smapi_model/services/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/ask-smapi-model/ask_smapi_model/services/skill_management/__init__.py b/ask-smapi-model/ask_smapi_model/services/skill_management/__init__.py new file mode 100644 index 0000000..b846f01 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/services/skill_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 .skill_management_service_client import SkillManagementServiceClient diff --git a/ask-smapi-model/ask_smapi_model/services/skill_management/py.typed b/ask-smapi-model/ask_smapi_model/services/skill_management/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..4a9b5d3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/services/skill_management/skill_management_service_client.py @@ -0,0 +1,6433 @@ +# 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_runtime.base_service_client import BaseServiceClient +from ask_sdk_model_runtime.api_configuration import ApiConfiguration +from ask_sdk_model_runtime.service_client_response import ServiceClientResponse +from ask_sdk_model_runtime.api_response import ApiResponse + +from ask_sdk_model_runtime.authentication_configuration import AuthenticationConfiguration +from ask_sdk_model_runtime.lwa.lwa_client import LwaClient + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Union, Any + from datetime import datetime + from ask_smapi_model.v1.catalog.create_content_upload_url_response import CreateContentUploadUrlResponse + from ask_smapi_model.v1.skill.history.intent_requests import IntentRequests + from ask_smapi_model.v1.skill.history.dialog_act_name import DialogActName + from ask_smapi_model.v1.skill.validations.validations_api_response import ValidationsApiResponse + from ask_smapi_model.v1.skill.upload_response import UploadResponse + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_status import CatalogStatus + from ask_smapi_model.v1.skill.simulations.simulations_api_request import SimulationsApiRequest + from ask_smapi_model.v1.skill.interaction_model.version.catalog_values import CatalogValues + from ask_smapi_model.v1.skill.certification.certification_response import CertificationResponse + from ask_smapi_model.v1.skill.history.intent_confidence_bin import IntentConfidenceBin + from ask_smapi_model.v1.skill.create_skill_request import CreateSkillRequest + from ask_smapi_model.v1.skill.manifest.skill_manifest_envelope import SkillManifestEnvelope + from ask_smapi_model.v1.catalog.upload.get_content_upload_response import GetContentUploadResponse + from ask_smapi_model.v1.skill.evaluations.profile_nlu_request import ProfileNluRequest + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission import HostedSkillPermission + from ask_smapi_model.v1.isp.update_in_skill_product_request import UpdateInSkillProductRequest + from ask_smapi_model.v1.skill.interaction_model.catalog.update_request import UpdateRequest + from ask_smapi_model.v1.skill.interaction_model.catalog.definition_data import DefinitionData + import str + from ask_smapi_model.v1.skill.interaction_model.catalog.list_catalog_response import ListCatalogResponse + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_metadata import HostedSkillMetadata + from ask_smapi_model.v1.error import Error + from ask_smapi_model.v1.skill.list_skill_response import ListSkillResponse + from ask_smapi_model.v1.skill.beta_test.testers.list_testers_response import ListTestersResponse + from ask_smapi_model.v1.stage_type import StageType + from ask_smapi_model.v1.skill.history.locale_in_query import LocaleInQuery + from ask_smapi_model.v1.skill.simulations.simulations_api_response import SimulationsApiResponse + from ask_smapi_model.v1.bad_request_error import BadRequestError + from ask_smapi_model.v1.skill.evaluations.profile_nlu_response import ProfileNluResponse + from ask_smapi_model.v1.skill.interaction_model.interaction_model_data import InteractionModelData + from ask_smapi_model.v1.skill.interaction_model.version.version_data import VersionData + from ask_smapi_model.v1.isp.create_in_skill_product_request import CreateInSkillProductRequest + from ask_smapi_model.v1.skill.beta_test.testers.testers_list import TestersList + from ask_smapi_model.v1.skill.history.interaction_type import InteractionType + from ask_smapi_model.v1.skill.create_skill_response import CreateSkillResponse + from ask_smapi_model.v1.skill.update_skill_with_package_request import UpdateSkillWithPackageRequest + from ask_smapi_model.v1.catalog.upload.catalog_upload_base import CatalogUploadBase + from ask_smapi_model.v1.catalog.create_content_upload_url_request import CreateContentUploadUrlRequest + from ask_smapi_model.v1.skill.export_response import ExportResponse + from ask_smapi_model.v1.skill.beta_test.test_body import TestBody + from ask_smapi_model.v1.isp.product_response import ProductResponse + from ask_smapi_model.v1.skill.validations.validations_api_request import ValidationsApiRequest + from ask_smapi_model.v1.isp.associated_skill_response import AssociatedSkillResponse + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials_list import HostedSkillRepositoryCredentialsList + from ask_smapi_model.v1.skill.metrics.get_metric_data_response import GetMetricDataResponse + from ask_smapi_model.v1.skill.beta_test.beta_test import BetaTest + from ask_smapi_model.v1.isp.in_skill_product_summary_response import InSkillProductSummaryResponse + from ask_smapi_model.v1.skill.private.list_private_distribution_accounts_response import ListPrivateDistributionAccountsResponse + from ask_smapi_model.v1.skill.account_linking.account_linking_request import AccountLinkingRequest + from ask_smapi_model.v1.skill.withdraw_request import WithdrawRequest + from ask_smapi_model.v1.vendor_management.vendors import Vendors + from ask_smapi_model.v1.skill.interaction_model.version.catalog_version_data import CatalogVersionData + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials_request import HostedSkillRepositoryCredentialsRequest + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_definition_output import CatalogDefinitionOutput + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_response import CatalogResponse + from ask_smapi_model.v1.skill.import_response import ImportResponse + from ask_smapi_model.v1.skill.interaction_model.version.catalog_update import CatalogUpdate + from ask_smapi_model.v1.skill.standardized_error import StandardizedError + from ask_smapi_model.v1.skill.history.publication_status import PublicationStatus + from ask_smapi_model.v1.skill.submit_skill_for_certification_request import SubmitSkillForCertificationRequest + from ask_smapi_model.v1.skill.skill_status import SkillStatus + from ask_smapi_model.v1.skill.account_linking.account_linking_response import AccountLinkingResponse + from ask_smapi_model.v1.isp.in_skill_product_definition_response import InSkillProductDefinitionResponse + from ask_smapi_model.v1.skill.ssl_certificate_payload import SSLCertificatePayload + from ask_smapi_model.v1.isp.list_in_skill_product_response import ListInSkillProductResponse + from ask_smapi_model.v1.skill.interaction_model.version.list_response import ListResponse + from ask_smapi_model.v1.skill.certification.list_certifications_response import ListCertificationsResponse + from ask_smapi_model.v1.skill.create_skill_with_package_request import CreateSkillWithPackageRequest + + +class SkillManagementServiceClient(BaseServiceClient): + """ServiceClient for calling the SkillManagementService APIs. + + :param api_configuration: Instance of ApiConfiguration + :type api_configuration: ask_sdk_model_runtime.api_configuration.ApiConfiguration + """ + def __init__(self, api_configuration, authentication_configuration, lwa_client=None): + # type: (ApiConfiguration, AuthenticationConfiguration, LwaClient) -> None + """ + :param api_configuration: Instance of :py:class:`ask_sdk_model_runtime.api_configuration.ApiConfiguration` + :type api_configuration: ask_sdk_model_runtime.api_configuration.ApiConfiguration + :param authentication_configuration: Instance of :py:class:`ask_sdk_model_runtime.authentication_configuration.AuthenticationConfiguration` + :type api_configuration: ask_sdk_model_runtime.authentication_configuration.AuthenticationConfiguration + :param lwa_client: (Optional) Instance of :py:class:`ask_sdk_model_runtime.lwa.LwaClient`, + can be passed when the LwaClient configuration is different from the authentication + and api configuration passed + :type lwa_client: ask_sdk_model_runtime.lwa.LwaClient + """ + super(SkillManagementServiceClient, self).__init__(api_configuration) + 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='refresh_token') + else: + self._lwa_service_client = lwa_client + + def create_catalog_upload_v1(self, catalog_id, catalog_upload_request_body, **kwargs): + # type: (str, CatalogUploadBase, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + Create new upload + Create a new upload for a catalog and returns location to track the upload process. + + :param catalog_id: (required) Unique identifier of the catalog + :type catalog_id: str + :param catalog_upload_request_body: (required) 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, Error, BadRequestError] + """ + operation_name = "create_catalog_upload_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_id` when calling `" + operation_name + "`") + # verify the required parameter 'catalog_upload_request_body' is set + if ('catalog_upload_request_body' not in params) or (params['catalog_upload_request_body'] is None): + raise ValueError( + "Missing the required parameter `catalog_upload_request_body` when calling `" + operation_name + "`") + + resource_path = '/v1/catalogs/{catalogId}/uploads' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'catalog_upload_request_body' in params: + body_params = params['catalog_upload_request_body'] + header_params.append(('Content-type', 'application/json')) + + # 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="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.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=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="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 + + + def get_content_upload_by_id_v1(self, catalog_id, upload_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, Error, GetContentUploadResponse, BadRequestError] + """ + 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) Unique identifier of the catalog + :type catalog_id: str + :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, Error, GetContentUploadResponse, BadRequestError] + """ + operation_name = "get_content_upload_by_id_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_id` when calling `" + operation_name + "`") + # verify the required parameter 'upload_id' is set + if ('upload_id' not in params) or (params['upload_id'] is None): + raise ValueError( + "Missing the required parameter `upload_id` when calling `" + operation_name + "`") + + resource_path = '/v1/catalogs/{catalogId}/uploads/{uploadId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_id'] + if 'upload_id' in params: + path_params['uploadId'] = params['upload_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.catalog.upload.get_content_upload_response.GetContentUploadResponse", status_code=200, message="successful operation")) + 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=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.catalog.upload.get_content_upload_response.GetContentUploadResponse") + + 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, CreateContentUploadUrlRequest, **Any) -> Union[ApiResponse, CreateContentUploadUrlResponse, Error, BadRequestError] + """ + Generate preSigned urls to upload data + + :param catalog_id: (required) 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, CreateContentUploadUrlResponse, Error, BadRequestError] + """ + operation_name = "generate_catalog_upload_url_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_id` when calling `" + operation_name + "`") + # verify the required parameter 'generate_catalog_upload_url_request_body' is set + if ('generate_catalog_upload_url_request_body' not in params) or (params['generate_catalog_upload_url_request_body'] is None): + raise ValueError( + "Missing the required parameter `generate_catalog_upload_url_request_body` when calling `" + operation_name + "`") + + resource_path = '/v1/catalogs/{catalogId}/urls' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'generate_catalog_upload_url_request_body' in params: + body_params = params['generate_catalog_upload_url_request_body'] + header_params.append(('Content-type', 'application/json')) + + # 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.catalog.create_content_upload_url_response.CreateContentUploadUrlResponse", status_code=201, message="Successful operation.")) + 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=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="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.catalog.create_content_upload_url_response.CreateContentUploadUrlResponse") + + 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, Error, ListInSkillProductResponse, BadRequestError] + """ + Get the list of in-skill products for the vendor. + + :param vendor_id: (required) The vendor ID. + :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 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. + :type stage: str + :param object_type: Type of in-skill product to filter on. + :type object_type: str + :param reference_name: Filter in-skill products by reference name. + :type reference_name: str + :param status: Status of in-skill product. + :type status: str + :param is_associated_with_skill: Filter in-skill products by whether or not they are associated to a skill. + :type is_associated_with_skill: 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, Error, ListInSkillProductResponse, BadRequestError] + """ + operation_name = "get_isp_list_for_vendor_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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/inSkillProducts' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + + query_params = [] # type: List + if 'vendor_id' in params: + query_params.append(('vendorId', params['vendor_id'])) + 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 'product_id' in params: + query_params.append(('productId', params['product_id'])) + if 'stage' in params: + query_params.append(('stage', params['stage'])) + if 'object_type' in params: + query_params.append(('type', params['object_type'])) + if 'reference_name' in params: + query_params.append(('referenceName', params['reference_name'])) + if 'status' in params: + query_params.append(('status', params['status'])) + if 'is_associated_with_skill' in params: + query_params.append(('isAssociatedWithSkill', params['is_associated_with_skill'])) + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.isp.list_in_skill_product_response.ListInSkillProductResponse", status_code=200, message="Response contains list of in-skill products for the specified vendor 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=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="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.isp.list_in_skill_product_response.ListInSkillProductResponse") + + if full_response: + return api_response + return api_response.body + + def create_isp_for_vendor_v1(self, create_in_skill_product_request, **kwargs): + # type: (CreateInSkillProductRequest, **Any) -> Union[ApiResponse, ProductResponse, Error, BadRequestError] + """ + Creates a new in-skill product for given vendorId. + + :param create_in_skill_product_request: (required) defines the request body for createInSkillProduct API. + :type create_in_skill_product_request: ask_smapi_model.v1.isp.create_in_skill_product_request.CreateInSkillProductRequest + :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, ProductResponse, Error, BadRequestError] + """ + operation_name = "create_isp_for_vendor_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'create_in_skill_product_request' is set + if ('create_in_skill_product_request' not in params) or (params['create_in_skill_product_request'] is None): + raise ValueError( + "Missing the required parameter `create_in_skill_product_request` when calling `" + operation_name + "`") + + resource_path = '/v1/inSkillProducts' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'create_in_skill_product_request' in params: + body_params = params['create_in_skill_product_request'] + header_params.append(('Content-type', 'application/json')) + + # 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.isp.product_response.ProductResponse", status_code=201, message="Success.")) + 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=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="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.isp.product_response.ProductResponse") + + 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, Error, BadRequestError] + """ + Disassociates an in-skill product from a skill. + + :param product_id: (required) The in-skill product ID. + :type product_id: str + :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, Error, BadRequestError] + """ + operation_name = "disassociate_isp_with_skill_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'product_id' is set + if ('product_id' not in params) or (params['product_id'] is None): + raise ValueError( + "Missing the required parameter `product_id` 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/inSkillProducts/{productId}/skills/{skillId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'product_id' in params: + path_params['productId'] = params['product_id'] + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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="Success. No content.")) + 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.bad_request_error.BadRequestError", status_code=403, message="Request is forbidden.")) + 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", + 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 + + + def associate_isp_with_skill_v1(self, product_id, skill_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + Associates an in-skill product with a skill. + + :param product_id: (required) The in-skill product ID. + :type product_id: str + :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, Error, BadRequestError] + """ + operation_name = "associate_isp_with_skill_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'product_id' is set + if ('product_id' not in params) or (params['product_id'] is None): + raise ValueError( + "Missing the required parameter `product_id` 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/inSkillProducts/{productId}/skills/{skillId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'product_id' in params: + path_params['productId'] = params['product_id'] + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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="Success. No content.")) + 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.bad_request_error.BadRequestError", status_code=403, message="Request is forbidden.")) + 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="PUT", + 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 + + + def delete_isp_for_product_v1(self, product_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + 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. + + :param product_id: (required) The in-skill product ID. + :type product_id: str + :param stage: (required) Stage for skill. + :type stage: str + :param if_match: Request header that specified an entity tag. The server will update the resource only if the eTag matches with the resource's current eTag. + :type if_match: 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, Error, BadRequestError] + """ + operation_name = "delete_isp_for_product_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'product_id' is set + if ('product_id' not in params) or (params['product_id'] is None): + raise ValueError( + "Missing the required parameter `product_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/inSkillProducts/{productId}/stages/{stage}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'product_id' in params: + path_params['productId'] = params['product_id'] + if 'stage' in params: + path_params['stage'] = params['stage'] + + query_params = [] # type: List + + header_params = [] # type: List + if 'if_match' in params: + header_params.append(('If-Match', params['if_match'])) + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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="Success. No content.")) + 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.bad_request_error.BadRequestError", status_code=403, message="Request is forbidden.")) + 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=412, message="Precondition failed.")) + 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", + 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 + + + def reset_entitlement_for_product_v1(self, product_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + Resets the entitlement(s) of the Product for the current user. + + :param product_id: (required) The in-skill product ID. + :type product_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, Error, BadRequestError] + """ + operation_name = "reset_entitlement_for_product_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'product_id' is set + if ('product_id' not in params) or (params['product_id'] is None): + raise ValueError( + "Missing the required parameter `product_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/inSkillProducts/{productId}/stages/{stage}/entitlement' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'product_id' in params: + path_params['productId'] = params['product_id'] + if 'stage' in params: + path_params['stage'] = params['stage'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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="Success. No content.")) + 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.bad_request_error.BadRequestError", status_code=403, message="Request is forbidden.")) + 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=412, message="Precondition failed.")) + 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", + 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 + + + def get_isp_definition_v1(self, product_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, Error, InSkillProductDefinitionResponse, BadRequestError] + """ + Returns the in-skill product definition for given productId. + + :param product_id: (required) The in-skill product ID. + :type product_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, Error, InSkillProductDefinitionResponse, BadRequestError] + """ + operation_name = "get_isp_definition_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'product_id' is set + if ('product_id' not in params) or (params['product_id'] is None): + raise ValueError( + "Missing the required parameter `product_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/inSkillProducts/{productId}/stages/{stage}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'product_id' in params: + path_params['productId'] = params['product_id'] + if 'stage' in params: + path_params['stage'] = params['stage'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.isp.in_skill_product_definition_response.InSkillProductDefinitionResponse", status_code=200, message="Response contains the latest version of an in-skill product for the specified 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="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.isp.in_skill_product_definition_response.InSkillProductDefinitionResponse") + + 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, UpdateInSkillProductRequest, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + Updates in-skill product definition for given productId. Only development stage supported. + + :param product_id: (required) The in-skill product ID. + :type product_id: str + :param stage: (required) Stage for skill. + :type stage: str + :param update_in_skill_product_request: (required) defines the request body for updateInSkillProduct API. + :type update_in_skill_product_request: ask_smapi_model.v1.isp.update_in_skill_product_request.UpdateInSkillProductRequest + :param if_match: Request header that specified an entity tag. The server will update the resource only if the eTag matches with the resource's current eTag. + :type if_match: 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, Error, BadRequestError] + """ + operation_name = "update_isp_for_product_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'product_id' is set + if ('product_id' not in params) or (params['product_id'] is None): + raise ValueError( + "Missing the required parameter `product_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 + "`") + # verify the required parameter 'update_in_skill_product_request' is set + if ('update_in_skill_product_request' not in params) or (params['update_in_skill_product_request'] is None): + raise ValueError( + "Missing the required parameter `update_in_skill_product_request` when calling `" + operation_name + "`") + + resource_path = '/v1/inSkillProducts/{productId}/stages/{stage}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'product_id' in params: + path_params['productId'] = params['product_id'] + if 'stage' in params: + path_params['stage'] = params['stage'] + + query_params = [] # type: List + + header_params = [] # type: List + if 'if_match' in params: + header_params.append(('If-Match', params['if_match'])) + + body_params = None + if 'update_in_skill_product_request' in params: + body_params = params['update_in_skill_product_request'] + header_params.append(('Content-type', 'application/json')) + + # 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="Success.")) + 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.bad_request_error.BadRequestError", status_code=403, message="Request is forbidden.")) + 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=412, message="Precondition failed.")) + 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="PUT", + 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 + + + def get_isp_associated_skills_v1(self, product_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, AssociatedSkillResponse, Error] + """ + Get the associated skills for the in-skill product. + + :param product_id: (required) The in-skill product ID. + :type product_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, AssociatedSkillResponse, Error] + """ + operation_name = "get_isp_associated_skills_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'product_id' is set + if ('product_id' not in params) or (params['product_id'] is None): + raise ValueError( + "Missing the required parameter `product_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/inSkillProducts/{productId}/stages/{stage}/skills' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'product_id' in params: + path_params['productId'] = params['product_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 + header_params.append(('Content-type', 'application/json')) + + # 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.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.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="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.isp.associated_skill_response.AssociatedSkillResponse") + + 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, InSkillProductSummaryResponse, Error] + """ + Get the summary information for an in-skill product. + + :param product_id: (required) The in-skill product ID. + :type product_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, InSkillProductSummaryResponse, Error] + """ + operation_name = "get_isp_summary_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'product_id' is set + if ('product_id' not in params) or (params['product_id'] is None): + raise ValueError( + "Missing the required parameter `product_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/inSkillProducts/{productId}/stages/{stage}/summary' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'product_id' in params: + path_params['productId'] = params['product_id'] + if 'stage' in params: + path_params['stage'] = params['stage'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.isp.in_skill_product_summary_response.InSkillProductSummaryResponse", status_code=200, message="Returns current in-skill product summary for productId.")) + 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="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.isp.in_skill_product_summary_response.InSkillProductSummaryResponse") + + 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, StandardizedError, BadRequestError] + """ + Delete the catalog. + + :param catalog_id: (required) 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, StandardizedError, BadRequestError] + """ + operation_name = "delete_interaction_model_catalog_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_id` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/api/custom/interactionModel/catalogs/{catalogId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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 catalog is deleted.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="The catalog 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 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=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 + + + def get_interaction_model_catalog_definition_v1(self, catalog_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, CatalogDefinitionOutput, StandardizedError, BadRequestError] + """ + get the catalog definition + + :param catalog_id: (required) 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, CatalogDefinitionOutput, StandardizedError, BadRequestError] + """ + operation_name = "get_interaction_model_catalog_definition_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_id` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/api/custom/interactionModel/catalogs/{catalogId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.catalog.catalog_definition_output.CatalogDefinitionOutput", status_code=200, message="the catalog definition")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.bad_request_error.BadRequestError", status_code=400, message="The catalog 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 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=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.catalog.catalog_definition_output.CatalogDefinitionOutput") + + if full_response: + return api_response + return api_response.body + + def update_interaction_model_catalog_v1(self, catalog_id, update_request, **kwargs): + # type: (str, UpdateRequest, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + update description and vendorGuidance string for certain version of a catalog. + + :param catalog_id: (required) 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, StandardizedError, BadRequestError] + """ + operation_name = "update_interaction_model_catalog_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_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/catalogs/{catalogId}/update' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_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')) + + # 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 catalog defined for the catalogId.")) + 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 + + + def get_interaction_model_catalog_update_status_v1(self, catalog_id, update_request_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError, CatalogStatus] + """ + Get the status of catalog resource and its sub-resources for a given catalogId. + + :param catalog_id: (required) Unique identifier of the catalog + :type catalog_id: str + :param update_request_id: (required) The identifier for catalog 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, StandardizedError, BadRequestError, CatalogStatus] + """ + operation_name = "get_interaction_model_catalog_update_status_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_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/catalogs/{catalogId}/updateRequest/{updateRequestId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_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')) + + # 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.catalog.catalog_status.CatalogStatus", status_code=200, message="Returns the build status and error codes for the given catalogId")) + 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="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", + 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.catalog.catalog_status.CatalogStatus") + + if full_response: + return api_response + return api_response.body + + def create_interaction_model_catalog_version_v1(self, catalog_id, catalog, **kwargs): + # type: (str, VersionData, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Create a new version of catalog entity for the given catalogId. + + :param catalog_id: (required) 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, StandardizedError, BadRequestError] + """ + operation_name = "create_interaction_model_catalog_version_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_id` when calling `" + operation_name + "`") + # verify the required parameter 'catalog' is set + if ('catalog' not in params) or (params['catalog'] is None): + raise ValueError( + "Missing the required parameter `catalog` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/api/custom/interactionModel/catalogs/{catalogId}/versions' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'catalog' in params: + body_params = params['catalog'] + header_params.append(('Content-type', 'application/json')) + + # 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 catalog 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 catalog 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 + + + def delete_interaction_model_catalog_version_v1(self, catalog_id, version, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Delete catalog version. + + :param catalog_id: (required) 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, StandardizedError, BadRequestError] + """ + operation_name = "delete_interaction_model_catalog_version_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_id` 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/api/custom/interactionModel/catalogs/{catalogId}/versions/{version}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_id'] + if 'version' in params: + path_params['version'] = params['version'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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; Confirms that version 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="There is no catalog version for this 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=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 + + + def get_interaction_model_catalog_version_v1(self, catalog_id, version, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError, CatalogVersionData] + """ + Get catalog version data of given catalog version. + + :param catalog_id: (required) 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, StandardizedError, BadRequestError, CatalogVersionData] + """ + operation_name = "get_interaction_model_catalog_version_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_id` 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/api/custom/interactionModel/catalogs/{catalogId}/versions/{version}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_id'] + if 'version' in params: + path_params['version'] = params['version'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.version.catalog_version_data.CatalogVersionData", status_code=200, message="Returns the catalog version metadata for the given catalogId and version.")) + 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=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.version.catalog_version_data.CatalogVersionData") + + 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, StandardizedError, BadRequestError] + """ + Update description and vendorGuidance string for certain version of a catalog. + + :param catalog_id: (required) Unique identifier of the catalog + :type catalog_id: str + :param version: (required) Version for interaction model. + :type version: str + :param catalog_update: + :type catalog_update: ask_smapi_model.v1.skill.interaction_model.version.catalog_update.CatalogUpdate + :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, StandardizedError, BadRequestError] + """ + operation_name = "update_interaction_model_catalog_version_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_id` 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/api/custom/interactionModel/catalogs/{catalogId}/versions/{version}/update' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_id'] + if 'version' in params: + path_params['version'] = params['version'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'catalog_update' in params: + body_params = params['catalog_update'] + header_params.append(('Content-type', 'application/json')) + + # 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; Confirms that version is 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 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=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 + + + def get_interaction_model_catalog_values_v1(self, catalog_id, version, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, StandardizedError, CatalogValues, BadRequestError] + """ + Get catalog values from the given catalogId & version. + + :param catalog_id: (required) 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 + :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, StandardizedError, CatalogValues, BadRequestError] + """ + operation_name = "get_interaction_model_catalog_values_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog_id' is set + if ('catalog_id' not in params) or (params['catalog_id'] is None): + raise ValueError( + "Missing the required parameter `catalog_id` 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/api/custom/interactionModel/catalogs/{catalogId}/versions/{version}/values' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'catalog_id' in params: + path_params['catalogId'] = params['catalog_id'] + if 'version' in params: + path_params['version'] = params['version'] + + 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')) + + # 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.version.catalog_values.CatalogValues", status_code=200, message="Returns list of catalog values for the given catalogId and version.")) + 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=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.version.catalog_values.CatalogValues") + + 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, StandardizedError, ListCatalogResponse, BadRequestError] + """ + 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 + :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, StandardizedError, ListCatalogResponse, BadRequestError] + """ + operation_name = "list_interaction_model_catalogs_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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/api/custom/interactionModel/catalogs' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + + 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 + header_params.append(('Content-type', 'application/json')) + + # 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.catalog.list_catalog_response.ListCatalogResponse", status_code=200, message="Returns list of catalogs 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="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=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.catalog.list_catalog_response.ListCatalogResponse") + + if full_response: + return api_response + return api_response.body + + def create_interaction_model_catalog_v1(self, catalog, **kwargs): + # type: (DefinitionData, **Any) -> Union[ApiResponse, StandardizedError, CatalogResponse, BadRequestError] + """ + Create a new version of catalog within the given catalogId. + + :param catalog: (required) + :type catalog: ask_smapi_model.v1.skill.interaction_model.catalog.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, StandardizedError, CatalogResponse, BadRequestError] + """ + operation_name = "create_interaction_model_catalog_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'catalog' is set + if ('catalog' not in params) or (params['catalog'] is None): + raise ValueError( + "Missing the required parameter `catalog` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/api/custom/interactionModel/catalogs' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'catalog' in params: + body_params = params['catalog'] + header_params.append(('Content-type', 'application/json')) + + # 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.catalog.catalog_response.CatalogResponse", status_code=200, message="Returns the generated catalogId.")) + 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 catalog 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=412, message="Precondition failed.")) + 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.catalog.catalog_response.CatalogResponse") + + if full_response: + return api_response + return api_response.body + + def get_status_of_export_request_v1(self, export_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, StandardizedError, ExportResponse] + """ + Get status for given exportId + + :param export_id: (required) The Export ID. + :type export_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, StandardizedError, ExportResponse] + """ + operation_name = "get_status_of_export_request_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'export_id' is set + if ('export_id' not in params) or (params['export_id'] is None): + raise ValueError( + "Missing the required parameter `export_id` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/exports/{exportId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'export_id' in params: + path_params['exportId'] = params['export_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.export_response.ExportResponse", status_code=200, message="OK.")) + 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", + 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.export_response.ExportResponse") + + 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, ListSkillResponse, StandardizedError, BadRequestError] + """ + Get the list of skills for the vendor. + + :param vendor_id: (required) The vendor ID. + :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 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, ListSkillResponse, StandardizedError, BadRequestError] + """ + operation_name = "list_skills_for_vendor_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + + query_params = [] # type: List + if 'vendor_id' in params: + query_params.append(('vendorId', params['vendor_id'])) + 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 'skill_id' in params: + query_params.append(('skillId', params['skill_id'])) + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.list_skill_response.ListSkillResponse", status_code=200, message="Returns list of skills 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.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.list_skill_response.ListSkillResponse") + + if full_response: + return api_response + return api_response.body + + def get_import_status_v1(self, import_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, ImportResponse, StandardizedError] + """ + Get status for given importId. + + :param import_id: (required) The Import ID. + :type import_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, ImportResponse, StandardizedError] + """ + operation_name = "get_import_status_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'import_id' is set + if ('import_id' not in params) or (params['import_id'] is None): + raise ValueError( + "Missing the required parameter `import_id` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/imports/{importId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'import_id' in params: + path_params['importId'] = params['import_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.import_response.ImportResponse", status_code=200, message="OK.")) + 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", + 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.import_response.ImportResponse") + + if full_response: + return api_response + return api_response.body + + def create_skill_package_v1(self, create_skill_with_package_request, **kwargs): + # type: (CreateSkillWithPackageRequest, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Creates a new import for a skill. + + :param create_skill_with_package_request: (required) Defines the request body for createPackage API. + :type create_skill_with_package_request: ask_smapi_model.v1.skill.create_skill_with_package_request.CreateSkillWithPackageRequest + :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, StandardizedError, BadRequestError] + """ + operation_name = "create_skill_package_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'create_skill_with_package_request' is set + if ('create_skill_with_package_request' not in params) or (params['create_skill_with_package_request'] is None): + raise ValueError( + "Missing the required parameter `create_skill_with_package_request` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/imports' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'create_skill_with_package_request' in params: + body_params = params['create_skill_with_package_request'] + header_params.append(('Content-type', 'application/json')) + + # 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="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=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.")) + 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 + + + def create_skill_for_vendor_v1(self, create_skill_request, **kwargs): + # type: (CreateSkillRequest, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError, CreateSkillResponse] + """ + Creates a new skill for given vendorId. + + :param create_skill_request: (required) Defines the request body for createSkill API. + :type create_skill_request: ask_smapi_model.v1.skill.create_skill_request.CreateSkillRequest + :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, StandardizedError, BadRequestError, CreateSkillResponse] + """ + operation_name = "create_skill_for_vendor_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'create_skill_request' is set + if ('create_skill_request' not in params) or (params['create_skill_request'] is None): + raise ValueError( + "Missing the required parameter `create_skill_request` when calling `" + operation_name + "`") + + resource_path = '/v1/skills' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + if 'create_skill_request' in params: + body_params = params['create_skill_request'] + header_params.append(('Content-type', 'application/json')) + + # 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.create_skill_response.CreateSkillResponse", status_code=202, message="Accepted; Returns a URL to track the status 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=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.create_skill_response.CreateSkillResponse") + + 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, StandardizedError, HostedSkillMetadata, BadRequestError] + """ + Get Alexa hosted skill's metadata + + :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, StandardizedError, HostedSkillMetadata, BadRequestError] + """ + operation_name = "get_alexa_hosted_skill_metadata_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}/alexaHosted' + 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 + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.alexa_hosted.hosted_skill_metadata.HostedSkillMetadata", status_code=200, message="response contains the Alexa hosted skill's metadata")) + 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. Authorization Url 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=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", + 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.alexa_hosted.hosted_skill_metadata.HostedSkillMetadata") + + 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, HostedSkillRepositoryCredentialsRequest, **Any) -> Union[ApiResponse, HostedSkillRepositoryCredentialsList, StandardizedError, BadRequestError] + """ + Generates hosted skill repository credentials to access the hosted skill repository. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param hosted_skill_repository_credentials_request: (required) defines the request body for hosted skill repository credentials + :type hosted_skill_repository_credentials_request: ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials_request.HostedSkillRepositoryCredentialsRequest + :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, HostedSkillRepositoryCredentialsList, StandardizedError, BadRequestError] + """ + operation_name = "generate_credentials_for_alexa_hosted_skill_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'hosted_skill_repository_credentials_request' is set + if ('hosted_skill_repository_credentials_request' not in params) or (params['hosted_skill_repository_credentials_request'] is None): + raise ValueError( + "Missing the required parameter `hosted_skill_repository_credentials_request` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/{skillId}/alexaHosted/repository/credentials/generate' + 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 + + header_params = [] # type: List + + body_params = None + if 'hosted_skill_repository_credentials_request' in params: + body_params = params['hosted_skill_repository_credentials_request'] + header_params.append(('Content-type', 'application/json')) + + # 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.alexa_hosted.hosted_skill_repository_credentials_list.HostedSkillRepositoryCredentialsList", status_code=200, message="Response contains the hosted skill repository credentials")) + 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. Authorization Url 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=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", + 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.alexa_hosted.hosted_skill_repository_credentials_list.HostedSkillRepositoryCredentialsList") + + if full_response: + return api_response + return api_response.body + + def end_beta_test_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + 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 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, BadRequestError] + """ + operation_name = "end_beta_test_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}/betaTest/end' + 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 + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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="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.")) + + 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 + + + def get_beta_test_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, BetaTest, Error, BadRequestError] + """ + Get beta test. + Get beta test for a given Alexa 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, BetaTest, Error, BadRequestError] + """ + operation_name = "get_beta_test_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}/betaTest' + 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 + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.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.")) + + 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.beta_test.beta_test.BetaTest") + + if full_response: + return api_response + return api_response.body + + def create_beta_test_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, Error] + """ + Create beta test. + Create a beta test for a given Alexa 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 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] + """ + operation_name = "create_beta_test_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}/betaTest' + 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 + + 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')) + + # 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="Success. Return a URL to track the resource in 'Location' header.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", 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.")) + + 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 + + + def update_beta_test_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + Update beta test. + Update a beta test for a given Alexa 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 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, BadRequestError] + """ + operation_name = "update_beta_test_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}/betaTest' + 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 + + 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')) + + # 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="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.")) + + api_response = self.invoke( + method="PUT", + 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 + + + def start_beta_test_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + 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 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, BadRequestError] + """ + operation_name = "start_beta_test_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}/betaTest/start' + 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 + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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="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.")) + + 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 + + + def add_testers_to_beta_test_v1(self, skill_id, testers_request, **kwargs): + # type: (str, TestersList, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + 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 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, Error, BadRequestError] + """ + operation_name = "add_testers_to_beta_test_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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}/betaTest/testers/add' + 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 + + header_params = [] # type: List + + body_params = None + if 'testers_request' in params: + body_params = params['testers_request'] + header_params.append(('Content-type', 'application/json')) + + # 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="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.")) + + 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 + + + def get_list_of_testers_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, Error, ListTestersResponse, BadRequestError] + """ + 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 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, Error, ListTestersResponse, BadRequestError] + """ + operation_name = "get_list_of_testers_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}/betaTest/testers' + 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'])) + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.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.")) + + 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.beta_test.testers.list_testers_response.ListTestersResponse") + + 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, TestersList, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + 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 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, Error, BadRequestError] + """ + operation_name = "remove_testers_from_beta_test_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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}/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'] + + 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')) + + # 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="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.")) + + 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 + + + def request_feedback_from_testers_v1(self, skill_id, testers_request, **kwargs): + # type: (str, TestersList, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + 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 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, Error, BadRequestError] + """ + operation_name = "request_feedback_from_testers_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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}/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'] + + 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')) + + # 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="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.")) + + 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 + + + def send_reminder_to_testers_v1(self, skill_id, testers_request, **kwargs): + # type: (str, TestersList, **Any) -> Union[ApiResponse, Error, BadRequestError] + """ + 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 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, Error, BadRequestError] + """ + operation_name = "send_reminder_to_testers_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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}/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'] + + 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')) + + # 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="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.")) + + 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 + + + def get_certification_review_v1(self, skill_id, certification_id, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, CertificationResponse, Error] + """ + 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 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, CertificationResponse, Error] + """ + operation_name = "get_certification_review_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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}/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 + + 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')) + + # 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.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.")) + + 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.certification.certification_response.CertificationResponse") + + if full_response: + return api_response + return api_response.body + + def get_certifications_list_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, ListCertificationsResponse, Error] + """ + 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 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 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, ListCertificationsResponse, Error] + """ + 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 '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}/certifications' + 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'])) + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.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.error.Error", 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.")) + + 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.certification.list_certifications_response.ListCertificationsResponse") + + if full_response: + return api_response + return api_response.body + + def delete_skill_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + 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, StandardizedError, BadRequestError] + """ + operation_name = "delete_skill_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}' + 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 + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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="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="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 + + + def get_utterance_data_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError, IntentRequests] + """ + 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 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 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) + :type dialog_act_name: list[ask_smapi_model.v1.skill.history.dialog_act_name.DialogActName] + :param intent_confidence_bin: + :type intent_confidence_bin: list[ask_smapi_model.v1.skill.history.intent_confidence_bin.IntentConfidenceBin] + :param intent_name: A filter used to retrieve items where the intent name is equal to the given value. + :type intent_name: list[str] + :param intent_slots_name: A filter used to retrieve items where the one of the slot names is equal to the given value. + :type intent_slots_name: list[str] + :param interaction_type: + :type interaction_type: list[ask_smapi_model.v1.skill.history.interaction_type.InteractionType] + :param publication_status: + :type publication_status: list[ask_smapi_model.v1.skill.history.publication_status.PublicationStatus] + :param utterance_text: A filter used to retrieve items where the utterance text contains the given phrase. Each filter value can be at-least 1 character and at-most 100 characters long. + :type utterance_text: 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, StandardizedError, BadRequestError, IntentRequests] + """ + operation_name = "get_utterance_data_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}/history/intentRequests' + 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'])) + if 'sort_direction' in params: + query_params.append(('sortDirection', params['sort_direction'])) + if 'sort_field' in params: + query_params.append(('sortField', params['sort_field'])) + if 'stage' in params: + query_params.append(('stage', params['stage'])) + if 'locale' in params: + query_params.append(('locale', params['locale'])) + if 'dialog_act_name' in params: + query_params.append(('dialogAct.name', params['dialog_act_name'])) + if 'intent_confidence_bin' in params: + query_params.append(('intent.confidence.bin', params['intent_confidence_bin'])) + if 'intent_name' in params: + query_params.append(('intent.name', params['intent_name'])) + if 'intent_slots_name' in params: + query_params.append(('intent.slots.name', params['intent_slots_name'])) + if 'interaction_type' in params: + query_params.append(('interactionType', params['interaction_type'])) + if 'publication_status' in params: + query_params.append(('publicationStatus', params['publication_status'])) + if 'utterance_text' in params: + query_params.append(('utteranceText', params['utterance_text'])) + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.history.intent_requests.IntentRequests", status_code=200, message="Returns a list of utterance items for the given skill.")) + 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.skill.standardized_error.StandardizedError", status_code=401, message="Unauthorized.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.skill.standardized_error.StandardizedError", status_code=404, message="Skill 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", + 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.history.intent_requests.IntentRequests") + + 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: (UpdateSkillWithPackageRequest, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Creates a new import for a skill with given skillId. + + :param update_skill_with_package_request: (required) Defines the request body for updatePackage API. + :type update_skill_with_package_request: ask_smapi_model.v1.skill.update_skill_with_package_request.UpdateSkillWithPackageRequest + :param skill_id: (required) The skill ID. + :type skill_id: str + :param if_match: Request header that specified an entity tag. The server will update the resource only if the eTag matches with the resource's current eTag. + :type if_match: 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, StandardizedError, BadRequestError] + """ + operation_name = "import_skill_package_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'update_skill_with_package_request' is set + if ('update_skill_with_package_request' not in params) or (params['update_skill_with_package_request'] is None): + raise ValueError( + "Missing the required parameter `update_skill_with_package_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}/imports' + 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 + + header_params = [] # type: List + if 'if_match' in params: + header_params.append(('If-Match', params['if_match'])) + + body_params = None + if 'update_skill_with_package_request' in params: + body_params = params['update_skill_with_package_request'] + header_params.append(('Content-type', 'application/json')) + + # 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="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=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=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.")) + 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 + + + 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, StandardizedError, BadRequestError, GetMetricDataResponse] + """ + Get analytic metrics report of skill usage. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param start_time: (required) The start time of query. + :type start_time: datetime + :param end_time: (required) The end time of query (The maximum time duration is 1 week) + :type end_time: datetime + :param period: (required) The aggregation period to use when retrieving the metric, follows ISO_8601#Durations format. + :type period: str + :param metric: (required) A distinct set of logic which predictably returns a set of data. + :type metric: str + :param stage: (required) The stage of the skill (live, development). + :type stage: str + :param skill_type: (required) The type of the skill (custom, smartHome and flashBriefing). + :type skill_type: str + :param intent: The intent of the skill. + :type intent: str + :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 + :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, StandardizedError, BadRequestError, GetMetricDataResponse] + """ + operation_name = "get_skill_metrics_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'start_time' is set + if ('start_time' not in params) or (params['start_time'] is None): + raise ValueError( + "Missing the required parameter `start_time` when calling `" + operation_name + "`") + # verify the required parameter 'end_time' is set + if ('end_time' not in params) or (params['end_time'] is None): + raise ValueError( + "Missing the required parameter `end_time` when calling `" + operation_name + "`") + # verify the required parameter 'period' is set + if ('period' not in params) or (params['period'] is None): + raise ValueError( + "Missing the required parameter `period` when calling `" + operation_name + "`") + # verify the required parameter 'metric' is set + if ('metric' not in params) or (params['metric'] is None): + raise ValueError( + "Missing the required parameter `metric` 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 'skill_type' is set + if ('skill_type' not in params) or (params['skill_type'] is None): + raise ValueError( + "Missing the required parameter `skill_type` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/{skillId}/metrics' + 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 'start_time' in params: + query_params.append(('startTime', params['start_time'])) + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) + if 'period' in params: + query_params.append(('period', params['period'])) + if 'metric' in params: + query_params.append(('metric', params['metric'])) + if 'stage' in params: + query_params.append(('stage', params['stage'])) + if 'skill_type' in params: + query_params.append(('skillType', params['skill_type'])) + if 'intent' in params: + query_params.append(('intent', params['intent'])) + if 'locale' in params: + query_params.append(('locale', params['locale'])) + 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')) + + # 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.metrics.get_metric_data_response.GetMetricDataResponse", status_code=200, message="Get analytic metrics report 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.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=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", + 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.metrics.get_metric_data_response.GetMetricDataResponse") + + if full_response: + return api_response + return api_response.body + + def simulate_skill_v1(self, skill_id, simulations_api_request, **kwargs): + # type: (str, SimulationsApiRequest, **Any) -> Union[ApiResponse, SimulationsApiResponse, Error, BadRequestError] + """ + 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. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param simulations_api_request: (required) Payload sent to the skill simulation API. + :type simulations_api_request: ask_smapi_model.v1.skill.simulations.simulations_api_request.SimulationsApiRequest + :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, SimulationsApiResponse, Error, BadRequestError] + """ + operation_name = "simulate_skill_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'simulations_api_request' is set + if ('simulations_api_request' not in params) or (params['simulations_api_request'] is None): + raise ValueError( + "Missing the required parameter `simulations_api_request` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/{skillId}/simulations' + 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 + + header_params = [] # type: List + + body_params = None + if 'simulations_api_request' in params: + body_params = params['simulations_api_request'] + header_params.append(('Content-type', 'application/json')) + + # 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.simulations.simulations_api_response.SimulationsApiResponse", status_code=200, message="Skill simulation has successfully began.")) + 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="API user does not have permission to call this API or is currently in a state that does not allow simulation of this skill. ")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=404, message="The specified skill does not exist.")) + 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="ask_smapi_model.v1.error.Error", status_code=500, message="Internal service error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", 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.simulations.simulations_api_response.SimulationsApiResponse") + + 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, SimulationsApiResponse, Error, BadRequestError] + """ + 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. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param simulation_id: (required) Id of the simulation. + :type simulation_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, SimulationsApiResponse, Error, BadRequestError] + """ + operation_name = "get_skill_simulation_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'simulation_id' is set + if ('simulation_id' not in params) or (params['simulation_id'] is None): + raise ValueError( + "Missing the required parameter `simulation_id` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/{skillId}/simulations/{simulationId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'simulation_id' in params: + path_params['simulationId'] = params['simulation_id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.simulations.simulations_api_response.SimulationsApiResponse", status_code=200, message="Successfully retrieved skill simulation 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.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.error.Error", status_code=404, message="The specified skill or simulation 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=429, message="API user has exceeded the permitted request rate.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", status_code=500, message="Internal service 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.simulations.simulations_api_response.SimulationsApiResponse") + + if full_response: + return api_response + return api_response.body + + def get_ssl_certificates_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, StandardizedError, SSLCertificatePayload] + """ + 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 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, StandardizedError, SSLCertificatePayload] + """ + operation_name = "get_ssl_certificates_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}/sslCertificateSets/~latest' + 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 + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.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.")) + + 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.ssl_certificate_payload.SSLCertificatePayload") + + if full_response: + return api_response + return api_response.body + + def set_ssl_certificates_v1(self, skill_id, ssl_certificate_payload, **kwargs): + # type: (str, SSLCertificatePayload, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Updates the ssl certificates associated with this skill. + + :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 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, StandardizedError, BadRequestError] + """ + operation_name = "set_ssl_certificates_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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 `ssl_certificate_payload` when calling `" + operation_name + "`") + + 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'] + + query_params = [] # type: List + + 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')) + + # 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="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="PUT", + 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 + + + def delete_skill_enablement_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Deletes the enablement for given skillId/stage and customerId (retrieved from Auth token). + + :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, StandardizedError, BadRequestError] + """ + 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 '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 + "`") + # 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 = 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 + header_params.append(('Content-type', 'application/json')) + + # 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; 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.skill.standardized_error.StandardizedError", 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="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 + + + def get_skill_enablement_status_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + 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 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, StandardizedError, BadRequestError] + """ + operation_name = "get_skill_enablement_status_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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 = 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 + header_params.append(('Content-type', 'application/json')) + + # 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; 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.skill.standardized_error.StandardizedError", 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", + 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 + + + def set_skill_enablement_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + 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 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, StandardizedError, BadRequestError] + """ + operation_name = "set_skill_enablement_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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 = 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 + header_params.append(('Content-type', 'application/json')) + + # 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; 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.skill.standardized_error.StandardizedError", 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.")) + + api_response = self.invoke( + method="PUT", + 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 + + + def create_export_request_for_skill_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, StandardizedError] + """ + 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 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, StandardizedError] + """ + operation_name = "create_export_request_for_skill_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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 = 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 + header_params.append(('Content-type', 'application/json')) + + # 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="Accepted.")) + 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", + 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 + + + def get_isp_list_for_skill_id_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, Error, ListInSkillProductResponse, BadRequestError] + """ + 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 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, Error, ListInSkillProductResponse, BadRequestError] + """ + operation_name = "get_isp_list_for_skill_id_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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}/inSkillProducts' + 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 + header_params.append(('Content-type', 'application/json')) + + # 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.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="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.isp.list_in_skill_product_response.ListInSkillProductResponse") + + if full_response: + return api_response + return api_response.body + + def profile_nlu_v1(self, profile_nlu_request, skill_id, stage, locale, **kwargs): + # type: (ProfileNluRequest, str, str, str, **Any) -> Union[ApiResponse, ProfileNluResponse, Error, BadRequestError] + """ + 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 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, ProfileNluResponse, Error, BadRequestError] + """ + 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( + "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 + "`") + # 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 = 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'] + 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')) + + # 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.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.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="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.evaluations.profile_nlu_response.ProfileNluResponse") + + if full_response: + return api_response + return api_response.body + + def list_private_distribution_accounts_v1(self, skill_id, stage, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, StandardizedError, ListPrivateDistributionAccountsResponse, BadRequestError] + """ + List private distribution accounts. + + :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, StandardizedError, ListPrivateDistributionAccountsResponse, BadRequestError] + """ + operation_name = "list_private_distribution_accounts_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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}/privateDistributionAccounts' + 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 + header_params.append(('Content-type', 'application/json')) + + # 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.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="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", + 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.private.list_private_distribution_accounts_response.ListPrivateDistributionAccountsResponse") + + if full_response: + return api_response + return api_response.body + + def delete_private_distribution_account_id_v1(self, skill_id, stage, id, **kwargs): + # type: (str, str, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Remove an id from the private distribution accounts. + + :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 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, StandardizedError, BadRequestError] + """ + operation_name = "delete_private_distribution_account_id_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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 '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 = 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'] + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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="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.")) + + 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 + + + def set_private_distribution_account_id_v1(self, skill_id, stage, id, **kwargs): + # type: (str, str, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Add an id to the private distribution accounts. + + :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 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, StandardizedError, BadRequestError] + """ + operation_name = "set_private_distribution_account_id_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # 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 '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 = 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'] + if 'id' in params: + path_params['id'] = params['id'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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="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.")) + + api_response = self.invoke( + method="PUT", + 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 + + + def delete_account_linking_info_v1(self, skill_id, stage_v2, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Delete AccountLinking information of a skill for the given stage. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param stage_v2: (required) Stages of a skill including the new certified stage. * `development` - skills which are currently in development corresponds to this stage. * `certified` - skills which have completed certification and ready for publishing corresponds to this stage. * `live` - skills which are currently live corresponds to this stage. + :type stage_v2: 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, StandardizedError, BadRequestError] + """ + operation_name = "delete_account_linking_info_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'stage_v2' is set + if ('stage_v2' not in params) or (params['stage_v2'] is None): + raise ValueError( + "Missing the required parameter `stage_v2` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/{skillId}/stages/{stageV2}/accountLinkingClient' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'stage_v2' in params: + path_params['stageV2'] = params['stage_v2'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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="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 specified skill/stage/accountLinkingClient doesn't exist.")) + 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="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 + + + def get_account_linking_info_v1(self, skill_id, stage_v2, **kwargs): + # type: (str, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError, AccountLinkingResponse] + """ + Get AccountLinking information for the skill. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param stage_v2: (required) Stages of a skill including the new certified stage. * `development` - skills which are currently in development corresponds to this stage. * `certified` - skills which have completed certification and ready for publishing corresponds to this stage. * `live` - skills which are currently live corresponds to this stage. + :type stage_v2: 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, StandardizedError, BadRequestError, AccountLinkingResponse] + """ + operation_name = "get_account_linking_info_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'stage_v2' is set + if ('stage_v2' not in params) or (params['stage_v2'] is None): + raise ValueError( + "Missing the required parameter `stage_v2` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/{skillId}/stages/{stageV2}/accountLinkingClient' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'stage_v2' in params: + path_params['stageV2'] = params['stage_v2'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.account_linking.account_linking_response.AccountLinkingResponse", status_code=200, message="Returns AccountLinking response of the skill.")) + 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", + 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.account_linking.account_linking_response.AccountLinkingResponse") + + 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, AccountLinkingRequest, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Create AccountLinking information for the skill. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param stage_v2: (required) Stages of a skill including the new certified stage. * `development` - skills which are currently in development corresponds to this stage. * `certified` - skills which have completed certification and ready for publishing corresponds to this stage. * `live` - skills which are currently live corresponds to this stage. + :type stage_v2: str + :param account_linking_request: (required) The fields required to create accountLinking partner. + :type account_linking_request: ask_smapi_model.v1.skill.account_linking.account_linking_request.AccountLinkingRequest + :param if_match: Request header that specified an entity tag. The server will update the resource only if the eTag matches with the resource's current eTag. + :type if_match: 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, StandardizedError, BadRequestError] + """ + operation_name = "update_account_linking_info_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'stage_v2' is set + if ('stage_v2' not in params) or (params['stage_v2'] is None): + raise ValueError( + "Missing the required parameter `stage_v2` when calling `" + operation_name + "`") + # verify the required parameter 'account_linking_request' is set + if ('account_linking_request' not in params) or (params['account_linking_request'] is None): + raise ValueError( + "Missing the required parameter `account_linking_request` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/{skillId}/stages/{stageV2}/accountLinkingClient' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'stage_v2' in params: + path_params['stageV2'] = params['stage_v2'] + + query_params = [] # type: List + + header_params = [] # type: List + if 'if_match' in params: + header_params.append(('If-Match', params['if_match'])) + + body_params = None + if 'account_linking_request' in params: + body_params = params['account_linking_request'] + header_params.append(('Content-type', 'application/json')) + + # 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="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. Authorization Url 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 resource being requested is not found.")) + 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=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", + 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 + + + def get_interaction_model_v1(self, skill_id, stage_v2, locale, **kwargs): + # type: (str, str, str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError, InteractionModelData] + """ + Gets the `InteractionModel` for the skill in the given stage. The path params **skillId**, **stage** and **locale** are required. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param stage_v2: (required) Stages of a skill including the new certified stage. * `development` - skills which are currently in development corresponds to this stage. * `certified` - skills which have completed certification and ready for publishing corresponds to this stage. * `live` - skills which are currently live corresponds to this stage. + :type stage_v2: 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, StandardizedError, BadRequestError, InteractionModelData] + """ + operation_name = "get_interaction_model_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'stage_v2' is set + if ('stage_v2' not in params) or (params['stage_v2'] is None): + raise ValueError( + "Missing the required parameter `stage_v2` 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/{stageV2}/interactionModel/locales/{locale}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'stage_v2' in params: + path_params['stageV2'] = params['stage_v2'] + if 'locale' in params: + path_params['locale'] = params['locale'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.interaction_model_data.InteractionModelData", status_code=200, message="Returns interaction model object 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.")) + 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 skill doesn't exist or there is no model defined for the locale.")) + 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.interaction_model_data.InteractionModelData") + + 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, StandardizedError, BadRequestError] + """ + Get the latest metadata for the interaction model resource for the given stage + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param stage_v2: (required) Stages of a skill including the new certified stage. * `development` - skills which are currently in development corresponds to this stage. * `certified` - skills which have completed certification and ready for publishing corresponds to this stage. * `live` - skills which are currently live corresponds to this stage. + :type stage_v2: 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, StandardizedError, BadRequestError] + """ + operation_name = "get_interaction_model_metadata_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'stage_v2' is set + if ('stage_v2' not in params) or (params['stage_v2'] is None): + raise ValueError( + "Missing the required parameter `stage_v2` 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/{stageV2}/interactionModel/locales/{locale}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'stage_v2' in params: + path_params['stageV2'] = params['stage_v2'] + if 'locale' in params: + path_params['locale'] = params['locale'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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="success. There is no content but returns etag")) + 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 skill or stage or locale 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="HEAD", + 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 + + + def set_interaction_model_v1(self, skill_id, stage_v2, locale, interaction_model, **kwargs): + # type: (str, str, str, InteractionModelData, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Creates an `InteractionModel` for the skill. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param stage_v2: (required) Stages of a skill including the new certified stage. * `development` - skills which are currently in development corresponds to this stage. * `certified` - skills which have completed certification and ready for publishing corresponds to this stage. * `live` - skills which are currently live corresponds to this stage. + :type stage_v2: str + :param locale: (required) The locale for the model requested e.g. en-GB, en-US, de-DE. + :type locale: str + :param interaction_model: (required) + :type interaction_model: ask_smapi_model.v1.skill.interaction_model.interaction_model_data.InteractionModelData + :param if_match: Request header that specified an entity tag. The server will update the resource only if the eTag matches with the resource's current eTag. + :type if_match: 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, StandardizedError, BadRequestError] + """ + operation_name = "set_interaction_model_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'stage_v2' is set + if ('stage_v2' not in params) or (params['stage_v2'] is None): + raise ValueError( + "Missing the required parameter `stage_v2` 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 'interaction_model' is set + if ('interaction_model' not in params) or (params['interaction_model'] is None): + raise ValueError( + "Missing the required parameter `interaction_model` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/{skillId}/stages/{stageV2}/interactionModel/locales/{locale}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'stage_v2' in params: + path_params['stageV2'] = params['stage_v2'] + if 'locale' in params: + path_params['locale'] = params['locale'] + + query_params = [] # type: List + + header_params = [] # type: List + if 'if_match' in params: + header_params.append(('If-Match', params['if_match'])) + + body_params = None + if 'interaction_model' in params: + body_params = params['interaction_model'] + header_params.append(('Content-type', 'application/json')) + + # 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 build 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 input interaction model 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 skill or stage or locale does not exist")) + 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=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", + 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 + + + def list_interaction_model_versions_v1(self, skill_id, stage_v2, locale, **kwargs): + # type: (str, str, str, **Any) -> Union[ApiResponse, ListResponse, StandardizedError, BadRequestError] + """ + Get the list of interactionModel versions of a skill for the vendor. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param stage_v2: (required) Stages of a skill including the new certified stage. * `development` - skills which are currently in development corresponds to this stage. * `certified` - skills which have completed certification and ready for publishing corresponds to this stage. * `live` - skills which are currently live corresponds to this stage. + :type stage_v2: str + :param locale: (required) The locale for the model requested e.g. en-GB, en-US, de-DE. + :type locale: 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 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 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, ListResponse, StandardizedError, BadRequestError] + """ + operation_name = "list_interaction_model_versions_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'stage_v2' is set + if ('stage_v2' not in params) or (params['stage_v2'] is None): + raise ValueError( + "Missing the required parameter `stage_v2` 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/{stageV2}/interactionModel/locales/{locale}/versions' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'stage_v2' in params: + path_params['stageV2'] = params['stage_v2'] + if 'locale' in params: + path_params['locale'] = params['locale'] + + 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 'sort_direction' in params: + query_params.append(('sortDirection', params['sort_direction'])) + if 'sort_field' in params: + query_params.append(('sortField', params['sort_field'])) + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.version.list_response.ListResponse", status_code=200, message="Returns list of interactionModel versions of a skill 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 e.g. the input interaction model 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 skill doesn't exist or there is no model defined for the locale.")) + 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.version.list_response.ListResponse") + + 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, StandardizedError, BadRequestError, InteractionModelData] + """ + Gets the specified version `InteractionModel` of a skill for the vendor. Use `~current` as version parameter to get the current version model. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param stage_v2: (required) Stages of a skill including the new certified stage. * `development` - skills which are currently in development corresponds to this stage. * `certified` - skills which have completed certification and ready for publishing corresponds to this stage. * `live` - skills which are currently live corresponds to this stage. + :type stage_v2: str + :param locale: (required) The locale for the model requested e.g. en-GB, en-US, de-DE. + :type locale: 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, StandardizedError, BadRequestError, InteractionModelData] + """ + operation_name = "get_interaction_model_version_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'stage_v2' is set + if ('stage_v2' not in params) or (params['stage_v2'] is None): + raise ValueError( + "Missing the required parameter `stage_v2` 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 '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/{stageV2}/interactionModel/locales/{locale}/versions/{version}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'stage_v2' in params: + path_params['stageV2'] = params['stage_v2'] + if 'locale' in params: + path_params['locale'] = params['locale'] + if 'version' in params: + path_params['version'] = params['version'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.interaction_model_data.InteractionModelData", status_code=200, message="Returns interaction model object 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 input interaction model 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 skill doesn't exist or there is no model defined for the locale or version.")) + 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.interaction_model_data.InteractionModelData") + + 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, StandardizedError, BadRequestError, SkillManifestEnvelope] + """ + Returns the skill manifest for given skillId and stage. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param stage_v2: (required) Stages of a skill including the new certified stage. * `development` - skills which are currently in development corresponds to this stage. * `certified` - skills which have completed certification and ready for publishing corresponds to this stage. * `live` - skills which are currently live corresponds to this stage. + :type stage_v2: 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, StandardizedError, BadRequestError, SkillManifestEnvelope] + """ + operation_name = "get_skill_manifest_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'stage_v2' is set + if ('stage_v2' not in params) or (params['stage_v2'] is None): + raise ValueError( + "Missing the required parameter `stage_v2` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/{skillId}/stages/{stageV2}/manifest' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'stage_v2' in params: + path_params['stageV2'] = params['stage_v2'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.manifest.skill_manifest_envelope.SkillManifestEnvelope", status_code=200, message="Response contains the latest version of skill manifest.")) + error_definitions.append(ServiceClientResponse(response_type=None, status_code=303, message="See Other")) + 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", + 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.manifest.skill_manifest_envelope.SkillManifestEnvelope") + + 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, SkillManifestEnvelope, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Updates skill manifest for given skillId and stage. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param stage_v2: (required) Stages of a skill including the new certified stage. * `development` - skills which are currently in development corresponds to this stage. * `certified` - skills which have completed certification and ready for publishing corresponds to this stage. * `live` - skills which are currently live corresponds to this stage. + :type stage_v2: str + :param update_skill_request: (required) Defines the request body for updateSkill API. + :type update_skill_request: ask_smapi_model.v1.skill.manifest.skill_manifest_envelope.SkillManifestEnvelope + :param if_match: Request header that specified an entity tag. The server will update the resource only if the eTag matches with the resource's current eTag. + :type if_match: 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, StandardizedError, BadRequestError] + """ + operation_name = "update_skill_manifest_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'stage_v2' is set + if ('stage_v2' not in params) or (params['stage_v2'] is None): + raise ValueError( + "Missing the required parameter `stage_v2` when calling `" + operation_name + "`") + # verify the required parameter 'update_skill_request' is set + if ('update_skill_request' not in params) or (params['update_skill_request'] is None): + raise ValueError( + "Missing the required parameter `update_skill_request` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/{skillId}/stages/{stageV2}/manifest' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'stage_v2' in params: + path_params['stageV2'] = params['stage_v2'] + + query_params = [] # type: List + + header_params = [] # type: List + if 'if_match' in params: + header_params.append(('If-Match', params['if_match'])) + + body_params = None + if 'update_skill_request' in params: + body_params = params['update_skill_request'] + header_params.append(('Content-type', 'application/json')) + + # 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="Accepted; Returns a URL to track the status 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.")) + 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=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="PUT", + 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 + + + def submit_skill_validation_v1(self, validations_api_request, skill_id, stage, **kwargs): + # type: (ValidationsApiRequest, str, str, **Any) -> Union[ApiResponse, ValidationsApiResponse, Error, BadRequestError] + """ + Validate a skill. + This is an asynchronous API which allows a skill developer to execute various validations against their skill. + + :param validations_api_request: (required) Payload sent to the skill validation API. + :type validations_api_request: ask_smapi_model.v1.skill.validations.validations_api_request.ValidationsApiRequest + :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, ValidationsApiResponse, Error, BadRequestError] + """ + operation_name = "submit_skill_validation_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # verify the required parameter 'validations_api_request' is set + if ('validations_api_request' not in params) or (params['validations_api_request'] is None): + raise ValueError( + "Missing the required parameter `validations_api_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 + "`") + # 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}/validations' + 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 'validations_api_request' in params: + body_params = params['validations_api_request'] + header_params.append(('Content-type', 'application/json')) + + # 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.validations.validations_api_response.ValidationsApiResponse", status_code=202, message="Skill validation has successfully begun.")) + 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="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.error.Error", status_code=404, message="The specified skill, stage or validation 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="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="ask_smapi_model.v1.error.Error", status_code=500, message="Internal service error.")) + error_definitions.append(ServiceClientResponse(response_type="ask_smapi_model.v1.error.Error", 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.validations.validations_api_response.ValidationsApiResponse") + + 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, ValidationsApiResponse, Error, BadRequestError] + """ + 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. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param validation_id: (required) Id of the validation. Reserved word identifier of mostRecent can be used to get the most recent validation for the skill and stage. Note that the behavior of the API in this case would be the same as when the actual validation id of the most recent validation is used in the request. + :type validation_id: str + :param stage: (required) Stage for skill. + :type stage: 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, ValidationsApiResponse, Error, BadRequestError] + """ + operation_name = "get_skill_validations_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'validation_id' is set + if ('validation_id' not in params) or (params['validation_id'] is None): + raise ValueError( + "Missing the required parameter `validation_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}/validations/{validationId}' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + if 'skill_id' in params: + path_params['skillId'] = params['skill_id'] + if 'validation_id' in params: + path_params['validationId'] = params['validation_id'] + if 'stage' in params: + path_params['stage'] = params['stage'] + + 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')) + + # 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.validations.validations_api_response.ValidationsApiResponse", status_code=200, message="Successfully retrieved skill validation information.")) + 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.error.Error", status_code=404, message="The specified skill, stage, or validation 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="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="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.validations.validations_api_response.ValidationsApiResponse") + + if full_response: + return api_response + return api_response.body + + def get_skill_status_v1(self, skill_id, **kwargs): + # type: (str, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError, SkillStatus] + """ + Get the status of skill resource and its sub-resources for a given skillId. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param resource: Resource name for which status information is desired. It is an optional, filtering parameter and can be used more than once, to retrieve status for all the desired (sub)resources only, in single API call. If this parameter is not specified, status for all the resources/sub-resources will be returned. + :type resource: 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, StandardizedError, BadRequestError, SkillStatus] + """ + operation_name = "get_skill_status_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}/status' + 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 'resource' in params: + query_params.append(('resource', params['resource'])) + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.skill_status.SkillStatus", status_code=200, message="Returns status for skill resource and sub-resources.")) + 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=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.skill_status.SkillStatus") + + 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, StandardizedError, BadRequestError] + """ + Submit the skill for certification. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param submit_skill_for_certification_request: Defines the request body for submitSkillForCertification API. + :type submit_skill_for_certification_request: ask_smapi_model.v1.skill.submit_skill_for_certification_request.SubmitSkillForCertificationRequest + :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, StandardizedError, BadRequestError] + """ + operation_name = "submit_skill_for_certification_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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}/submit' + 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 + + header_params = [] # type: List + + body_params = None + if 'submit_skill_for_certification_request' in params: + body_params = params['submit_skill_for_certification_request'] + header_params.append(('Content-type', 'application/json')) + + # 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="Success. There is no content but returns Location in the 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.")) + 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 + + + def withdraw_skill_from_certification_v1(self, skill_id, withdraw_request, **kwargs): + # type: (str, WithdrawRequest, **Any) -> Union[ApiResponse, StandardizedError, BadRequestError] + """ + Withdraws the skill from certification. + + :param skill_id: (required) The skill ID. + :type skill_id: str + :param withdraw_request: (required) The reason and message (in case of OTHER) to withdraw a skill. + :type withdraw_request: ask_smapi_model.v1.skill.withdraw_request.WithdrawRequest + :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, StandardizedError, BadRequestError] + """ + operation_name = "withdraw_skill_from_certification_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'withdraw_request' is set + if ('withdraw_request' not in params) or (params['withdraw_request'] is None): + raise ValueError( + "Missing the required parameter `withdraw_request` when calling `" + operation_name + "`") + + resource_path = '/v1/skills/{skillId}/withdraw' + 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 + + header_params = [] # type: List + + body_params = None + if 'withdraw_request' in params: + body_params = params['withdraw_request'] + header_params.append(('Content-type', 'application/json')) + + # 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="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="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 + + + def create_upload_url_v1(self, **kwargs): + # type: (**Any) -> Union[ApiResponse, UploadResponse, StandardizedError] + """ + 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, UploadResponse, StandardizedError] + """ + operation_name = "create_upload_url_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + + resource_path = '/v1/skills/uploads' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.upload_response.UploadResponse", status_code=201, message="Created.")) + 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.upload_response.UploadResponse") + + if full_response: + return api_response + return api_response.body + + def get_vendor_list_v1(self, **kwargs): + # type: (**Any) -> Union[ApiResponse, Vendors, Error] + """ + 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, Vendors, Error] + """ + operation_name = "get_vendor_list_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + + resource_path = '/v1/vendors' + resource_path = resource_path.replace('{format}', 'json') + + path_params = {} # type: Dict + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.vendor_management.vendors.Vendors", status_code=200, message="Return vendor information on success.")) + 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=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.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.vendor_management.vendors.Vendors") + + 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, HostedSkillPermission, StandardizedError, BadRequestError] + """ + 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 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, HostedSkillPermission, StandardizedError, BadRequestError] + """ + operation_name = "get_alexa_hosted_skill_user_permissions_v1" + params = locals() + for key, val in six.iteritems(params['kwargs']): + params[key] = val + del params['kwargs'] + # 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 + "`") + # verify the required parameter 'permission' is set + if ('permission' not in params) or (params['permission'] is None): + raise ValueError( + "Missing the required parameter `permission` when calling `" + operation_name + "`") + + resource_path = '/v1/vendors/{vendorId}/alexaHosted/permissions/{permission}' + 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'] + + query_params = [] # type: List + + header_params = [] # type: List + + body_params = None + header_params.append(('Content-type', 'application/json')) + + # 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.alexa_hosted.hosted_skill_permission.HostedSkillPermission", status_code=200, message="response contains the user's permission of hosted skill features")) + 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. Authorization Url 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="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", + 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.alexa_hosted.hosted_skill_permission.HostedSkillPermission") + + if full_response: + return api_response + return api_response.body diff --git a/ask-smapi-model/ask_smapi_model/v1/__init__.py b/ask-smapi-model/ask_smapi_model/v1/__init__.py new file mode 100644 index 0000000..a1ae581 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/__init__.py @@ -0,0 +1,22 @@ +# 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 .link import Link +from .error import Error +from .bad_request_error import BadRequestError +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/bad_request_error.py b/ask-smapi-model/ask_smapi_model/v1/bad_request_error.py new file mode 100644 index 0000000..f236d80 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/bad_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 + from datetime import datetime + from ask_smapi_model.v1.error import Error + + +class BadRequestError(object): + """ + + :param message: Human readable description of error. + :type message: (optional) str + :param violations: An array of violation messages. + :type violations: (optional) list[ask_smapi_model.v1.error.Error] + + """ + deserialized_types = { + 'message': 'str', + 'violations': 'list[ask_smapi_model.v1.error.Error]' + } # type: Dict + + attribute_map = { + 'message': 'message', + 'violations': 'violations' + } # type: Dict + supports_multiple_types = False + + def __init__(self, message=None, violations=None): + # type: (Optional[str], Optional[List[Error]]) -> None + """ + + :param message: Human readable description of error. + :type message: (optional) str + :param violations: An array of violation messages. + :type violations: (optional) list[ask_smapi_model.v1.error.Error] + """ + self.__discriminator_value = None # type: str + + self.message = message + self.violations = violations + + 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, BadRequestError): + 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/catalog/__init__.py b/ask-smapi-model/ask_smapi_model/v1/catalog/__init__.py new file mode 100644 index 0000000..8c5e896 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/__init__.py @@ -0,0 +1,19 @@ +# 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_content_upload_url_response import CreateContentUploadUrlResponse +from .presigned_upload_part_items import PresignedUploadPartItems +from .create_content_upload_url_request import CreateContentUploadUrlRequest 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 new file mode 100644 index 0000000..e27bda2 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/create_content_upload_url_request.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 + from datetime import datetime + + +class CreateContentUploadUrlRequest(object): + """ + + :param number_of_upload_parts: The number of parts the file will be split into. An equal number of presigned upload urls will be generated in response to facilitate each part's upload. + :type number_of_upload_parts: (optional) int + + """ + deserialized_types = { + 'number_of_upload_parts': 'int' + } # type: Dict + + attribute_map = { + 'number_of_upload_parts': 'numberOfUploadParts' + } # type: Dict + supports_multiple_types = False + + def __init__(self, number_of_upload_parts=None): + # type: (Optional[int]) -> None + """ + + :param number_of_upload_parts: The number of parts the file will be split into. An equal number of presigned upload urls will be generated in response to facilitate each part's upload. + :type number_of_upload_parts: (optional) int + """ + self.__discriminator_value = None # type: str + + self.number_of_upload_parts = number_of_upload_parts + + 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, CreateContentUploadUrlRequest): + 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/catalog/create_content_upload_url_response.py b/ask-smapi-model/ask_smapi_model/v1/catalog/create_content_upload_url_response.py new file mode 100644 index 0000000..1e1bf9d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/create_content_upload_url_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 + from datetime import datetime + from ask_smapi_model.v1.catalog.presigned_upload_part_items import PresignedUploadPartItems + + +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] + + """ + deserialized_types = { + 'url_id': 'str', + 'pre_signed_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' + } # type: Dict + supports_multiple_types = False + + def __init__(self, url_id=None, pre_signed_upload_parts=None): + # type: (Optional[str], Optional[List[PresignedUploadPartItems]]) -> 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] + """ + self.__discriminator_value = None # type: str + + self.url_id = url_id + self.pre_signed_upload_parts = pre_signed_upload_parts + + 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, CreateContentUploadUrlResponse): + 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/catalog/presigned_upload_part_items.py b/ask-smapi-model/ask_smapi_model/v1/catalog/presigned_upload_part_items.py new file mode 100644 index 0000000..d3dcb42 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/presigned_upload_part_items.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class PresignedUploadPartItems(object): + """ + + :param url: + :type url: (optional) str + :param part_number: + :type part_number: (optional) int + :param expires_at: + :type expires_at: (optional) datetime + + """ + deserialized_types = { + 'url': 'str', + 'part_number': 'int', + 'expires_at': 'datetime' + } # type: Dict + + attribute_map = { + 'url': 'url', + 'part_number': 'partNumber', + 'expires_at': 'expiresAt' + } # type: Dict + supports_multiple_types = False + + def __init__(self, url=None, part_number=None, expires_at=None): + # type: (Optional[str], Optional[int], Optional[datetime]) -> None + """ + + :param url: + :type url: (optional) str + :param part_number: + :type part_number: (optional) int + :param expires_at: + :type expires_at: (optional) datetime + """ + self.__discriminator_value = None # type: str + + self.url = url + self.part_number = part_number + self.expires_at = expires_at + + 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, PresignedUploadPartItems): + 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/catalog/py.typed b/ask-smapi-model/ask_smapi_model/v1/catalog/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..7c7fc43 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/__init__.py @@ -0,0 +1,27 @@ +# 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 .ingestion_status import IngestionStatus +from .file_upload_status import FileUploadStatus +from .pre_signed_url import PreSignedUrl +from .pre_signed_url_item import PreSignedUrlItem +from .location import Location +from .get_content_upload_response import GetContentUploadResponse +from .upload_status import UploadStatus +from .content_upload_file_summary import ContentUploadFileSummary +from .catalog_upload_base import CatalogUploadBase +from .ingestion_step_name import IngestionStepName +from .upload_ingestion_step import UploadIngestionStep 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 new file mode 100644 index 0000000..31a7d96 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/catalog_upload_base.py @@ -0,0 +1,101 @@ +# 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 + from datetime import datetime + + +class CatalogUploadBase(object): + """ + + + """ + deserialized_types = { + } # type: Dict + + attribute_map = { + } # type: Dict + supports_multiple_types = False + __metaclass__ = ABCMeta + + @abstractmethod + 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, CatalogUploadBase): + 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/catalog/upload/content_upload_file_summary.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/content_upload_file_summary.py new file mode 100644 index 0000000..1513289 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/content_upload_file_summary.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 + from datetime import datetime + from ask_smapi_model.v1.catalog.upload.file_upload_status import FileUploadStatus + + +class ContentUploadFileSummary(object): + """ + + :param download_url: If the file is available for download, downloadUrl can be used to download the file. + :type download_url: (optional) str + :param expires_at: + :type expires_at: (optional) datetime + :param status: + :type status: (optional) ask_smapi_model.v1.catalog.upload.file_upload_status.FileUploadStatus + + """ + deserialized_types = { + 'download_url': 'str', + 'expires_at': 'datetime', + 'status': 'ask_smapi_model.v1.catalog.upload.file_upload_status.FileUploadStatus' + } # type: Dict + + attribute_map = { + 'download_url': 'downloadUrl', + 'expires_at': 'expiresAt', + 'status': 'status' + } # type: Dict + supports_multiple_types = False + + def __init__(self, download_url=None, expires_at=None, status=None): + # type: (Optional[str], Optional[datetime], Optional[FileUploadStatus]) -> None + """ + + :param download_url: If the file is available for download, downloadUrl can be used to download the file. + :type download_url: (optional) str + :param expires_at: + :type expires_at: (optional) datetime + :param status: + :type status: (optional) ask_smapi_model.v1.catalog.upload.file_upload_status.FileUploadStatus + """ + self.__discriminator_value = None # type: str + + self.download_url = download_url + self.expires_at = expires_at + 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, ContentUploadFileSummary): + 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/catalog/upload/file_upload_status.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/file_upload_status.py new file mode 100644 index 0000000..54e4fdc --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/file_upload_status.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 + from datetime import datetime + + +class FileUploadStatus(Enum): + """ + Value of status depends on if file is available for download or not. + + + + Allowed enum values: [PENDING, AVAILABLE, PURGED, UNAVAILABLE] + """ + PENDING = "PENDING" + AVAILABLE = "AVAILABLE" + PURGED = "PURGED" + UNAVAILABLE = "UNAVAILABLE" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, FileUploadStatus): + 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/catalog/upload/get_content_upload_response.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/get_content_upload_response.py new file mode 100644 index 0000000..d5677a1 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/get_content_upload_response.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.catalog.upload.upload_ingestion_step import UploadIngestionStep + from ask_smapi_model.v1.catalog.upload.upload_status import UploadStatus + from ask_smapi_model.v1.catalog.upload.content_upload_file_summary import ContentUploadFileSummary + + +class GetContentUploadResponse(object): + """ + + :param id: Unique identifier of the upload + :type id: (optional) str + :param catalog_id: Unique identifier of the added catalog object + :type catalog_id: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.catalog.upload.upload_status.UploadStatus + :param created_date: + :type created_date: (optional) datetime + :param last_updated_date: + :type last_updated_date: (optional) datetime + :param file: + :type file: (optional) ask_smapi_model.v1.catalog.upload.content_upload_file_summary.ContentUploadFileSummary + :param ingestion_steps: List of different steps performed on the upload. + :type ingestion_steps: (optional) list[ask_smapi_model.v1.catalog.upload.upload_ingestion_step.UploadIngestionStep] + + """ + deserialized_types = { + 'id': 'str', + 'catalog_id': 'str', + 'status': 'ask_smapi_model.v1.catalog.upload.upload_status.UploadStatus', + 'created_date': 'datetime', + 'last_updated_date': 'datetime', + 'file': 'ask_smapi_model.v1.catalog.upload.content_upload_file_summary.ContentUploadFileSummary', + 'ingestion_steps': 'list[ask_smapi_model.v1.catalog.upload.upload_ingestion_step.UploadIngestionStep]' + } # type: Dict + + attribute_map = { + 'id': 'id', + 'catalog_id': 'catalogId', + 'status': 'status', + 'created_date': 'createdDate', + 'last_updated_date': 'lastUpdatedDate', + 'file': 'file', + 'ingestion_steps': 'ingestionSteps' + } # type: Dict + 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[UploadStatus], Optional[datetime], Optional[datetime], Optional[ContentUploadFileSummary], Optional[List[UploadIngestionStep]]) -> None + """ + + :param id: Unique identifier of the upload + :type id: (optional) str + :param catalog_id: Unique identifier of the added catalog object + :type catalog_id: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.catalog.upload.upload_status.UploadStatus + :param created_date: + :type created_date: (optional) datetime + :param last_updated_date: + :type last_updated_date: (optional) datetime + :param file: + :type file: (optional) ask_smapi_model.v1.catalog.upload.content_upload_file_summary.ContentUploadFileSummary + :param ingestion_steps: List of different steps performed on the upload. + :type ingestion_steps: (optional) list[ask_smapi_model.v1.catalog.upload.upload_ingestion_step.UploadIngestionStep] + """ + self.__discriminator_value = None # type: str + + self.id = id + self.catalog_id = catalog_id + self.status = status + self.created_date = created_date + self.last_updated_date = last_updated_date + self.file = file + self.ingestion_steps = ingestion_steps + + 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, GetContentUploadResponse): + 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/catalog/upload/ingestion_status.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_status.py new file mode 100644 index 0000000..ae46697 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_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 + from datetime import datetime + + +class IngestionStatus(Enum): + """ + + + Allowed enum values: [PENDING, IN_PROGRESS, FAILED, SUCCEEDED, CANCELLED] + """ + PENDING = "PENDING" + IN_PROGRESS = "IN_PROGRESS" + FAILED = "FAILED" + SUCCEEDED = "SUCCEEDED" + CANCELLED = "CANCELLED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, IngestionStatus): + 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/catalog/upload/ingestion_step_name.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_step_name.py new file mode 100644 index 0000000..9cc1f9e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/ingestion_step_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 + from datetime import datetime + + +class IngestionStepName(Enum): + """ + + + Allowed enum values: [UPLOAD, SCHEMA_VALIDATION] + """ + UPLOAD = "UPLOAD" + SCHEMA_VALIDATION = "SCHEMA_VALIDATION" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, IngestionStepName): + 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/catalog/upload/location.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/location.py new file mode 100644 index 0000000..5acec8d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/location.py @@ -0,0 +1,110 @@ +# 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.catalog.upload.catalog_upload_base import CatalogUploadBase + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class Location(CatalogUploadBase): + """ + Request body for self-hosted catalog uploads + + + :param location: self hosted url location. + :type location: (optional) str + + """ + deserialized_types = { + 'location': 'str' + } # type: Dict + + attribute_map = { + 'location': 'location' + } # type: Dict + supports_multiple_types = False + + def __init__(self, location=None): + # type: (Optional[str]) -> None + """Request body for self-hosted catalog uploads + + :param location: self hosted url location. + :type location: (optional) str + """ + self.__discriminator_value = None # type: str + + super(Location, self).__init__() + self.location = location + + 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, Location): + 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/catalog/upload/pre_signed_url.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url.py new file mode 100644 index 0000000..bc2754f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url.py @@ -0,0 +1,118 @@ +# 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.catalog.upload.catalog_upload_base import CatalogUploadBase + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.catalog.upload.pre_signed_url_item import PreSignedUrlItem + + +class PreSignedUrl(CatalogUploadBase): + """ + Request body for self-hosted catalog uploads + + + :param url_id: Unique identifier for urls + :type url_id: (optional) str + :param part_e_tags: List of (eTag, part number) pairs for each part of the file uploaded + :type part_e_tags: (optional) list[ask_smapi_model.v1.catalog.upload.pre_signed_url_item.PreSignedUrlItem] + + """ + deserialized_types = { + 'url_id': 'str', + 'part_e_tags': 'list[ask_smapi_model.v1.catalog.upload.pre_signed_url_item.PreSignedUrlItem]' + } # type: Dict + + attribute_map = { + 'url_id': 'urlId', + 'part_e_tags': 'partETags' + } # type: Dict + supports_multiple_types = False + + def __init__(self, url_id=None, part_e_tags=None): + # type: (Optional[str], Optional[List[PreSignedUrlItem]]) -> None + """Request body for self-hosted catalog uploads + + :param url_id: Unique identifier for urls + :type url_id: (optional) str + :param part_e_tags: List of (eTag, part number) pairs for each part of the file uploaded + :type part_e_tags: (optional) list[ask_smapi_model.v1.catalog.upload.pre_signed_url_item.PreSignedUrlItem] + """ + self.__discriminator_value = None # type: str + + super(PreSignedUrl, self).__init__() + self.url_id = url_id + self.part_e_tags = part_e_tags + + 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, PreSignedUrl): + 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/catalog/upload/pre_signed_url_item.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url_item.py new file mode 100644 index 0000000..d467a9f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/pre_signed_url_item.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 + from datetime import datetime + + +class PreSignedUrlItem(object): + """ + + :param e_tag: + :type e_tag: (optional) str + :param part_number: + :type part_number: (optional) int + + """ + deserialized_types = { + 'e_tag': 'str', + 'part_number': 'int' + } # type: Dict + + attribute_map = { + 'e_tag': 'eTag', + 'part_number': 'partNumber' + } # type: Dict + supports_multiple_types = False + + def __init__(self, e_tag=None, part_number=None): + # type: (Optional[str], Optional[int]) -> None + """ + + :param e_tag: + :type e_tag: (optional) str + :param part_number: + :type part_number: (optional) int + """ + self.__discriminator_value = None # type: str + + self.e_tag = e_tag + self.part_number = part_number + + 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, PreSignedUrlItem): + 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/catalog/upload/py.typed b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..ee50d69 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/upload_ingestion_step.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 + from datetime import datetime + from ask_smapi_model.v1.catalog.upload.ingestion_step_name import IngestionStepName + from ask_smapi_model.v1.error import Error + from ask_smapi_model.v1.catalog.upload.ingestion_status import IngestionStatus + + +class UploadIngestionStep(object): + """ + Represents a single step in the multi-step ingestion process of a new upload. + + + :param name: + :type name: (optional) ask_smapi_model.v1.catalog.upload.ingestion_step_name.IngestionStepName + :param status: + :type status: (optional) ask_smapi_model.v1.catalog.upload.ingestion_status.IngestionStatus + :param log_url: Url for the file containing logs of ingestion step. + :type log_url: (optional) str + :param violations: This array will contain the violations occurred during the execution of step. Will be empty, if execution succeeded. + :type violations: (optional) list[ask_smapi_model.v1.error.Error] + + """ + deserialized_types = { + 'name': 'ask_smapi_model.v1.catalog.upload.ingestion_step_name.IngestionStepName', + 'status': 'ask_smapi_model.v1.catalog.upload.ingestion_status.IngestionStatus', + 'log_url': 'str', + 'violations': 'list[ask_smapi_model.v1.error.Error]' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'status': 'status', + 'log_url': 'logUrl', + 'violations': 'violations' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, status=None, log_url=None, violations=None): + # type: (Optional[IngestionStepName], Optional[IngestionStatus], Optional[str], Optional[List[Error]]) -> None + """Represents a single step in the multi-step ingestion process of a new upload. + + :param name: + :type name: (optional) ask_smapi_model.v1.catalog.upload.ingestion_step_name.IngestionStepName + :param status: + :type status: (optional) ask_smapi_model.v1.catalog.upload.ingestion_status.IngestionStatus + :param log_url: Url for the file containing logs of ingestion step. + :type log_url: (optional) str + :param violations: This array will contain the violations occurred during the execution of step. Will be empty, if execution succeeded. + :type violations: (optional) list[ask_smapi_model.v1.error.Error] + """ + self.__discriminator_value = None # type: str + + self.name = name + self.status = status + self.log_url = log_url + self.violations = violations + + 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, UploadIngestionStep): + 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/catalog/upload/upload_status.py b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/upload_status.py new file mode 100644 index 0000000..b64b414 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/catalog/upload/upload_status.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 + from datetime import datetime + + +class UploadStatus(Enum): + """ + Status of the entire upload. + + + + Allowed enum values: [PENDING, IN_PROGRESS, FAILED, SUCCEEDED] + """ + PENDING = "PENDING" + IN_PROGRESS = "IN_PROGRESS" + FAILED = "FAILED" + SUCCEEDED = "SUCCEEDED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, UploadStatus): + 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/error.py b/ask-smapi-model/ask_smapi_model/v1/error.py new file mode 100644 index 0000000..7de1f24 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/error.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 + from datetime import datetime + + +class Error(object): + """ + + :param code: Error code that maps to an error message. Developers with different locales should be able to lookup the error description based on this code. + :type code: (optional) str + :param message: Readable description of error. + :type message: (optional) str + + """ + deserialized_types = { + 'code': 'str', + '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[str], Optional[str]) -> None + """ + + :param code: Error code that maps to an error message. Developers with different locales should be able to lookup the error description based on this code. + :type code: (optional) str + :param message: Readable description of error. + :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, 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-smapi-model/ask_smapi_model/v1/isp/__init__.py b/ask-smapi-model/ask_smapi_model/v1/isp/__init__.py new file mode 100644 index 0000000..e1da75c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/__init__.py @@ -0,0 +1,47 @@ +# 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 .in_skill_product_definition_response import InSkillProductDefinitionResponse +from .list_in_skill_product_response import ListInSkillProductResponse +from .editable_state import EditableState +from .tax_information import TaxInformation +from .in_skill_product_summary_response import InSkillProductSummaryResponse +from .price_listing import PriceListing +from .privacy_and_compliance import PrivacyAndCompliance +from .publishing_information import PublishingInformation +from .localized_publishing_information import LocalizedPublishingInformation +from .localized_privacy_and_compliance import LocalizedPrivacyAndCompliance +from .in_skill_product_summary import InSkillProductSummary +from .custom_product_prompts import CustomProductPrompts +from .associated_skill_response import AssociatedSkillResponse +from .subscription_payment_frequency import SubscriptionPaymentFrequency +from .summary_price_listing import SummaryPriceListing +from .subscription_information import SubscriptionInformation +from .purchasable_state import PurchasableState +from .product_response import ProductResponse +from .isp_summary_links import IspSummaryLinks +from .create_in_skill_product_request import CreateInSkillProductRequest +from .stage import Stage +from .product_type import ProductType +from .tax_information_category import TaxInformationCategory +from .currency import Currency +from .distribution_countries import DistributionCountries +from .in_skill_product_definition import InSkillProductDefinition +from .summary_marketplace_pricing import SummaryMarketplacePricing +from .list_in_skill_product import ListInSkillProduct +from .marketplace_pricing import MarketplacePricing +from .status import Status +from .update_in_skill_product_request import UpdateInSkillProductRequest 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 new file mode 100644 index 0000000..69f3bd3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/associated_skill_response.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 + from datetime import datetime + from ask_smapi_model.v1.links import Links + + +class AssociatedSkillResponse(object): + """ + 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. + :type associated_skill_ids: (optional) list[str] + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + + """ + deserialized_types = { + 'associated_skill_ids': 'list[str]', + 'links': 'ask_smapi_model.v1.links.Links', + 'is_truncated': 'bool', + 'next_token': 'str' + } # type: Dict + + attribute_map = { + 'associated_skill_ids': 'associatedSkillIds', + 'links': '_links', + 'is_truncated': 'isTruncated', + 'next_token': 'nextToken' + } # type: Dict + supports_multiple_types = False + + def __init__(self, associated_skill_ids=None, links=None, is_truncated=None, next_token=None): + # type: (Optional[List[object]], Optional[Links], 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. + :type associated_skill_ids: (optional) list[str] + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + """ + self.__discriminator_value = None # type: str + + self.associated_skill_ids = associated_skill_ids + self.links = links + self.is_truncated = is_truncated + 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, AssociatedSkillResponse): + 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/create_in_skill_product_request.py b/ask-smapi-model/ask_smapi_model/v1/isp/create_in_skill_product_request.py new file mode 100644 index 0000000..da9d2ac --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/create_in_skill_product_request.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 + from datetime import datetime + from ask_smapi_model.v1.isp.in_skill_product_definition import InSkillProductDefinition + + +class CreateInSkillProductRequest(object): + """ + + :param vendor_id: ID of the vendor owning the in-skill product. + :type vendor_id: (optional) str + :param in_skill_product_definition: + :type in_skill_product_definition: (optional) ask_smapi_model.v1.isp.in_skill_product_definition.InSkillProductDefinition + + """ + deserialized_types = { + 'vendor_id': 'str', + 'in_skill_product_definition': 'ask_smapi_model.v1.isp.in_skill_product_definition.InSkillProductDefinition' + } # type: Dict + + attribute_map = { + 'vendor_id': 'vendorId', + 'in_skill_product_definition': 'inSkillProductDefinition' + } # type: Dict + supports_multiple_types = False + + def __init__(self, vendor_id=None, in_skill_product_definition=None): + # type: (Optional[str], Optional[InSkillProductDefinition]) -> None + """ + + :param vendor_id: ID of the vendor owning the in-skill product. + :type vendor_id: (optional) str + :param in_skill_product_definition: + :type in_skill_product_definition: (optional) ask_smapi_model.v1.isp.in_skill_product_definition.InSkillProductDefinition + """ + self.__discriminator_value = None # type: str + + self.vendor_id = vendor_id + self.in_skill_product_definition = in_skill_product_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, CreateInSkillProductRequest): + 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/currency.py b/ask-smapi-model/ask_smapi_model/v1/isp/currency.py new file mode 100644 index 0000000..9a49ca4 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/currency.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 + from datetime import datetime + + +class Currency(Enum): + """ + Currency to use for in-skill product. + + + + Allowed enum values: [USD, GBP, EUR, JPY] + """ + USD = "USD" + GBP = "GBP" + EUR = "EUR" + JPY = "JPY" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> 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: (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/custom_product_prompts.py b/ask-smapi-model/ask_smapi_model/v1/isp/custom_product_prompts.py new file mode 100644 index 0000000..f96b8f1 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/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 + from datetime import datetime + + +class CustomProductPrompts(object): + """ + 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 + + """ + deserialized_types = { + 'purchase_prompt_description': 'str', + 'bought_confirmation_prompt': 'str' + } # type: Dict + + attribute_map = { + 'purchase_prompt_description': 'purchasePromptDescription', + 'bought_confirmation_prompt': 'boughtConfirmationPrompt' + } # type: Dict + supports_multiple_types = False + + def __init__(self, purchase_prompt_description=None, bought_confirmation_prompt=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 + """ + self.__discriminator_value = None # type: str + + self.purchase_prompt_description = purchase_prompt_description + self.bought_confirmation_prompt = bought_confirmation_prompt + + 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/isp/distribution_countries.py b/ask-smapi-model/ask_smapi_model/v1/isp/distribution_countries.py new file mode 100644 index 0000000..c05eb7f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/distribution_countries.py @@ -0,0 +1,303 @@ +# 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 DistributionCountries(Enum): + """ + + + Allowed enum values: [AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, HR, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IQ, IE, IM, IL, IT, CI, JM, JP, JE, JO, KZ, KE, KI, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, AN, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SK, SI, SB, SO, ZA, GS, ES, LK, SR, SJ, SZ, SE, CH, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW] + """ + AF = "AF" + AX = "AX" + AL = "AL" + DZ = "DZ" + AS = "AS" + AD = "AD" + AO = "AO" + AI = "AI" + AQ = "AQ" + AG = "AG" + AR = "AR" + AM = "AM" + AW = "AW" + AU = "AU" + AT = "AT" + AZ = "AZ" + BS = "BS" + BH = "BH" + BD = "BD" + BB = "BB" + BY = "BY" + BE = "BE" + BZ = "BZ" + BJ = "BJ" + BM = "BM" + BT = "BT" + BO = "BO" + BA = "BA" + BW = "BW" + BV = "BV" + BR = "BR" + IO = "IO" + BN = "BN" + BG = "BG" + BF = "BF" + BI = "BI" + KH = "KH" + CM = "CM" + CA = "CA" + CV = "CV" + KY = "KY" + CF = "CF" + TD = "TD" + CL = "CL" + CN = "CN" + CX = "CX" + CC = "CC" + CO = "CO" + KM = "KM" + CG = "CG" + CD = "CD" + CK = "CK" + CR = "CR" + HR = "HR" + CY = "CY" + CZ = "CZ" + DK = "DK" + DJ = "DJ" + DM = "DM" + DO = "DO" + EC = "EC" + EG = "EG" + SV = "SV" + GQ = "GQ" + ER = "ER" + EE = "EE" + ET = "ET" + FK = "FK" + FO = "FO" + FJ = "FJ" + FI = "FI" + FR = "FR" + GF = "GF" + PF = "PF" + TF = "TF" + GA = "GA" + GM = "GM" + GE = "GE" + DE = "DE" + GH = "GH" + GI = "GI" + GR = "GR" + GL = "GL" + GD = "GD" + GP = "GP" + GU = "GU" + GT = "GT" + GG = "GG" + GN = "GN" + GW = "GW" + GY = "GY" + HT = "HT" + HM = "HM" + VA = "VA" + HN = "HN" + HK = "HK" + HU = "HU" + IS = "IS" + IN = "IN" + ID = "ID" + IQ = "IQ" + IE = "IE" + IM = "IM" + IL = "IL" + IT = "IT" + CI = "CI" + JM = "JM" + JP = "JP" + JE = "JE" + JO = "JO" + KZ = "KZ" + KE = "KE" + KI = "KI" + KR = "KR" + KW = "KW" + KG = "KG" + LA = "LA" + LV = "LV" + LB = "LB" + LS = "LS" + LR = "LR" + LY = "LY" + LI = "LI" + LT = "LT" + LU = "LU" + MO = "MO" + MK = "MK" + MG = "MG" + MW = "MW" + MY = "MY" + MV = "MV" + ML = "ML" + MT = "MT" + MH = "MH" + MQ = "MQ" + MR = "MR" + MU = "MU" + YT = "YT" + MX = "MX" + FM = "FM" + MD = "MD" + MC = "MC" + MN = "MN" + ME = "ME" + MS = "MS" + MA = "MA" + MZ = "MZ" + MM = "MM" + NA = "NA" + NR = "NR" + NP = "NP" + NL = "NL" + AN = "AN" + NC = "NC" + NZ = "NZ" + NI = "NI" + NE = "NE" + NG = "NG" + NU = "NU" + NF = "NF" + MP = "MP" + NO = "NO" + OM = "OM" + PK = "PK" + PW = "PW" + PS = "PS" + PA = "PA" + PG = "PG" + PY = "PY" + PE = "PE" + PH = "PH" + PN = "PN" + PL = "PL" + PT = "PT" + PR = "PR" + QA = "QA" + RE = "RE" + RO = "RO" + RU = "RU" + RW = "RW" + BL = "BL" + SH = "SH" + KN = "KN" + LC = "LC" + MF = "MF" + PM = "PM" + VC = "VC" + WS = "WS" + SM = "SM" + ST = "ST" + SA = "SA" + SN = "SN" + RS = "RS" + SC = "SC" + SL = "SL" + SG = "SG" + SK = "SK" + SI = "SI" + SB = "SB" + SO = "SO" + ZA = "ZA" + GS = "GS" + ES = "ES" + LK = "LK" + SR = "SR" + SJ = "SJ" + SZ = "SZ" + SE = "SE" + CH = "CH" + TW = "TW" + TJ = "TJ" + TZ = "TZ" + TH = "TH" + TL = "TL" + TG = "TG" + TK = "TK" + TO = "TO" + TT = "TT" + TN = "TN" + TR = "TR" + TM = "TM" + TC = "TC" + TV = "TV" + UG = "UG" + UA = "UA" + AE = "AE" + GB = "GB" + US = "US" + UM = "UM" + UY = "UY" + UZ = "UZ" + VU = "VU" + VE = "VE" + VN = "VN" + VG = "VG" + VI = "VI" + WF = "WF" + EH = "EH" + YE = "YE" + ZM = "ZM" + ZW = "ZW" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DistributionCountries): + 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/editable_state.py b/ask-smapi-model/ask_smapi_model/v1/isp/editable_state.py new file mode 100644 index 0000000..33ca0a4 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/editable_state.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 + from datetime import datetime + + +class EditableState(Enum): + """ + Whether or not the in-skill product is editable. + + + + Allowed enum values: [EDITABLE, NOT_EDITABLE] + """ + EDITABLE = "EDITABLE" + NOT_EDITABLE = "NOT_EDITABLE" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, EditableState): + 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/in_skill_product_definition.py b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition.py new file mode 100644 index 0000000..f064545 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition.py @@ -0,0 +1,162 @@ +# 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.isp.subscription_information import SubscriptionInformation + from ask_smapi_model.v1.isp.product_type import ProductType + from ask_smapi_model.v1.isp.purchasable_state import PurchasableState + from ask_smapi_model.v1.isp.publishing_information import PublishingInformation + from ask_smapi_model.v1.isp.privacy_and_compliance import PrivacyAndCompliance + + +class InSkillProductDefinition(object): + """ + Defines the structure for an in-skill product. + + + :param version: Version of in-skill product definition. + :type version: (optional) str + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.isp.product_type.ProductType + :param reference_name: Developer selected in-skill product name. This is for developer reference only, it can be used to filter query results to identify a matching in-skill product. + :type reference_name: (optional) str + :param purchasable_state: + :type purchasable_state: (optional) ask_smapi_model.v1.isp.purchasable_state.PurchasableState + :param subscription_information: + :type subscription_information: (optional) ask_smapi_model.v1.isp.subscription_information.SubscriptionInformation + :param publishing_information: + :type publishing_information: (optional) ask_smapi_model.v1.isp.publishing_information.PublishingInformation + :param privacy_and_compliance: + :type privacy_and_compliance: (optional) ask_smapi_model.v1.isp.privacy_and_compliance.PrivacyAndCompliance + :param testing_instructions: Special instructions provided by the developer to test the in-skill product. + :type testing_instructions: (optional) str + + """ + deserialized_types = { + 'version': 'str', + 'object_type': 'ask_smapi_model.v1.isp.product_type.ProductType', + 'reference_name': 'str', + 'purchasable_state': 'ask_smapi_model.v1.isp.purchasable_state.PurchasableState', + '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', + 'testing_instructions': 'str' + } # type: Dict + + attribute_map = { + 'version': 'version', + 'object_type': 'type', + 'reference_name': 'referenceName', + 'purchasable_state': 'purchasableState', + 'subscription_information': 'subscriptionInformation', + 'publishing_information': 'publishingInformation', + 'privacy_and_compliance': 'privacyAndCompliance', + 'testing_instructions': 'testingInstructions' + } # 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[ProductType], Optional[str], Optional[PurchasableState], Optional[SubscriptionInformation], Optional[PublishingInformation], Optional[PrivacyAndCompliance], Optional[str]) -> None + """Defines the structure for an in-skill product. + + :param version: Version of in-skill product definition. + :type version: (optional) str + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.isp.product_type.ProductType + :param reference_name: Developer selected in-skill product name. This is for developer reference only, it can be used to filter query results to identify a matching in-skill product. + :type reference_name: (optional) str + :param purchasable_state: + :type purchasable_state: (optional) ask_smapi_model.v1.isp.purchasable_state.PurchasableState + :param subscription_information: + :type subscription_information: (optional) ask_smapi_model.v1.isp.subscription_information.SubscriptionInformation + :param publishing_information: + :type publishing_information: (optional) ask_smapi_model.v1.isp.publishing_information.PublishingInformation + :param privacy_and_compliance: + :type privacy_and_compliance: (optional) ask_smapi_model.v1.isp.privacy_and_compliance.PrivacyAndCompliance + :param testing_instructions: Special instructions provided by the developer to test the in-skill product. + :type testing_instructions: (optional) str + """ + self.__discriminator_value = None # type: str + + self.version = version + self.object_type = object_type + self.reference_name = reference_name + self.purchasable_state = purchasable_state + self.subscription_information = subscription_information + self.publishing_information = publishing_information + self.privacy_and_compliance = privacy_and_compliance + self.testing_instructions = testing_instructions + + 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, InSkillProductDefinition): + 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/in_skill_product_definition_response.py b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition_response.py new file mode 100644 index 0000000..74979bf --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_definition_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 + from datetime import datetime + from ask_smapi_model.v1.isp.in_skill_product_definition import InSkillProductDefinition + + +class InSkillProductDefinitionResponse(object): + """ + Defines In-skill product response. + + + :param in_skill_product_definition: + :type in_skill_product_definition: (optional) ask_smapi_model.v1.isp.in_skill_product_definition.InSkillProductDefinition + + """ + deserialized_types = { + 'in_skill_product_definition': 'ask_smapi_model.v1.isp.in_skill_product_definition.InSkillProductDefinition' + } # type: Dict + + attribute_map = { + 'in_skill_product_definition': 'inSkillProductDefinition' + } # type: Dict + supports_multiple_types = False + + def __init__(self, in_skill_product_definition=None): + # type: (Optional[InSkillProductDefinition]) -> None + """Defines In-skill product response. + + :param in_skill_product_definition: + :type in_skill_product_definition: (optional) ask_smapi_model.v1.isp.in_skill_product_definition.InSkillProductDefinition + """ + self.__discriminator_value = None # type: str + + self.in_skill_product_definition = in_skill_product_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, InSkillProductDefinitionResponse): + 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/in_skill_product_summary.py b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary.py new file mode 100644 index 0000000..7cba287 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary.py @@ -0,0 +1,185 @@ +# 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.isp.product_type import ProductType + from ask_smapi_model.v1.isp.status import Status + from ask_smapi_model.v1.isp.purchasable_state import PurchasableState + from ask_smapi_model.v1.isp.editable_state import EditableState + from ask_smapi_model.v1.isp.summary_marketplace_pricing import SummaryMarketplacePricing + from ask_smapi_model.v1.isp.stage import Stage + from ask_smapi_model.v1.isp.isp_summary_links import IspSummaryLinks + + +class InSkillProductSummary(object): + """ + Information about the in-skill product that is not editable. + + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.isp.product_type.ProductType + :param product_id: primary identifier of in-skill product. + :type product_id: (optional) str + :param reference_name: Developer selected in-skill product name. This is for developer reference only, it can be used to filter query results to identify a matching in-skill product. + :type reference_name: (optional) str + :param last_updated: Date of last update. + :type last_updated: (optional) datetime + :param name_by_locale: + :type name_by_locale: (optional) dict(str, str) + :param status: + :type status: (optional) ask_smapi_model.v1.isp.status.Status + :param stage: + :type stage: (optional) ask_smapi_model.v1.isp.stage.Stage + :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 links: + :type links: (optional) ask_smapi_model.v1.isp.isp_summary_links.IspSummaryLinks + :param pricing: In-skill product pricing information. + :type pricing: (optional) dict(str, ask_smapi_model.v1.isp.summary_marketplace_pricing.SummaryMarketplacePricing) + + """ + deserialized_types = { + 'object_type': 'ask_smapi_model.v1.isp.product_type.ProductType', + 'product_id': 'str', + 'reference_name': 'str', + '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', + 'editable_state': 'ask_smapi_model.v1.isp.editable_state.EditableState', + 'purchasable_state': 'ask_smapi_model.v1.isp.purchasable_state.PurchasableState', + 'links': 'ask_smapi_model.v1.isp.isp_summary_links.IspSummaryLinks', + 'pricing': 'dict(str, ask_smapi_model.v1.isp.summary_marketplace_pricing.SummaryMarketplacePricing)' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'product_id': 'productId', + 'reference_name': 'referenceName', + 'last_updated': 'lastUpdated', + 'name_by_locale': 'nameByLocale', + 'status': 'status', + 'stage': 'stage', + 'editable_state': 'editableState', + 'purchasable_state': 'purchasableState', + '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[ProductType], Optional[str], Optional[str], Optional[datetime], Optional[Dict[str, object]], Optional[Status], Optional[Stage], Optional[EditableState], Optional[PurchasableState], Optional[IspSummaryLinks], Optional[Dict[str, SummaryMarketplacePricing]]) -> None + """Information about the in-skill product that is not editable. + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.isp.product_type.ProductType + :param product_id: primary identifier of in-skill product. + :type product_id: (optional) str + :param reference_name: Developer selected in-skill product name. This is for developer reference only, it can be used to filter query results to identify a matching in-skill product. + :type reference_name: (optional) str + :param last_updated: Date of last update. + :type last_updated: (optional) datetime + :param name_by_locale: + :type name_by_locale: (optional) dict(str, str) + :param status: + :type status: (optional) ask_smapi_model.v1.isp.status.Status + :param stage: + :type stage: (optional) ask_smapi_model.v1.isp.stage.Stage + :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 links: + :type links: (optional) ask_smapi_model.v1.isp.isp_summary_links.IspSummaryLinks + :param pricing: In-skill product pricing information. + :type pricing: (optional) dict(str, ask_smapi_model.v1.isp.summary_marketplace_pricing.SummaryMarketplacePricing) + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.product_id = product_id + self.reference_name = reference_name + self.last_updated = last_updated + self.name_by_locale = name_by_locale + self.status = status + self.stage = stage + self.editable_state = editable_state + self.purchasable_state = purchasable_state + self.links = links + self.pricing = pricing + + 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, InSkillProductSummary): + 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/in_skill_product_summary_response.py b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary_response.py new file mode 100644 index 0000000..376757e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/in_skill_product_summary_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 + from datetime import datetime + from ask_smapi_model.v1.isp.in_skill_product_summary import InSkillProductSummary + + +class InSkillProductSummaryResponse(object): + """ + In-skill product summary response. + + + :param in_skill_product_summary: + :type in_skill_product_summary: (optional) ask_smapi_model.v1.isp.in_skill_product_summary.InSkillProductSummary + + """ + deserialized_types = { + 'in_skill_product_summary': 'ask_smapi_model.v1.isp.in_skill_product_summary.InSkillProductSummary' + } # type: Dict + + attribute_map = { + 'in_skill_product_summary': 'inSkillProductSummary' + } # type: Dict + supports_multiple_types = False + + def __init__(self, in_skill_product_summary=None): + # type: (Optional[InSkillProductSummary]) -> None + """In-skill product summary response. + + :param in_skill_product_summary: + :type in_skill_product_summary: (optional) ask_smapi_model.v1.isp.in_skill_product_summary.InSkillProductSummary + """ + self.__discriminator_value = None # type: str + + self.in_skill_product_summary = in_skill_product_summary + + 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, InSkillProductSummaryResponse): + 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/isp_summary_links.py b/ask-smapi-model/ask_smapi_model/v1/isp/isp_summary_links.py new file mode 100644 index 0000000..ad1ce99 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/isp_summary_links.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 + from datetime import datetime + from ask_smapi_model.v1.link import Link + + +class IspSummaryLinks(object): + """ + + :param object_self: + :type object_self: (optional) ask_smapi_model.v1.link.Link + + """ + deserialized_types = { + 'object_self': 'ask_smapi_model.v1.link.Link' + } # type: Dict + + attribute_map = { + 'object_self': 'self' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_self=None): + # type: (Optional[Link]) -> None + """ + + :param object_self: + :type object_self: (optional) ask_smapi_model.v1.link.Link + """ + self.__discriminator_value = None # type: str + + self.object_self = object_self + + 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, IspSummaryLinks): + 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/list_in_skill_product.py b/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product.py new file mode 100644 index 0000000..91f9f68 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product.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 + from datetime import datetime + from ask_smapi_model.v1.links import Links + from ask_smapi_model.v1.isp.in_skill_product_summary import InSkillProductSummary + + +class ListInSkillProduct(object): + """ + List of in-skill products. + + + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param in_skill_products: Information for each in-skill product. + :type in_skill_products: (optional) list[ask_smapi_model.v1.isp.in_skill_product_summary.InSkillProductSummary] + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + + """ + deserialized_types = { + 'links': 'ask_smapi_model.v1.links.Links', + 'in_skill_products': 'list[ask_smapi_model.v1.isp.in_skill_product_summary.InSkillProductSummary]', + 'is_truncated': 'bool', + 'next_token': 'str' + } # type: Dict + + attribute_map = { + 'links': '_links', + 'in_skill_products': 'inSkillProducts', + 'is_truncated': 'isTruncated', + 'next_token': 'nextToken' + } # type: Dict + supports_multiple_types = False + + def __init__(self, links=None, in_skill_products=None, is_truncated=None, next_token=None): + # type: (Optional[Links], Optional[List[InSkillProductSummary]], Optional[bool], Optional[str]) -> None + """List of in-skill products. + + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param in_skill_products: Information for each in-skill product. + :type in_skill_products: (optional) list[ask_smapi_model.v1.isp.in_skill_product_summary.InSkillProductSummary] + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + """ + self.__discriminator_value = None # type: str + + self.links = links + self.in_skill_products = in_skill_products + self.is_truncated = is_truncated + 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, ListInSkillProduct): + 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/list_in_skill_product_response.py b/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product_response.py new file mode 100644 index 0000000..88501c8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/list_in_skill_product_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 + from datetime import datetime + from ask_smapi_model.v1.isp.list_in_skill_product import ListInSkillProduct + + +class ListInSkillProductResponse(object): + """ + List of in-skill product response. + + + :param in_skill_product_summary_list: + :type in_skill_product_summary_list: (optional) ask_smapi_model.v1.isp.list_in_skill_product.ListInSkillProduct + + """ + deserialized_types = { + 'in_skill_product_summary_list': 'ask_smapi_model.v1.isp.list_in_skill_product.ListInSkillProduct' + } # type: Dict + + attribute_map = { + 'in_skill_product_summary_list': 'inSkillProductSummaryList' + } # type: Dict + supports_multiple_types = False + + def __init__(self, in_skill_product_summary_list=None): + # type: (Optional[ListInSkillProduct]) -> None + """List of in-skill product response. + + :param in_skill_product_summary_list: + :type in_skill_product_summary_list: (optional) ask_smapi_model.v1.isp.list_in_skill_product.ListInSkillProduct + """ + self.__discriminator_value = None # type: str + + self.in_skill_product_summary_list = in_skill_product_summary_list + + 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, ListInSkillProductResponse): + 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/localized_privacy_and_compliance.py b/ask-smapi-model/ask_smapi_model/v1/isp/localized_privacy_and_compliance.py new file mode 100644 index 0000000..252145d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/localized_privacy_and_compliance.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 + from datetime import datetime + + +class LocalizedPrivacyAndCompliance(object): + """ + Defines the structure for localized privacy and compliance. + + + :param privacy_policy_url: Link to the privacy policy that applies to this in-skill product. + :type privacy_policy_url: (optional) str + + """ + deserialized_types = { + 'privacy_policy_url': 'str' + } # type: Dict + + attribute_map = { + 'privacy_policy_url': 'privacyPolicyUrl' + } # type: Dict + supports_multiple_types = False + + def __init__(self, privacy_policy_url=None): + # type: (Optional[str]) -> None + """Defines the structure for localized privacy and compliance. + + :param privacy_policy_url: Link to the privacy policy that applies to this in-skill product. + :type privacy_policy_url: (optional) str + """ + self.__discriminator_value = None # type: str + + self.privacy_policy_url = privacy_policy_url + + 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, LocalizedPrivacyAndCompliance): + 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/localized_publishing_information.py b/ask-smapi-model/ask_smapi_model/v1/isp/localized_publishing_information.py new file mode 100644 index 0000000..769cae7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/localized_publishing_information.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.isp.custom_product_prompts import CustomProductPrompts + + +class LocalizedPublishingInformation(object): + """ + 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. + :type name: (optional) str + :param small_icon_uri: Uri for the small icon image of the in-skill product. + :type small_icon_uri: (optional) str + :param large_icon_uri: Uri for the large icon image of the in-skill product. + :type large_icon_uri: (optional) str + :param summary: Short description of the in-skill product that displays on the in-skill product list page in the Alexa App. + :type summary: (optional) str + :param description: Description of the in-skill product's purpose and features, and how it works. Should describe any prerequisites like hardware or account requirements and detailed steps for the customer to get started. This description displays to customers on the in-skill product detail card in the Alexa app. + :type description: (optional) str + :param example_phrases: Example phrases appear on the in-skill product detail page and are the key utterances that customers can say to interact directly with the in-skill product. + :type example_phrases: (optional) list[str] + :param keywords: Search terms that can be used to describe the in-skill product. This helps customers find an in-skill product. + :type keywords: (optional) list[str] + :param custom_product_prompts: + :type custom_product_prompts: (optional) ask_smapi_model.v1.isp.custom_product_prompts.CustomProductPrompts + + """ + deserialized_types = { + 'name': 'str', + 'small_icon_uri': 'str', + 'large_icon_uri': 'str', + 'summary': 'str', + 'description': 'str', + 'example_phrases': 'list[str]', + 'keywords': 'list[str]', + 'custom_product_prompts': 'ask_smapi_model.v1.isp.custom_product_prompts.CustomProductPrompts' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'small_icon_uri': 'smallIconUri', + 'large_icon_uri': 'largeIconUri', + 'summary': 'summary', + 'description': 'description', + 'example_phrases': 'examplePhrases', + '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, 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[CustomProductPrompts]) -> 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. + :type name: (optional) str + :param small_icon_uri: Uri for the small icon image of the in-skill product. + :type small_icon_uri: (optional) str + :param large_icon_uri: Uri for the large icon image of the in-skill product. + :type large_icon_uri: (optional) str + :param summary: Short description of the in-skill product that displays on the in-skill product list page in the Alexa App. + :type summary: (optional) str + :param description: Description of the in-skill product's purpose and features, and how it works. Should describe any prerequisites like hardware or account requirements and detailed steps for the customer to get started. This description displays to customers on the in-skill product detail card in the Alexa app. + :type description: (optional) str + :param example_phrases: Example phrases appear on the in-skill product detail page and are the key utterances that customers can say to interact directly with the in-skill product. + :type example_phrases: (optional) list[str] + :param keywords: Search terms that can be used to describe the in-skill product. This helps customers find an in-skill product. + :type keywords: (optional) list[str] + :param custom_product_prompts: + :type custom_product_prompts: (optional) ask_smapi_model.v1.isp.custom_product_prompts.CustomProductPrompts + """ + self.__discriminator_value = None # type: str + + self.name = name + self.small_icon_uri = small_icon_uri + self.large_icon_uri = large_icon_uri + self.summary = summary + self.description = description + self.example_phrases = example_phrases + self.keywords = keywords + self.custom_product_prompts = custom_product_prompts + + 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, LocalizedPublishingInformation): + 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/marketplace_pricing.py b/ask-smapi-model/ask_smapi_model/v1/isp/marketplace_pricing.py new file mode 100644 index 0000000..b017fbd --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/marketplace_pricing.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 + from datetime import datetime + from ask_smapi_model.v1.isp.price_listing import PriceListing + + +class MarketplacePricing(object): + """ + 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. + :type release_date: (optional) datetime + :param default_price_listing: + :type default_price_listing: (optional) ask_smapi_model.v1.isp.price_listing.PriceListing + + """ + deserialized_types = { + 'release_date': 'datetime', + 'default_price_listing': 'ask_smapi_model.v1.isp.price_listing.PriceListing' + } # type: Dict + + attribute_map = { + 'release_date': 'releaseDate', + 'default_price_listing': 'defaultPriceListing' + } # type: Dict + supports_multiple_types = False + + def __init__(self, release_date=None, default_price_listing=None): + # type: (Optional[datetime], Optional[PriceListing]) -> 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. + :type release_date: (optional) datetime + :param default_price_listing: + :type default_price_listing: (optional) ask_smapi_model.v1.isp.price_listing.PriceListing + """ + self.__discriminator_value = None # type: str + + self.release_date = release_date + self.default_price_listing = default_price_listing + + 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/isp/price_listing.py b/ask-smapi-model/ask_smapi_model/v1/isp/price_listing.py new file mode 100644 index 0000000..9d58e01 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/price_listing.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 + from datetime import datetime + from ask_smapi_model.v1.isp.currency import Currency + + +class PriceListing(object): + """ + 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. + :type price: (optional) float + :param currency: + :type currency: (optional) ask_smapi_model.v1.isp.currency.Currency + + """ + deserialized_types = { + 'price': 'float', + 'currency': 'ask_smapi_model.v1.isp.currency.Currency' + } # type: Dict + + attribute_map = { + 'price': 'price', + 'currency': 'currency' + } # type: Dict + supports_multiple_types = False + + def __init__(self, price=None, currency=None): + # type: (Optional[float], Optional[Currency]) -> 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. + :type price: (optional) float + :param currency: + :type currency: (optional) ask_smapi_model.v1.isp.currency.Currency + """ + self.__discriminator_value = None # type: str + + self.price = price + self.currency = currency + + 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, PriceListing): + 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/privacy_and_compliance.py b/ask-smapi-model/ask_smapi_model/v1/isp/privacy_and_compliance.py new file mode 100644 index 0000000..c60d345 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/privacy_and_compliance.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 + from datetime import datetime + from ask_smapi_model.v1.isp.localized_privacy_and_compliance import LocalizedPrivacyAndCompliance + + +class PrivacyAndCompliance(object): + """ + Defines the structure for privacy and compliance. + + + :param locales: Defines the structure for locale specific privacy and compliance. + :type locales: (optional) dict(str, ask_smapi_model.v1.isp.localized_privacy_and_compliance.LocalizedPrivacyAndCompliance) + + """ + deserialized_types = { + 'locales': 'dict(str, ask_smapi_model.v1.isp.localized_privacy_and_compliance.LocalizedPrivacyAndCompliance)' + } # type: Dict + + attribute_map = { + 'locales': 'locales' + } # type: Dict + supports_multiple_types = False + + def __init__(self, locales=None): + # type: (Optional[Dict[str, LocalizedPrivacyAndCompliance]]) -> None + """Defines the structure for privacy and compliance. + + :param locales: Defines the structure for locale specific privacy and compliance. + :type locales: (optional) dict(str, ask_smapi_model.v1.isp.localized_privacy_and_compliance.LocalizedPrivacyAndCompliance) + """ + 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, PrivacyAndCompliance): + 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/product_response.py b/ask-smapi-model/ask_smapi_model/v1/isp/product_response.py new file mode 100644 index 0000000..6c819ce --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/product_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 + from datetime import datetime + + +class ProductResponse(object): + """ + Product ID information. + + + :param product_id: ID of the in-skill product created. + :type product_id: (optional) str + + """ + deserialized_types = { + 'product_id': 'str' + } # type: Dict + + attribute_map = { + 'product_id': 'productId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, product_id=None): + # type: (Optional[str]) -> None + """Product ID information. + + :param product_id: ID of the in-skill product created. + :type product_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.product_id = product_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, ProductResponse): + 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/product_type.py b/ask-smapi-model/ask_smapi_model/v1/isp/product_type.py new file mode 100644 index 0000000..e4674e7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/product_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 + from datetime import datetime + + +class ProductType(Enum): + """ + Type of in-skill product. + + + + Allowed enum values: [SUBSCRIPTION, ENTITLEMENT, CONSUMABLE] + """ + SUBSCRIPTION = "SUBSCRIPTION" + ENTITLEMENT = "ENTITLEMENT" + CONSUMABLE = "CONSUMABLE" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ProductType): + 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/publishing_information.py b/ask-smapi-model/ask_smapi_model/v1/isp/publishing_information.py new file mode 100644 index 0000000..e959149 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/publishing_information.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.isp.localized_publishing_information import LocalizedPublishingInformation + from ask_smapi_model.v1.isp.marketplace_pricing import MarketplacePricing + from ask_smapi_model.v1.isp.distribution_countries import DistributionCountries + from ask_smapi_model.v1.isp.tax_information import TaxInformation + + +class PublishingInformation(object): + """ + Defines the structure for in-skill product publishing information. + + + :param locales: Defines the structure for locale specific publishing information for an in-skill product. + :type locales: (optional) dict(str, ask_smapi_model.v1.isp.localized_publishing_information.LocalizedPublishingInformation) + :param distribution_countries: List of countries where the in-skill product is available. + :type distribution_countries: (optional) list[ask_smapi_model.v1.isp.distribution_countries.DistributionCountries] + :param pricing: Defines the structure for in-skill product pricing. + :type pricing: (optional) dict(str, ask_smapi_model.v1.isp.marketplace_pricing.MarketplacePricing) + :param tax_information: + :type tax_information: (optional) ask_smapi_model.v1.isp.tax_information.TaxInformation + + """ + deserialized_types = { + 'locales': 'dict(str, ask_smapi_model.v1.isp.localized_publishing_information.LocalizedPublishingInformation)', + 'distribution_countries': 'list[ask_smapi_model.v1.isp.distribution_countries.DistributionCountries]', + 'pricing': 'dict(str, ask_smapi_model.v1.isp.marketplace_pricing.MarketplacePricing)', + 'tax_information': 'ask_smapi_model.v1.isp.tax_information.TaxInformation' + } # type: Dict + + attribute_map = { + 'locales': 'locales', + 'distribution_countries': 'distributionCountries', + 'pricing': 'pricing', + 'tax_information': 'taxInformation' + } # type: Dict + supports_multiple_types = False + + def __init__(self, locales=None, distribution_countries=None, pricing=None, tax_information=None): + # type: (Optional[Dict[str, LocalizedPublishingInformation]], Optional[List[DistributionCountries]], Optional[Dict[str, MarketplacePricing]], Optional[TaxInformation]) -> 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. + :type locales: (optional) dict(str, ask_smapi_model.v1.isp.localized_publishing_information.LocalizedPublishingInformation) + :param distribution_countries: List of countries where the in-skill product is available. + :type distribution_countries: (optional) list[ask_smapi_model.v1.isp.distribution_countries.DistributionCountries] + :param pricing: Defines the structure for in-skill product pricing. + :type pricing: (optional) dict(str, ask_smapi_model.v1.isp.marketplace_pricing.MarketplacePricing) + :param tax_information: + :type tax_information: (optional) ask_smapi_model.v1.isp.tax_information.TaxInformation + """ + self.__discriminator_value = None # type: str + + self.locales = locales + self.distribution_countries = distribution_countries + 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, PublishingInformation): + 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/purchasable_state.py b/ask-smapi-model/ask_smapi_model/v1/isp/purchasable_state.py new file mode 100644 index 0000000..7b45d13 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/purchasable_state.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 + from datetime import datetime + + +class PurchasableState(Enum): + """ + Whether or not the in-skill product is purchasable by customers. A product that is not purchasable will prevent new customers from being prompted to purchase the product. Customers who already own the product will see no effect and continue to have access to the product features. + + + + Allowed enum values: [PURCHASABLE, NOT_PURCHASABLE] + """ + PURCHASABLE = "PURCHASABLE" + NOT_PURCHASABLE = "NOT_PURCHASABLE" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, PurchasableState): + 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/py.typed b/ask-smapi-model/ask_smapi_model/v1/isp/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/ask-smapi-model/ask_smapi_model/v1/isp/stage.py b/ask-smapi-model/ask_smapi_model/v1/isp/stage.py new file mode 100644 index 0000000..15413f8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/stage.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 + from datetime import datetime + + +class Stage(Enum): + """ + Stage of in-skill product. + + + + Allowed enum values: [development, live] + """ + development = "development" + live = "live" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, Stage): + 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/status.py b/ask-smapi-model/ask_smapi_model/v1/isp/status.py new file mode 100644 index 0000000..edad1a6 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/status.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 + from datetime import datetime + + +class Status(Enum): + """ + Current status of in-skill product. + + + + Allowed enum values: [INCOMPLETE, COMPLETE, CERTIFICATION, PUBLISHED, SUPPRESSED] + """ + INCOMPLETE = "INCOMPLETE" + COMPLETE = "COMPLETE" + CERTIFICATION = "CERTIFICATION" + PUBLISHED = "PUBLISHED" + SUPPRESSED = "SUPPRESSED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, Status): + 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/subscription_information.py b/ask-smapi-model/ask_smapi_model/v1/isp/subscription_information.py new file mode 100644 index 0000000..68f01d3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/subscription_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 + from datetime import datetime + from ask_smapi_model.v1.isp.subscription_payment_frequency import SubscriptionPaymentFrequency + + +class SubscriptionInformation(object): + """ + Defines the structure for in-skill product subscription information. + + + :param subscription_payment_frequency: + :type subscription_payment_frequency: (optional) ask_smapi_model.v1.isp.subscription_payment_frequency.SubscriptionPaymentFrequency + :param subscription_trial_period_days: Days of free trial period for subscription. Max allowed is 365 days. + :type subscription_trial_period_days: (optional) int + + """ + deserialized_types = { + 'subscription_payment_frequency': 'ask_smapi_model.v1.isp.subscription_payment_frequency.SubscriptionPaymentFrequency', + 'subscription_trial_period_days': 'int' + } # type: Dict + + attribute_map = { + 'subscription_payment_frequency': 'subscriptionPaymentFrequency', + 'subscription_trial_period_days': 'subscriptionTrialPeriodDays' + } # type: Dict + supports_multiple_types = False + + def __init__(self, subscription_payment_frequency=None, subscription_trial_period_days=None): + # type: (Optional[SubscriptionPaymentFrequency], Optional[int]) -> None + """Defines the structure for in-skill product subscription information. + + :param subscription_payment_frequency: + :type subscription_payment_frequency: (optional) ask_smapi_model.v1.isp.subscription_payment_frequency.SubscriptionPaymentFrequency + :param subscription_trial_period_days: Days of free trial period for subscription. Max allowed is 365 days. + :type subscription_trial_period_days: (optional) int + """ + self.__discriminator_value = None # type: str + + self.subscription_payment_frequency = subscription_payment_frequency + self.subscription_trial_period_days = subscription_trial_period_days + + 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/isp/subscription_payment_frequency.py b/ask-smapi-model/ask_smapi_model/v1/isp/subscription_payment_frequency.py new file mode 100644 index 0000000..d5dca0b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/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 + 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, object] + """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: (object) -> 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: (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/summary_marketplace_pricing.py b/ask-smapi-model/ask_smapi_model/v1/isp/summary_marketplace_pricing.py new file mode 100644 index 0000000..d8e1429 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/summary_marketplace_pricing.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 + from datetime import datetime + from ask_smapi_model.v1.isp.summary_price_listing import SummaryPriceListing + + +class SummaryMarketplacePricing(object): + """ + 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. + :type release_date: (optional) datetime + :param default_price_listing: + :type default_price_listing: (optional) ask_smapi_model.v1.isp.summary_price_listing.SummaryPriceListing + + """ + deserialized_types = { + 'release_date': 'datetime', + 'default_price_listing': 'ask_smapi_model.v1.isp.summary_price_listing.SummaryPriceListing' + } # type: Dict + + attribute_map = { + 'release_date': 'releaseDate', + 'default_price_listing': 'defaultPriceListing' + } # type: Dict + supports_multiple_types = False + + def __init__(self, release_date=None, default_price_listing=None): + # type: (Optional[datetime], Optional[SummaryPriceListing]) -> 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. + :type release_date: (optional) datetime + :param default_price_listing: + :type default_price_listing: (optional) ask_smapi_model.v1.isp.summary_price_listing.SummaryPriceListing + """ + self.__discriminator_value = None # type: str + + self.release_date = release_date + self.default_price_listing = default_price_listing + + 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, SummaryMarketplacePricing): + 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/summary_price_listing.py b/ask-smapi-model/ask_smapi_model/v1/isp/summary_price_listing.py new file mode 100644 index 0000000..a1e2235 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/summary_price_listing.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 + from datetime import datetime + from ask_smapi_model.v1.isp.currency import Currency + + +class SummaryPriceListing(object): + """ + Price listing information for in-skill product. + + + :param price: The price of an in-skill product. + :type price: (optional) float + :param prime_member_price: The prime price of an in-skill product. + :type prime_member_price: (optional) float + :param currency: + :type currency: (optional) ask_smapi_model.v1.isp.currency.Currency + + """ + deserialized_types = { + 'price': 'float', + 'prime_member_price': 'float', + 'currency': 'ask_smapi_model.v1.isp.currency.Currency' + } # type: Dict + + attribute_map = { + 'price': 'price', + 'prime_member_price': 'primeMemberPrice', + 'currency': 'currency' + } # type: Dict + supports_multiple_types = False + + def __init__(self, price=None, prime_member_price=None, currency=None): + # type: (Optional[float], Optional[float], Optional[Currency]) -> None + """Price listing information for in-skill product. + + :param price: The price of an in-skill product. + :type price: (optional) float + :param prime_member_price: The prime price of an in-skill product. + :type prime_member_price: (optional) float + :param currency: + :type currency: (optional) ask_smapi_model.v1.isp.currency.Currency + """ + self.__discriminator_value = None # type: str + + self.price = price + self.prime_member_price = prime_member_price + self.currency = currency + + 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, SummaryPriceListing): + 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/tax_information.py b/ask-smapi-model/ask_smapi_model/v1/isp/tax_information.py new file mode 100644 index 0000000..4b74a79 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/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 + from datetime import datetime + from ask_smapi_model.v1.isp.tax_information_category import TaxInformationCategory + + +class TaxInformation(object): + """ + Defines the structure for in-skill product tax information. + + + :param category: + :type category: (optional) ask_smapi_model.v1.isp.tax_information_category.TaxInformationCategory + + """ + deserialized_types = { + 'category': 'ask_smapi_model.v1.isp.tax_information_category.TaxInformationCategory' + } # type: Dict + + attribute_map = { + 'category': 'category' + } # type: Dict + supports_multiple_types = False + + def __init__(self, category=None): + # type: (Optional[TaxInformationCategory]) -> None + """Defines the structure for in-skill product tax information. + + :param category: + :type category: (optional) ask_smapi_model.v1.isp.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/isp/tax_information_category.py b/ask-smapi-model/ask_smapi_model/v1/isp/tax_information_category.py new file mode 100644 index 0000000..36347ba --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/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 + from datetime import datetime + + +class TaxInformationCategory(Enum): + """ + Select tax category that best describes in-skill product. Choice will be validated during certification process. + + + + 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, object] + """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: (object) -> 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: (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/update_in_skill_product_request.py b/ask-smapi-model/ask_smapi_model/v1/isp/update_in_skill_product_request.py new file mode 100644 index 0000000..4b1916b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/isp/update_in_skill_product_request.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 + from datetime import datetime + from ask_smapi_model.v1.isp.in_skill_product_definition import InSkillProductDefinition + + +class UpdateInSkillProductRequest(object): + """ + + :param in_skill_product_definition: + :type in_skill_product_definition: (optional) ask_smapi_model.v1.isp.in_skill_product_definition.InSkillProductDefinition + + """ + deserialized_types = { + 'in_skill_product_definition': 'ask_smapi_model.v1.isp.in_skill_product_definition.InSkillProductDefinition' + } # type: Dict + + attribute_map = { + 'in_skill_product_definition': 'inSkillProductDefinition' + } # type: Dict + supports_multiple_types = False + + def __init__(self, in_skill_product_definition=None): + # type: (Optional[InSkillProductDefinition]) -> None + """ + + :param in_skill_product_definition: + :type in_skill_product_definition: (optional) ask_smapi_model.v1.isp.in_skill_product_definition.InSkillProductDefinition + """ + self.__discriminator_value = None # type: str + + self.in_skill_product_definition = in_skill_product_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, UpdateInSkillProductRequest): + 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/link.py b/ask-smapi-model/ask_smapi_model/v1/link.py new file mode 100644 index 0000000..f49885a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/link.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 + from datetime import datetime + + +class Link(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 + """ + + :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""" + 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, Link): + 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/links.py b/ask-smapi-model/ask_smapi_model/v1/links.py new file mode 100644 index 0000000..2487a2a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/links.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 + from datetime import datetime + from ask_smapi_model.v1.link import Link + + +class Links(object): + """ + Links for the API navigation. + + + :param object_self: + :type object_self: (optional) ask_smapi_model.v1.link.Link + :param next: + :type next: (optional) ask_smapi_model.v1.link.Link + + """ + deserialized_types = { + 'object_self': 'ask_smapi_model.v1.link.Link', + 'next': 'ask_smapi_model.v1.link.Link' + } # type: Dict + + attribute_map = { + 'object_self': 'self', + 'next': 'next' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_self=None, next=None): + # type: (Optional[Link], Optional[Link]) -> None + """Links for the API navigation. + + :param object_self: + :type object_self: (optional) ask_smapi_model.v1.link.Link + :param next: + :type next: (optional) ask_smapi_model.v1.link.Link + """ + self.__discriminator_value = None # type: str + + self.object_self = object_self + self.next = next + + 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, Links): + 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/py.typed b/ask-smapi-model/ask_smapi_model/v1/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/__init__.py new file mode 100644 index 0000000..863479a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/__init__.py @@ -0,0 +1,60 @@ +# 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 .export_response import ExportResponse +from .instance import Instance +from .interface_intent import InterfaceIntent +from .image_attributes import ImageAttributes +from .validation_endpoint import ValidationEndpoint +from .validation_data_types import ValidationDataTypes +from .interface_definition import InterfaceDefinition +from .create_skill_with_package_request import CreateSkillWithPackageRequest +from .standardized_error_code import StandardizedErrorCode +from .withdraw_request import WithdrawRequest +from .resource_import_status import ResourceImportStatus +from .import_response_skill import ImportResponseSkill +from .skill_interaction_model_status import SkillInteractionModelStatus +from .skill_summary_apis import SkillSummaryApis +from .create_skill_response import CreateSkillResponse +from .ssl_certificate_payload import SSLCertificatePayload +from .export_response_skill import ExportResponseSkill +from .action import Action +from .build_step_name import BuildStepName +from .last_update_request import LastUpdateRequest +from .validation_details import ValidationDetails +from .reason import Reason +from .list_skill_response import ListSkillResponse +from .image_dimension import ImageDimension +from .image_size import ImageSize +from .validation_feature import ValidationFeature +from .regional_ssl_certificate import RegionalSSLCertificate +from .agreement_type import AgreementType +from .skill_interaction_model import SkillInteractionModel +from .publication_method import PublicationMethod +from .image_size_unit import ImageSizeUnit +from .update_skill_with_package_request import UpdateSkillWithPackageRequest +from .skill_status import SkillStatus +from .build_step import BuildStep +from .response_status import ResponseStatus +from .resource_status import ResourceStatus +from .build_details import BuildDetails +from .skill_summary import SkillSummary +from .standardized_error import StandardizedError +from .create_skill_request import CreateSkillRequest +from .status import Status +from .import_response import ImportResponse +from .submit_skill_for_certification_request import SubmitSkillForCertificationRequest +from .upload_response import UploadResponse 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 new file mode 100644 index 0000000..b8cfb5b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/__init__.py @@ -0,0 +1,20 @@ +# 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 .account_linking_response import AccountLinkingResponse +from .account_linking_type import AccountLinkingType +from .access_token_scheme_type import AccessTokenSchemeType +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 new file mode 100644 index 0000000..f4b101a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/access_token_scheme_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 + from datetime import datetime + + +class AccessTokenSchemeType(Enum): + """ + The type of client authentication scheme. + + + + Allowed enum values: [HTTP_BASIC, REQUEST_BODY_CREDENTIALS] + """ + HTTP_BASIC = "HTTP_BASIC" + REQUEST_BODY_CREDENTIALS = "REQUEST_BODY_CREDENTIALS" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, AccessTokenSchemeType): + 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_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_request.py new file mode 100644 index 0000000..9fae994 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_request.py @@ -0,0 +1,180 @@ +# 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.account_linking.access_token_scheme_type import AccessTokenSchemeType + from ask_smapi_model.v1.skill.account_linking.account_linking_type import AccountLinkingType + + +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] + + """ + 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]' + } # 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' + } # 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): + # type: (Optional[AccountLinkingType], Optional[str], Optional[List[object]], Optional[str], Optional[List[object]], Optional[str], Optional[str], Optional[AccessTokenSchemeType], Optional[int], Optional[str], Optional[List[object]]) -> 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] + """ + 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 + + 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, AccountLinkingRequest): + 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 new file mode 100644 index 0000000..55a1cd5 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_response.py @@ -0,0 +1,166 @@ +# 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.account_linking.access_token_scheme_type import AccessTokenSchemeType + from ask_smapi_model.v1.skill.account_linking.account_linking_type import AccountLinkingType + + +class AccountLinkingResponse(object): + """ + The account linking information of a skill. + + + :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 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 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] + + """ + 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', + '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]' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'authorization_url': 'authorizationUrl', + 'domains': 'domains', + 'client_id': 'clientId', + 'scopes': 'scopes', + 'access_token_url': 'accessTokenUrl', + 'access_token_scheme': 'accessTokenScheme', + 'default_token_expiration_in_seconds': 'defaultTokenExpirationInSeconds', + 'redirect_urls': 'redirectUrls' + } # 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): + # type: (Optional[AccountLinkingType], Optional[str], Optional[List[object]], Optional[str], Optional[List[object]], Optional[str], Optional[AccessTokenSchemeType], Optional[int], Optional[List[object]]) -> None + """The account linking information of a skill. + + :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 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 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] + """ + 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.access_token_scheme = access_token_scheme + self.default_token_expiration_in_seconds = default_token_expiration_in_seconds + self.redirect_urls = redirect_urls + + 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, AccountLinkingResponse): + 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_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_type.py new file mode 100644 index 0000000..0973732 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/account_linking_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 + from datetime import datetime + + +class AccountLinkingType(Enum): + """ + The type of account linking. + + + + Allowed enum values: [AUTH_CODE, IMPLICIT] + """ + AUTH_CODE = "AUTH_CODE" + IMPLICIT = "IMPLICIT" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, AccountLinkingType): + 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/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/account_linking/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/action.py b/ask-smapi-model/ask_smapi_model/v1/skill/action.py new file mode 100644 index 0000000..f39ac75 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/action.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 + from datetime import datetime + + +class Action(Enum): + """ + Action of a resource. + + + + Allowed enum values: [CREATE, UPDATE, ASSOCIATE, DISASSOCIATE] + """ + CREATE = "CREATE" + UPDATE = "UPDATE" + ASSOCIATE = "ASSOCIATE" + DISASSOCIATE = "DISASSOCIATE" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, Action): + 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/agreement_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/agreement_type.py new file mode 100644 index 0000000..65ff6d2 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/agreement_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 + from datetime import datetime + + +class AgreementType(Enum): + """ + Type of the agreement that the customer must be compliant to. + + + + Allowed enum values: [EXPORT_COMPLIANCE] + """ + EXPORT_COMPLIANCE = "EXPORT_COMPLIANCE" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, AgreementType): + 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/alexa_hosted/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/__init__.py new file mode 100644 index 0000000..5a0cfd0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/__init__.py @@ -0,0 +1,27 @@ +# 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 .hosted_skill_repository import HostedSkillRepository +from .hosted_skill_permission_type import HostedSkillPermissionType +from .hosted_skill_info import HostedSkillInfo +from .hosted_skill_repository_info import HostedSkillRepositoryInfo +from .hosted_skill_repository_credentials_list import HostedSkillRepositoryCredentialsList +from .hosted_skill_runtime import HostedSkillRuntime +from .hosted_skill_permission_status import HostedSkillPermissionStatus +from .hosted_skill_permission import HostedSkillPermission +from .hosted_skill_metadata import HostedSkillMetadata +from .hosted_skill_repository_credentials_request import HostedSkillRepositoryCredentialsRequest +from .hosted_skill_repository_credentials import HostedSkillRepositoryCredentials 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 new file mode 100644 index 0000000..250f433 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_info.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 + from datetime import datetime + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime import HostedSkillRuntime + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info import HostedSkillRepositoryInfo + + +class HostedSkillInfo(object): + """ + + :param repository: + :type repository: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info.HostedSkillRepositoryInfo + :param runtime: + :type runtime: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime.HostedSkillRuntime + + """ + deserialized_types = { + 'repository': 'ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info.HostedSkillRepositoryInfo', + 'runtime': 'ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime.HostedSkillRuntime' + } # type: Dict + + attribute_map = { + 'repository': 'repository', + 'runtime': 'runtime' + } # type: Dict + supports_multiple_types = False + + def __init__(self, repository=None, runtime=None): + # type: (Optional[HostedSkillRepositoryInfo], Optional[HostedSkillRuntime]) -> None + """ + + :param repository: + :type repository: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info.HostedSkillRepositoryInfo + :param runtime: + :type runtime: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_runtime.HostedSkillRuntime + """ + self.__discriminator_value = None # type: str + + self.repository = repository + self.runtime = runtime + + 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, HostedSkillInfo): + 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/alexa_hosted/hosted_skill_metadata.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.py new file mode 100644 index 0000000..ed22b28 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.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 + from datetime import datetime + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_info import HostedSkillInfo + + +class HostedSkillMetadata(object): + """ + Alexa Hosted skill's metadata + + + :param alexa_hosted: + :type alexa_hosted: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_info.HostedSkillInfo + + """ + deserialized_types = { + 'alexa_hosted': 'ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_info.HostedSkillInfo' + } # type: Dict + + attribute_map = { + 'alexa_hosted': 'alexaHosted' + } # type: Dict + supports_multiple_types = False + + def __init__(self, alexa_hosted=None): + # type: (Optional[HostedSkillInfo]) -> None + """Alexa Hosted skill's metadata + + :param alexa_hosted: + :type alexa_hosted: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_info.HostedSkillInfo + """ + self.__discriminator_value = None # type: str + + self.alexa_hosted = alexa_hosted + + 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, HostedSkillMetadata): + 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/alexa_hosted/hosted_skill_permission.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission.py new file mode 100644 index 0000000..d2763eb --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission.py @@ -0,0 +1,124 @@ +# 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.alexa_hosted.hosted_skill_permission_type import HostedSkillPermissionType + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission_status import HostedSkillPermissionStatus + + +class HostedSkillPermission(object): + """ + Customer's permission about Hosted skill features. + + + :param permission: + :type permission: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission_type.HostedSkillPermissionType + :param status: + :type status: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission_status.HostedSkillPermissionStatus + :param action_url: + :type action_url: (optional) str + + """ + deserialized_types = { + 'permission': 'ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission_type.HostedSkillPermissionType', + 'status': 'ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission_status.HostedSkillPermissionStatus', + 'action_url': 'str' + } # type: Dict + + attribute_map = { + 'permission': 'permission', + 'status': 'status', + 'action_url': 'actionUrl' + } # type: Dict + supports_multiple_types = False + + def __init__(self, permission=None, status=None, action_url=None): + # type: (Optional[HostedSkillPermissionType], Optional[HostedSkillPermissionStatus], Optional[str]) -> None + """Customer's permission about Hosted skill features. + + :param permission: + :type permission: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission_type.HostedSkillPermissionType + :param status: + :type status: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_permission_status.HostedSkillPermissionStatus + :param action_url: + :type action_url: (optional) str + """ + self.__discriminator_value = None # type: str + + self.permission = permission + self.status = status + self.action_url = action_url + + 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, HostedSkillPermission): + 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/alexa_hosted/hosted_skill_permission_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_status.py new file mode 100644 index 0000000..55c54a0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_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 + from datetime import datetime + + +class HostedSkillPermissionStatus(Enum): + """ + + + Allowed enum values: [ALLOWED, NEW_USER_REGISTRATION_REQUIRED, RESOURCE_LIMIT_EXCEEDED, RATE_EXCEEDED] + """ + ALLOWED = "ALLOWED" + NEW_USER_REGISTRATION_REQUIRED = "NEW_USER_REGISTRATION_REQUIRED" + RESOURCE_LIMIT_EXCEEDED = "RESOURCE_LIMIT_EXCEEDED" + RATE_EXCEEDED = "RATE_EXCEEDED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, HostedSkillPermissionStatus): + 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/alexa_hosted/hosted_skill_permission_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_type.py new file mode 100644 index 0000000..e5155bf --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_permission_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 + from datetime import datetime + + +class HostedSkillPermissionType(Enum): + """ + + + Allowed enum values: [NEW_SKILL] + """ + NEW_SKILL = "NEW_SKILL" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, HostedSkillPermissionType): + 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/alexa_hosted/hosted_skill_repository.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository.py new file mode 100644 index 0000000..571df26 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository.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 + from datetime import datetime + + +class HostedSkillRepository(Enum): + """ + + + Allowed enum values: [GIT] + """ + GIT = "GIT" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, HostedSkillRepository): + 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/alexa_hosted/hosted_skill_repository_credentials.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials.py new file mode 100644 index 0000000..fc0a368 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class HostedSkillRepositoryCredentials(object): + """ + + :param username: AWS Access Key ID used to access hosted skill repository + :type username: (optional) str + :param password: signed AWS Credentials used to access hosted skill repository + :type password: (optional) str + :param expires_at: expiration time for the credentials + :type expires_at: (optional) datetime + + """ + deserialized_types = { + 'username': 'str', + 'password': 'str', + 'expires_at': 'datetime' + } # type: Dict + + attribute_map = { + 'username': 'username', + 'password': 'password', + 'expires_at': 'expiresAt' + } # type: Dict + supports_multiple_types = False + + def __init__(self, username=None, password=None, expires_at=None): + # type: (Optional[str], Optional[str], Optional[datetime]) -> None + """ + + :param username: AWS Access Key ID used to access hosted skill repository + :type username: (optional) str + :param password: signed AWS Credentials used to access hosted skill repository + :type password: (optional) str + :param expires_at: expiration time for the credentials + :type expires_at: (optional) datetime + """ + self.__discriminator_value = None # type: str + + self.username = username + self.password = password + self.expires_at = expires_at + + 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, HostedSkillRepositoryCredentials): + 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/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 new file mode 100644 index 0000000..708c379 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials_list.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 + from datetime import datetime + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials import HostedSkillRepositoryCredentials + + +class HostedSkillRepositoryCredentialsList(object): + """ + defines the structure for the hosted skill repository credentials response + + + :param repository_credentials: + :type repository_credentials: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials.HostedSkillRepositoryCredentials + + """ + deserialized_types = { + 'repository_credentials': 'ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials.HostedSkillRepositoryCredentials' + } # type: Dict + + attribute_map = { + 'repository_credentials': 'repositoryCredentials' + } # type: Dict + supports_multiple_types = False + + def __init__(self, repository_credentials=None): + # type: (Optional[HostedSkillRepositoryCredentials]) -> None + """defines the structure for the hosted skill repository credentials response + + :param repository_credentials: + :type repository_credentials: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_credentials.HostedSkillRepositoryCredentials + """ + self.__discriminator_value = None # type: str + + self.repository_credentials = repository_credentials + + 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, HostedSkillRepositoryCredentialsList): + 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/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 new file mode 100644 index 0000000..faeb42e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_credentials_request.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 + from datetime import datetime + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info import HostedSkillRepositoryInfo + + +class HostedSkillRepositoryCredentialsRequest(object): + """ + + :param repository: + :type repository: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info.HostedSkillRepositoryInfo + + """ + deserialized_types = { + 'repository': 'ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info.HostedSkillRepositoryInfo' + } # type: Dict + + attribute_map = { + 'repository': 'repository' + } # type: Dict + supports_multiple_types = False + + def __init__(self, repository=None): + # type: (Optional[HostedSkillRepositoryInfo]) -> None + """ + + :param repository: + :type repository: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository_info.HostedSkillRepositoryInfo + """ + self.__discriminator_value = None # type: str + + self.repository = repository + + 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, HostedSkillRepositoryCredentialsRequest): + 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/alexa_hosted/hosted_skill_repository_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_info.py new file mode 100644 index 0000000..34f814d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_repository_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 + from datetime import datetime + from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository import HostedSkillRepository + + +class HostedSkillRepositoryInfo(object): + """ + Alexa Hosted Skill's Repository Information + + + :param url: + :type url: (optional) str + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository.HostedSkillRepository + + """ + deserialized_types = { + 'url': 'str', + 'object_type': 'ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository.HostedSkillRepository' + } # type: Dict + + attribute_map = { + 'url': 'url', + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self, url=None, object_type=None): + # type: (Optional[str], Optional[HostedSkillRepository]) -> None + """Alexa Hosted Skill's Repository Information + + :param url: + :type url: (optional) str + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_repository.HostedSkillRepository + """ + self.__discriminator_value = None # type: str + + self.url = url + 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, HostedSkillRepositoryInfo): + 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/alexa_hosted/hosted_skill_runtime.py b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_runtime.py new file mode 100644 index 0000000..fea4b48 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_runtime.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 + from datetime import datetime + + +class HostedSkillRuntime(Enum): + """ + Hosted skill lambda runtime + + + + Allowed enum values: [nodejs8_10, python3_7] + """ + nodejs8_10 = "nodejs8.10" + python3_7 = "python3.7" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, HostedSkillRuntime): + 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/alexa_hosted/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..8075ee6 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/__init__.py @@ -0,0 +1,19 @@ +# 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 .beta_test import BetaTest +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 new file mode 100644 index 0000000..e277135 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/beta_test.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 + from datetime import datetime + from ask_smapi_model.v1.skill.beta_test.status import Status + + +class BetaTest(object): + """ + Beta test for an Alexa skill. + + + :param expiry_date: Expiry date of the beta test. + :type expiry_date: (optional) datetime + :param status: + :type status: (optional) ask_smapi_model.v1.skill.beta_test.status.Status + :param feedback_email: Email address for providing feedback + :type feedback_email: (optional) str + :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 + + """ + deserialized_types = { + 'expiry_date': 'datetime', + 'status': 'ask_smapi_model.v1.skill.beta_test.status.Status', + 'feedback_email': 'str', + 'invitation_url': 'str', + 'invites_remaining': 'float' + } # type: Dict + + attribute_map = { + 'expiry_date': 'expiryDate', + 'status': 'status', + 'feedback_email': 'feedbackEmail', + 'invitation_url': 'invitationUrl', + 'invites_remaining': 'invitesRemaining' + } # type: Dict + 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[Status], Optional[str], Optional[str], Optional[float]) -> None + """Beta test for an Alexa skill. + + :param expiry_date: Expiry date of the beta test. + :type expiry_date: (optional) datetime + :param status: + :type status: (optional) ask_smapi_model.v1.skill.beta_test.status.Status + :param feedback_email: Email address for providing feedback + :type feedback_email: (optional) str + :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 + """ + self.__discriminator_value = None # type: str + + self.expiry_date = expiry_date + self.status = status + self.feedback_email = feedback_email + self.invitation_url = invitation_url + self.invites_remaining = invites_remaining + + 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, BetaTest): + 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/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..756ff6a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/status.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 + from datetime import datetime + + +class Status(Enum): + """ + Status of the beta test. + + + + Allowed enum values: [IN_DRAFT, STARTING, RUNNING, STOPPING, ENDED] + """ + IN_DRAFT = "IN_DRAFT" + STARTING = "STARTING" + RUNNING = "RUNNING" + STOPPING = "STOPPING" + ENDED = "ENDED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, Status): + 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/test_body.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/test_body.py new file mode 100644 index 0000000..5c2d4c7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/test_body.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 + from datetime import datetime + + +class TestBody(object): + """ + Beta test meta-data. + + + :param feedback_email: Email address for providing feedback. + :type feedback_email: (optional) str + + """ + deserialized_types = { + 'feedback_email': 'str' + } # type: Dict + + attribute_map = { + 'feedback_email': 'feedbackEmail' + } # type: Dict + supports_multiple_types = False + + def __init__(self, feedback_email=None): + # type: (Optional[str]) -> None + """Beta test meta-data. + + :param feedback_email: Email address for providing feedback. + :type feedback_email: (optional) str + """ + self.__discriminator_value = None # type: str + + self.feedback_email = feedback_email + + 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, TestBody): + 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/testers/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/__init__.py new file mode 100644 index 0000000..08ba1f7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/__init__.py @@ -0,0 +1,21 @@ +# 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 .tester import Tester +from .testers_list import TestersList +from .invitation_status import InvitationStatus +from .list_testers_response import ListTestersResponse +from .tester_with_details import TesterWithDetails 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 new file mode 100644 index 0000000..3a1db28 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/invitation_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 + from datetime import datetime + + +class InvitationStatus(Enum): + """ + Indicates whether the tester has accepted the invitation. + + + + Allowed enum values: [ACCEPTED, NOT_ACCEPTED] + """ + ACCEPTED = "ACCEPTED" + NOT_ACCEPTED = "NOT_ACCEPTED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, InvitationStatus): + 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/testers/list_testers_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/list_testers_response.py new file mode 100644 index 0000000..962b431 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/list_testers_response.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 + from datetime import datetime + from ask_smapi_model.v1.skill.beta_test.testers.tester_with_details import TesterWithDetails + + +class ListTestersResponse(object): + """ + + :param testers: + :type testers: (optional) list[ask_smapi_model.v1.skill.beta_test.testers.tester_with_details.TesterWithDetails] + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + + """ + deserialized_types = { + 'testers': 'list[ask_smapi_model.v1.skill.beta_test.testers.tester_with_details.TesterWithDetails]', + 'is_truncated': 'bool', + 'next_token': 'str' + } # type: Dict + + attribute_map = { + 'testers': 'testers', + 'is_truncated': 'isTruncated', + 'next_token': 'nextToken' + } # type: Dict + supports_multiple_types = False + + def __init__(self, testers=None, is_truncated=None, next_token=None): + # type: (Optional[List[TesterWithDetails]], Optional[bool], Optional[str]) -> None + """ + + :param testers: + :type testers: (optional) list[ask_smapi_model.v1.skill.beta_test.testers.tester_with_details.TesterWithDetails] + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + """ + self.__discriminator_value = None # type: str + + self.testers = testers + self.is_truncated = is_truncated + 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, ListTestersResponse): + 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/testers/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..43f80f5 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/tester.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 + from datetime import datetime + + +class Tester(object): + """ + + :param email_id: Email address of the tester. + :type email_id: (optional) str + + """ + deserialized_types = { + 'email_id': 'str' + } # type: Dict + + attribute_map = { + 'email_id': 'emailId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, email_id=None): + # type: (Optional[str]) -> None + """ + + :param email_id: Email address of the tester. + :type email_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.email_id = email_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, Tester): + 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/testers/tester_with_details.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/tester_with_details.py new file mode 100644 index 0000000..cdcc7ab --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/tester_with_details.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 + from datetime import datetime + from ask_smapi_model.v1.skill.beta_test.testers.invitation_status import InvitationStatus + + +class TesterWithDetails(object): + """ + Tester information. + + + :param email_id: Email address of the tester. + :type email_id: (optional) str + :param association_date: Date and time when the tester is added to the beta test. + :type association_date: (optional) datetime + :param is_reminder_allowed: Indicates whether the tester is allowed to be sent reminder. + :type is_reminder_allowed: (optional) bool + :param invitation_status: + :type invitation_status: (optional) ask_smapi_model.v1.skill.beta_test.testers.invitation_status.InvitationStatus + + """ + deserialized_types = { + 'email_id': 'str', + 'association_date': 'datetime', + 'is_reminder_allowed': 'bool', + 'invitation_status': 'ask_smapi_model.v1.skill.beta_test.testers.invitation_status.InvitationStatus' + } # type: Dict + + attribute_map = { + 'email_id': 'emailId', + 'association_date': 'associationDate', + 'is_reminder_allowed': 'isReminderAllowed', + 'invitation_status': 'invitationStatus' + } # type: Dict + 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[InvitationStatus]) -> None + """Tester information. + + :param email_id: Email address of the tester. + :type email_id: (optional) str + :param association_date: Date and time when the tester is added to the beta test. + :type association_date: (optional) datetime + :param is_reminder_allowed: Indicates whether the tester is allowed to be sent reminder. + :type is_reminder_allowed: (optional) bool + :param invitation_status: + :type invitation_status: (optional) ask_smapi_model.v1.skill.beta_test.testers.invitation_status.InvitationStatus + """ + self.__discriminator_value = None # type: str + + self.email_id = email_id + self.association_date = association_date + self.is_reminder_allowed = is_reminder_allowed + self.invitation_status = invitation_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, TesterWithDetails): + 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/testers/testers_list.py b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/testers_list.py new file mode 100644 index 0000000..87d61c6 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/beta_test/testers/testers_list.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 + from datetime import datetime + from ask_smapi_model.v1.skill.beta_test.testers.tester import Tester + + +class TestersList(object): + """ + List of testers. + + + :param testers: List of the email address of testers. + :type testers: (optional) list[ask_smapi_model.v1.skill.beta_test.testers.tester.Tester] + + """ + deserialized_types = { + 'testers': 'list[ask_smapi_model.v1.skill.beta_test.testers.tester.Tester]' + } # type: Dict + + attribute_map = { + 'testers': 'testers' + } # type: Dict + supports_multiple_types = False + + def __init__(self, testers=None): + # type: (Optional[List[Tester]]) -> None + """List of testers. + + :param testers: List of the email address of testers. + :type testers: (optional) list[ask_smapi_model.v1.skill.beta_test.testers.tester.Tester] + """ + self.__discriminator_value = None # type: str + + self.testers = testers + + 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, TestersList): + 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 new file mode 100644 index 0000000..335d157 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/build_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 + from datetime import datetime + from ask_smapi_model.v1.skill.build_step import BuildStep + + +class BuildDetails(object): + """ + 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. + :type steps: (optional) list[ask_smapi_model.v1.skill.build_step.BuildStep] + + """ + deserialized_types = { + 'steps': 'list[ask_smapi_model.v1.skill.build_step.BuildStep]' + } # type: Dict + + attribute_map = { + 'steps': 'steps' + } # type: Dict + supports_multiple_types = False + + def __init__(self, steps=None): + # type: (Optional[List[BuildStep]]) -> 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. + :type steps: (optional) list[ask_smapi_model.v1.skill.build_step.BuildStep] + """ + self.__discriminator_value = None # type: str + + self.steps = steps + + 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, BuildDetails): + 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_step.py b/ask-smapi-model/ask_smapi_model/v1/skill/build_step.py new file mode 100644 index 0000000..3aac878 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/build_step.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 + from datetime import datetime + from ask_smapi_model.v1.skill.build_step_name import BuildStepName + from ask_smapi_model.v1.skill.status import Status + from ask_smapi_model.v1.skill.standardized_error import StandardizedError + + +class BuildStep(object): + """ + Describes the status of a build step. + + + :param name: + :type name: (optional) ask_smapi_model.v1.skill.build_step_name.BuildStepName + :param status: + :type status: (optional) ask_smapi_model.v1.skill.status.Status + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + + """ + deserialized_types = { + 'name': 'ask_smapi_model.v1.skill.build_step_name.BuildStepName', + 'status': 'ask_smapi_model.v1.skill.status.Status', + 'errors': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'status': 'status', + 'errors': 'errors' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, status=None, errors=None): + # type: (Optional[BuildStepName], Optional[Status], Optional[List[StandardizedError]]) -> None + """Describes the status of a build step. + + :param name: + :type name: (optional) ask_smapi_model.v1.skill.build_step_name.BuildStepName + :param status: + :type status: (optional) ask_smapi_model.v1.skill.status.Status + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + """ + self.__discriminator_value = None # type: str + + self.name = name + self.status = status + 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, BuildStep): + 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_step_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/build_step_name.py new file mode 100644 index 0000000..244f24d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/build_step_name.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 + 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. + + + + Allowed enum values: [DIALOG_MODEL_BUILD, LANGUAGE_MODEL_QUICK_BUILD, LANGUAGE_MODEL_FULL_BUILD] + """ + DIALOG_MODEL_BUILD = "DIALOG_MODEL_BUILD" + LANGUAGE_MODEL_QUICK_BUILD = "LANGUAGE_MODEL_QUICK_BUILD" + LANGUAGE_MODEL_FULL_BUILD = "LANGUAGE_MODEL_FULL_BUILD" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, BuildStepName): + 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/certification/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/__init__.py new file mode 100644 index 0000000..3ae1d87 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/__init__.py @@ -0,0 +1,26 @@ +# 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 .certification_summary import CertificationSummary +from .certification_result import CertificationResult +from .review_tracking_info import ReviewTrackingInfo +from .estimation_update import EstimationUpdate +from .list_certifications_response import ListCertificationsResponse +from .distribution_info import DistributionInfo +from .certification_status import CertificationStatus +from .publication_failure import PublicationFailure +from .review_tracking_info_summary import ReviewTrackingInfoSummary +from .certification_response import CertificationResponse 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 new file mode 100644 index 0000000..7810ff8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_response.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 + from datetime import datetime + from ask_smapi_model.v1.skill.certification.certification_result import CertificationResult + from ask_smapi_model.v1.skill.certification.certification_status import CertificationStatus + from ask_smapi_model.v1.skill.certification.review_tracking_info import ReviewTrackingInfo + + +class CertificationResponse(object): + """ + + :param id: Certification Id for the skill + :type id: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.certification.certification_status.CertificationStatus + :param skill_submission_timestamp: Timestamp for when the skill was submitted for certification. + :type skill_submission_timestamp: (optional) datetime + :param review_tracking_info: + :type review_tracking_info: (optional) ask_smapi_model.v1.skill.certification.review_tracking_info.ReviewTrackingInfo + :param result: + :type result: (optional) ask_smapi_model.v1.skill.certification.certification_result.CertificationResult + + """ + deserialized_types = { + 'id': 'str', + 'status': 'ask_smapi_model.v1.skill.certification.certification_status.CertificationStatus', + 'skill_submission_timestamp': 'datetime', + 'review_tracking_info': 'ask_smapi_model.v1.skill.certification.review_tracking_info.ReviewTrackingInfo', + 'result': 'ask_smapi_model.v1.skill.certification.certification_result.CertificationResult' + } # type: Dict + + attribute_map = { + 'id': 'id', + 'status': 'status', + 'skill_submission_timestamp': 'skillSubmissionTimestamp', + 'review_tracking_info': 'reviewTrackingInfo', + 'result': 'result' + } # type: Dict + 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[CertificationStatus], Optional[datetime], Optional[ReviewTrackingInfo], Optional[CertificationResult]) -> None + """ + + :param id: Certification Id for the skill + :type id: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.certification.certification_status.CertificationStatus + :param skill_submission_timestamp: Timestamp for when the skill was submitted for certification. + :type skill_submission_timestamp: (optional) datetime + :param review_tracking_info: + :type review_tracking_info: (optional) ask_smapi_model.v1.skill.certification.review_tracking_info.ReviewTrackingInfo + :param result: + :type result: (optional) ask_smapi_model.v1.skill.certification.certification_result.CertificationResult + """ + self.__discriminator_value = None # type: str + + self.id = id + self.status = status + self.skill_submission_timestamp = skill_submission_timestamp + self.review_tracking_info = review_tracking_info + 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, CertificationResponse): + 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/certification/certification_result.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_result.py new file mode 100644 index 0000000..412483f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_result.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 + from datetime import datetime + from ask_smapi_model.v1.skill.certification.distribution_info import DistributionInfo + + +class CertificationResult(object): + """ + 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: + :type distribution_info: (optional) ask_smapi_model.v1.skill.certification.distribution_info.DistributionInfo + + """ + deserialized_types = { + 'distribution_info': 'ask_smapi_model.v1.skill.certification.distribution_info.DistributionInfo' + } # type: Dict + + attribute_map = { + 'distribution_info': 'distributionInfo' + } # type: Dict + supports_multiple_types = False + + def __init__(self, distribution_info=None): + # type: (Optional[DistributionInfo]) -> 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: + :type distribution_info: (optional) ask_smapi_model.v1.skill.certification.distribution_info.DistributionInfo + """ + self.__discriminator_value = None # type: str + + self.distribution_info = distribution_info + + 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, CertificationResult): + 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/certification/certification_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_status.py new file mode 100644 index 0000000..ba3e8ea --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_status.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 + from datetime import datetime + + +class CertificationStatus(Enum): + """ + String that specifies the current status of skill's certification Possible values are \"IN_PROGRESS\", \"SUCCEEDED\", \"FAILED\" and \"CANCELLED\" + + + + Allowed enum values: [IN_PROGRESS, SUCCEEDED, FAILED, CANCELLED] + """ + IN_PROGRESS = "IN_PROGRESS" + SUCCEEDED = "SUCCEEDED" + FAILED = "FAILED" + CANCELLED = "CANCELLED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, CertificationStatus): + 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/certification/certification_summary.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_summary.py new file mode 100644 index 0000000..f05d668 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/certification_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 + from datetime import datetime + from ask_smapi_model.v1.skill.certification.review_tracking_info_summary import ReviewTrackingInfoSummary + from ask_smapi_model.v1.skill.certification.certification_status import CertificationStatus + + +class CertificationSummary(object): + """ + 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. + :type id: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.certification.certification_status.CertificationStatus + :param skill_submission_timestamp: Timestamp for when the skill was submitted for certification. + :type skill_submission_timestamp: (optional) datetime + :param review_tracking_info: + :type review_tracking_info: (optional) ask_smapi_model.v1.skill.certification.review_tracking_info_summary.ReviewTrackingInfoSummary + + """ + deserialized_types = { + 'id': 'str', + 'status': 'ask_smapi_model.v1.skill.certification.certification_status.CertificationStatus', + 'skill_submission_timestamp': 'datetime', + 'review_tracking_info': 'ask_smapi_model.v1.skill.certification.review_tracking_info_summary.ReviewTrackingInfoSummary' + } # type: Dict + + attribute_map = { + 'id': 'id', + 'status': 'status', + 'skill_submission_timestamp': 'skillSubmissionTimestamp', + 'review_tracking_info': 'reviewTrackingInfo' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None, status=None, skill_submission_timestamp=None, review_tracking_info=None): + # type: (Optional[str], Optional[CertificationStatus], Optional[datetime], Optional[ReviewTrackingInfoSummary]) -> 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. + :type id: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.certification.certification_status.CertificationStatus + :param skill_submission_timestamp: Timestamp for when the skill was submitted for certification. + :type skill_submission_timestamp: (optional) datetime + :param review_tracking_info: + :type review_tracking_info: (optional) ask_smapi_model.v1.skill.certification.review_tracking_info_summary.ReviewTrackingInfoSummary + """ + self.__discriminator_value = None # type: str + + self.id = id + self.status = status + self.skill_submission_timestamp = skill_submission_timestamp + self.review_tracking_info = review_tracking_info + + 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, CertificationSummary): + 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/certification/distribution_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/distribution_info.py new file mode 100644 index 0000000..c1b01f7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/distribution_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 + from datetime import datetime + from ask_smapi_model.v1.skill.certification.publication_failure import PublicationFailure + + +class DistributionInfo(object): + """ + The distribution information for skill where Amazon distributed the skill + + + :param published_countries: All countries where the skill was published in by Amazon. + :type published_countries: (optional) list[str] + :param publication_failures: + :type publication_failures: (optional) list[ask_smapi_model.v1.skill.certification.publication_failure.PublicationFailure] + + """ + deserialized_types = { + 'published_countries': 'list[str]', + 'publication_failures': 'list[ask_smapi_model.v1.skill.certification.publication_failure.PublicationFailure]' + } # type: Dict + + attribute_map = { + 'published_countries': 'publishedCountries', + 'publication_failures': 'publicationFailures' + } # type: Dict + supports_multiple_types = False + + def __init__(self, published_countries=None, publication_failures=None): + # type: (Optional[List[object]], Optional[List[PublicationFailure]]) -> None + """The distribution information for skill where Amazon distributed the skill + + :param published_countries: All countries where the skill was published in by Amazon. + :type published_countries: (optional) list[str] + :param publication_failures: + :type publication_failures: (optional) list[ask_smapi_model.v1.skill.certification.publication_failure.PublicationFailure] + """ + self.__discriminator_value = None # type: str + + self.published_countries = published_countries + self.publication_failures = publication_failures + + 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, DistributionInfo): + 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/certification/estimation_update.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/estimation_update.py new file mode 100644 index 0000000..336394f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/estimation_update.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 + from datetime import datetime + + +class EstimationUpdate(object): + """ + Structure for any updates to estimation completion time for certification review for the skill. + + + :param original_estimated_completion_timestamp: Timestamp for originally estimated completion of certification review for the skill. + :type original_estimated_completion_timestamp: (optional) datetime + :param revised_estimated_completion_timestamp: Timestamp for originally estimated completion of certification review for the skill. + :type revised_estimated_completion_timestamp: (optional) datetime + :param reason: Reason for updates to estimates for certification review + :type reason: (optional) str + + """ + deserialized_types = { + 'original_estimated_completion_timestamp': 'datetime', + 'revised_estimated_completion_timestamp': 'datetime', + 'reason': 'str' + } # type: Dict + + attribute_map = { + 'original_estimated_completion_timestamp': 'originalEstimatedCompletionTimestamp', + 'revised_estimated_completion_timestamp': 'revisedEstimatedCompletionTimestamp', + 'reason': 'reason' + } # type: Dict + supports_multiple_types = False + + def __init__(self, original_estimated_completion_timestamp=None, revised_estimated_completion_timestamp=None, reason=None): + # type: (Optional[datetime], Optional[datetime], Optional[str]) -> None + """Structure for any updates to estimation completion time for certification review for the skill. + + :param original_estimated_completion_timestamp: Timestamp for originally estimated completion of certification review for the skill. + :type original_estimated_completion_timestamp: (optional) datetime + :param revised_estimated_completion_timestamp: Timestamp for originally estimated completion of certification review for the skill. + :type revised_estimated_completion_timestamp: (optional) datetime + :param reason: Reason for updates to estimates for certification review + :type reason: (optional) str + """ + self.__discriminator_value = None # type: str + + self.original_estimated_completion_timestamp = original_estimated_completion_timestamp + self.revised_estimated_completion_timestamp = revised_estimated_completion_timestamp + 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, EstimationUpdate): + 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/certification/list_certifications_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/list_certifications_response.py new file mode 100644 index 0000000..84af3ac --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/list_certifications_response.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.links import Links + from ask_smapi_model.v1.skill.certification.certification_summary import CertificationSummary + + +class ListCertificationsResponse(object): + """ + List of certification summary for a skill. + + + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param is_truncated: boolean value for if the response is truncated. isTruncated = true if more than the assigned maxResults parameter value certification items are available for the skill. The results are then paginated and the remaining results can be retrieved in a similar paginated manner by using 'next' link in the _links or using the nextToken in a following request. + :type is_truncated: (optional) bool + :param next_token: Encrypted token present when isTruncated is true. + :type next_token: (optional) str + :param total_count: Total number of certification results available for the skill. + :type total_count: (optional) int + :param items: List of certifications available for a skill. The list of certifications is sorted in a default descending sort order on id field. + :type items: (optional) list[ask_smapi_model.v1.skill.certification.certification_summary.CertificationSummary] + + """ + deserialized_types = { + 'links': 'ask_smapi_model.v1.links.Links', + 'is_truncated': 'bool', + 'next_token': 'str', + 'total_count': 'int', + 'items': 'list[ask_smapi_model.v1.skill.certification.certification_summary.CertificationSummary]' + } # type: Dict + + attribute_map = { + 'links': '_links', + 'is_truncated': 'isTruncated', + 'next_token': 'nextToken', + 'total_count': 'totalCount', + 'items': 'items' + } # type: Dict + supports_multiple_types = False + + def __init__(self, links=None, is_truncated=None, next_token=None, total_count=None, items=None): + # type: (Optional[Links], Optional[bool], Optional[str], Optional[int], Optional[List[CertificationSummary]]) -> None + """List of certification summary for a skill. + + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param is_truncated: boolean value for if the response is truncated. isTruncated = true if more than the assigned maxResults parameter value certification items are available for the skill. The results are then paginated and the remaining results can be retrieved in a similar paginated manner by using 'next' link in the _links or using the nextToken in a following request. + :type is_truncated: (optional) bool + :param next_token: Encrypted token present when isTruncated is true. + :type next_token: (optional) str + :param total_count: Total number of certification results available for the skill. + :type total_count: (optional) int + :param items: List of certifications available for a skill. The list of certifications is sorted in a default descending sort order on id field. + :type items: (optional) list[ask_smapi_model.v1.skill.certification.certification_summary.CertificationSummary] + """ + self.__discriminator_value = None # type: str + + self.links = links + self.is_truncated = is_truncated + self.next_token = next_token + self.total_count = total_count + 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, ListCertificationsResponse): + 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/certification/publication_failure.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/publication_failure.py new file mode 100644 index 0000000..d2d9e0b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/publication_failure.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 + from datetime import datetime + + +class PublicationFailure(object): + """ + Information about why the skill was not published in certain countries. + + + :param reason: Reason why Amazon did not publish the skill in certain countries. + :type reason: (optional) str + :param countries: List of countries where Amazon did not publish the skill for a specific reason + :type countries: (optional) list[str] + + """ + deserialized_types = { + 'reason': 'str', + 'countries': 'list[str]' + } # type: Dict + + attribute_map = { + 'reason': 'reason', + 'countries': 'countries' + } # type: Dict + supports_multiple_types = False + + def __init__(self, reason=None, countries=None): + # type: (Optional[str], Optional[List[object]]) -> None + """Information about why the skill was not published in certain countries. + + :param reason: Reason why Amazon did not publish the skill in certain countries. + :type reason: (optional) str + :param countries: List of countries where Amazon did not publish the skill for a specific reason + :type countries: (optional) list[str] + """ + self.__discriminator_value = None # type: str + + self.reason = reason + self.countries = countries + + 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, PublicationFailure): + 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/certification/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/certification/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..ee9a818 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/review_tracking_info.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 + from datetime import datetime + from ask_smapi_model.v1.skill.certification.estimation_update import EstimationUpdate + + +class ReviewTrackingInfo(object): + """ + Structure for review tracking information of the skill. + + + :param estimated_completion_timestamp: Timestamp for estimated completion of certification review for the skill. + :type estimated_completion_timestamp: (optional) datetime + :param actual_completion_timestamp: Timestamp for actual completion of certification review for the skill. + :type actual_completion_timestamp: (optional) datetime + :param last_updated: Timestamp for when the last update was made to review tracking info. + :type last_updated: (optional) datetime + :param estimation_updates: List of updates to estimation completion time for certification review for the skill. + :type estimation_updates: (optional) list[ask_smapi_model.v1.skill.certification.estimation_update.EstimationUpdate] + + """ + deserialized_types = { + 'estimated_completion_timestamp': 'datetime', + 'actual_completion_timestamp': 'datetime', + 'last_updated': 'datetime', + 'estimation_updates': 'list[ask_smapi_model.v1.skill.certification.estimation_update.EstimationUpdate]' + } # type: Dict + + attribute_map = { + 'estimated_completion_timestamp': 'estimatedCompletionTimestamp', + 'actual_completion_timestamp': 'actualCompletionTimestamp', + 'last_updated': 'lastUpdated', + 'estimation_updates': 'estimationUpdates' + } # type: Dict + 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[EstimationUpdate]]) -> None + """Structure for review tracking information of the skill. + + :param estimated_completion_timestamp: Timestamp for estimated completion of certification review for the skill. + :type estimated_completion_timestamp: (optional) datetime + :param actual_completion_timestamp: Timestamp for actual completion of certification review for the skill. + :type actual_completion_timestamp: (optional) datetime + :param last_updated: Timestamp for when the last update was made to review tracking info. + :type last_updated: (optional) datetime + :param estimation_updates: List of updates to estimation completion time for certification review for the skill. + :type estimation_updates: (optional) list[ask_smapi_model.v1.skill.certification.estimation_update.EstimationUpdate] + """ + self.__discriminator_value = None # type: str + + self.estimated_completion_timestamp = estimated_completion_timestamp + self.actual_completion_timestamp = actual_completion_timestamp + self.last_updated = last_updated + self.estimation_updates = estimation_updates + + 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, ReviewTrackingInfo): + 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/certification/review_tracking_info_summary.py b/ask-smapi-model/ask_smapi_model/v1/skill/certification/review_tracking_info_summary.py new file mode 100644 index 0000000..beec2c9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/certification/review_tracking_info_summary.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 + from datetime import datetime + + +class ReviewTrackingInfoSummary(object): + """ + Structure for summarised view of review tracking information of the skill. This does not have the estimationUpdates array field. + + + :param estimated_completion_timestamp: Timestamp for estimated completion of certification review for the skill. + :type estimated_completion_timestamp: (optional) datetime + :param actual_completion_timestamp: Timestamp for actual completion of certification review workflow for the skill. + :type actual_completion_timestamp: (optional) datetime + :param last_updated: Timestamp for when the last update was made to review tracking info. + :type last_updated: (optional) datetime + + """ + deserialized_types = { + 'estimated_completion_timestamp': 'datetime', + 'actual_completion_timestamp': 'datetime', + 'last_updated': 'datetime' + } # type: Dict + + attribute_map = { + 'estimated_completion_timestamp': 'estimatedCompletionTimestamp', + 'actual_completion_timestamp': 'actualCompletionTimestamp', + 'last_updated': 'lastUpdated' + } # type: Dict + supports_multiple_types = False + + def __init__(self, estimated_completion_timestamp=None, actual_completion_timestamp=None, last_updated=None): + # type: (Optional[datetime], Optional[datetime], Optional[datetime]) -> None + """Structure for summarised view of review tracking information of the skill. This does not have the estimationUpdates array field. + + :param estimated_completion_timestamp: Timestamp for estimated completion of certification review for the skill. + :type estimated_completion_timestamp: (optional) datetime + :param actual_completion_timestamp: Timestamp for actual completion of certification review workflow for the skill. + :type actual_completion_timestamp: (optional) datetime + :param last_updated: Timestamp for when the last update was made to review tracking info. + :type last_updated: (optional) datetime + """ + self.__discriminator_value = None # type: str + + self.estimated_completion_timestamp = estimated_completion_timestamp + self.actual_completion_timestamp = actual_completion_timestamp + self.last_updated = last_updated + + 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, ReviewTrackingInfoSummary): + 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/create_skill_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_request.py new file mode 100644 index 0000000..7f40d31 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_request.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.skill_manifest import SkillManifest + + +class CreateSkillRequest(object): + """ + + :param vendor_id: ID of the vendor owning the skill. + :type vendor_id: (optional) str + :param manifest: + :type manifest: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest.SkillManifest + + """ + deserialized_types = { + 'vendor_id': 'str', + 'manifest': 'ask_smapi_model.v1.skill.manifest.skill_manifest.SkillManifest' + } # type: Dict + + attribute_map = { + 'vendor_id': 'vendorId', + 'manifest': 'manifest' + } # type: Dict + supports_multiple_types = False + + def __init__(self, vendor_id=None, manifest=None): + # type: (Optional[str], Optional[SkillManifest]) -> None + """ + + :param vendor_id: ID of the vendor owning the skill. + :type vendor_id: (optional) str + :param manifest: + :type manifest: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest.SkillManifest + """ + self.__discriminator_value = None # type: str + + self.vendor_id = vendor_id + self.manifest = manifest + + 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, CreateSkillRequest): + 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/create_skill_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_response.py new file mode 100644 index 0000000..4781899 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_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 + from datetime import datetime + + +class CreateSkillResponse(object): + """ + SkillId information. + + + :param skill_id: ID of the skill created. + :type skill_id: (optional) str + + """ + deserialized_types = { + 'skill_id': 'str' + } # type: Dict + + attribute_map = { + 'skill_id': 'skillId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, skill_id=None): + # type: (Optional[str]) -> None + """SkillId information. + + :param skill_id: ID of the skill created. + :type skill_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.skill_id = skill_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, CreateSkillResponse): + 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/create_skill_with_package_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_with_package_request.py new file mode 100644 index 0000000..f1e43a0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/create_skill_with_package_request.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 + from datetime import datetime + + +class CreateSkillWithPackageRequest(object): + """ + + :param vendor_id: ID of the vendor owning the skill. + :type vendor_id: (optional) str + :param location: Location of the package. + :type location: (optional) str + + """ + deserialized_types = { + 'vendor_id': 'str', + 'location': 'str' + } # type: Dict + + attribute_map = { + 'vendor_id': 'vendorId', + 'location': 'location' + } # type: Dict + supports_multiple_types = False + + def __init__(self, vendor_id=None, location=None): + # type: (Optional[str], Optional[str]) -> None + """ + + :param vendor_id: ID of the vendor owning the skill. + :type vendor_id: (optional) str + :param location: Location of the package. + :type location: (optional) str + """ + self.__discriminator_value = None # type: str + + self.vendor_id = vendor_id + self.location = location + + 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, CreateSkillWithPackageRequest): + 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/evaluations/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/__init__.py new file mode 100644 index 0000000..c02469e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/__init__.py @@ -0,0 +1,30 @@ +# 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 .intent import Intent +from .multi_turn import MultiTurn +from .slot_resolutions import SlotResolutions +from .resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCode +from .profile_nlu_selected_intent import ProfileNluSelectedIntent +from .resolutions_per_authority_items import ResolutionsPerAuthorityItems +from .resolutions_per_authority_value_items import ResolutionsPerAuthorityValueItems +from .profile_nlu_request import ProfileNluRequest +from .slot import Slot +from .dialog_act_type import DialogActType +from .confirmation_status_type import ConfirmationStatusType +from .dialog_act import DialogAct +from .profile_nlu_response import ProfileNluResponse +from .resolutions_per_authority_status import ResolutionsPerAuthorityStatus 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 new file mode 100644 index 0000000..034ee51 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/confirmation_status_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 + from datetime import datetime + + +class ConfirmationStatusType(Enum): + """ + An enumeration indicating whether the user has explicitly confirmed or denied the entire intent. Possible values: \"NONE\", \"CONFIRMED\", \"DENIED\". + + + + Allowed enum values: [NONE, CONFIRMED, DENIED] + """ + NONE = "NONE" + CONFIRMED = "CONFIRMED" + DENIED = "DENIED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ConfirmationStatusType): + 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/evaluations/dialog_act.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act.py new file mode 100644 index 0000000..1af117b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act.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 + from datetime import datetime + from ask_smapi_model.v1.skill.evaluations.dialog_act_type import DialogActType + + +class DialogAct(object): + """ + 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: + :type object_type: (optional) ask_smapi_model.v1.skill.evaluations.dialog_act_type.DialogActType + :param target_slot: The name of the target slot that needs to be filled or confirmed for a dialogAct + :type target_slot: (optional) str + + """ + deserialized_types = { + 'object_type': 'ask_smapi_model.v1.skill.evaluations.dialog_act_type.DialogActType', + 'target_slot': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'target_slot': 'targetSlot' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, target_slot=None): + # type: (Optional[DialogActType], 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: + :type object_type: (optional) ask_smapi_model.v1.skill.evaluations.dialog_act_type.DialogActType + :param target_slot: The name of the target slot that needs to be filled or confirmed for a dialogAct + :type target_slot: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.target_slot = target_slot + + 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, DialogAct): + 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/evaluations/dialog_act_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act_type.py new file mode 100644 index 0000000..58cbded --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/dialog_act_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 + from datetime import datetime + + +class DialogActType(Enum): + """ + + + Allowed enum values: [Dialog_ElicitSlot, Dialog_ConfirmSlot, Dialog_ConfirmIntent] + """ + Dialog_ElicitSlot = "Dialog.ElicitSlot" + Dialog_ConfirmSlot = "Dialog.ConfirmSlot" + Dialog_ConfirmIntent = "Dialog.ConfirmIntent" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DialogActType): + 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/evaluations/intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/intent.py new file mode 100644 index 0000000..85bb0a1 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/intent.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 + from datetime import datetime + from ask_smapi_model.v1.skill.evaluations.confirmation_status_type import ConfirmationStatusType + from ask_smapi_model.v1.skill.evaluations.slot import Slot + + +class Intent(object): + """ + + :param name: + :type name: (optional) str + :param confirmation_status: + :type confirmation_status: (optional) ask_smapi_model.v1.skill.evaluations.confirmation_status_type.ConfirmationStatusType + :param slots: A map of key-value pairs that further describes what the user meant based on a predefined intent schema. The map can be empty. + :type slots: (optional) dict(str, ask_smapi_model.v1.skill.evaluations.slot.Slot) + + """ + deserialized_types = { + 'name': 'str', + 'confirmation_status': 'ask_smapi_model.v1.skill.evaluations.confirmation_status_type.ConfirmationStatusType', + 'slots': 'dict(str, ask_smapi_model.v1.skill.evaluations.slot.Slot)' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'confirmation_status': 'confirmationStatus', + 'slots': 'slots' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, confirmation_status=None, slots=None): + # type: (Optional[str], Optional[ConfirmationStatusType], Optional[Dict[str, Slot]]) -> None + """ + + :param name: + :type name: (optional) str + :param confirmation_status: + :type confirmation_status: (optional) ask_smapi_model.v1.skill.evaluations.confirmation_status_type.ConfirmationStatusType + :param slots: A map of key-value pairs that further describes what the user meant based on a predefined intent schema. The map can be empty. + :type slots: (optional) dict(str, ask_smapi_model.v1.skill.evaluations.slot.Slot) + """ + self.__discriminator_value = None # type: str + + self.name = name + self.confirmation_status = confirmation_status + self.slots = slots + + 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, Intent): + 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/evaluations/multi_turn.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/multi_turn.py new file mode 100644 index 0000000..3b42e9e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/multi_turn.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 + from datetime import datetime + from ask_smapi_model.v1.skill.evaluations.dialog_act import DialogAct + + +class MultiTurn(object): + """ + 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: + :type dialog_act: (optional) ask_smapi_model.v1.skill.evaluations.dialog_act.DialogAct + :param token: Opaque string which contains multi-turn related context. + :type token: (optional) str + :param prompt: A sample prompt defined in the dialog model for each DialogAct. + :type prompt: (optional) str + + """ + deserialized_types = { + 'dialog_act': 'ask_smapi_model.v1.skill.evaluations.dialog_act.DialogAct', + 'token': 'str', + 'prompt': 'str' + } # type: Dict + + attribute_map = { + 'dialog_act': 'dialogAct', + 'token': 'token', + 'prompt': 'prompt' + } # type: Dict + supports_multiple_types = False + + def __init__(self, dialog_act=None, token=None, prompt=None): + # type: (Optional[DialogAct], 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: + :type dialog_act: (optional) ask_smapi_model.v1.skill.evaluations.dialog_act.DialogAct + :param token: Opaque string which contains multi-turn related context. + :type token: (optional) str + :param prompt: A sample prompt defined in the dialog model for each DialogAct. + :type prompt: (optional) str + """ + self.__discriminator_value = None # type: str + + self.dialog_act = dialog_act + self.token = token + self.prompt = prompt + + 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, MultiTurn): + 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/evaluations/profile_nlu_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_request.py new file mode 100644 index 0000000..2341b27 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_request.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 + from datetime import datetime + + +class ProfileNluRequest(object): + """ + + :param utterance: Actual representation of user input to Alexa. + :type utterance: (optional) str + :param multi_turn_token: Opaque string which contains multi-turn related context. + :type multi_turn_token: (optional) str + + """ + deserialized_types = { + 'utterance': 'str', + 'multi_turn_token': 'str' + } # type: Dict + + attribute_map = { + 'utterance': 'utterance', + 'multi_turn_token': 'multiTurnToken' + } # type: Dict + supports_multiple_types = False + + def __init__(self, utterance=None, multi_turn_token=None): + # type: (Optional[str], Optional[str]) -> None + """ + + :param utterance: Actual representation of user input to Alexa. + :type utterance: (optional) str + :param multi_turn_token: Opaque string which contains multi-turn related context. + :type multi_turn_token: (optional) str + """ + self.__discriminator_value = None # type: str + + self.utterance = utterance + self.multi_turn_token = multi_turn_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, ProfileNluRequest): + 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/evaluations/profile_nlu_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_response.py new file mode 100644 index 0000000..21c1437 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_response.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 + from datetime import datetime + from ask_smapi_model.v1.skill.evaluations.profile_nlu_selected_intent import ProfileNluSelectedIntent + from ask_smapi_model.v1.skill.evaluations.multi_turn import MultiTurn + from ask_smapi_model.v1.skill.evaluations.intent import Intent + + +class ProfileNluResponse(object): + """ + + :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. + :type session_ended: (optional) bool + :param selected_intent: + :type selected_intent: (optional) ask_smapi_model.v1.skill.evaluations.profile_nlu_selected_intent.ProfileNluSelectedIntent + :param considered_intents: All intents that Alexa considered for the utterance in the request, but did not select. + :type considered_intents: (optional) list[ask_smapi_model.v1.skill.evaluations.intent.Intent] + :param multi_turn: + :type multi_turn: (optional) ask_smapi_model.v1.skill.evaluations.multi_turn.MultiTurn + + """ + deserialized_types = { + 'session_ended': 'bool', + 'selected_intent': 'ask_smapi_model.v1.skill.evaluations.profile_nlu_selected_intent.ProfileNluSelectedIntent', + 'considered_intents': 'list[ask_smapi_model.v1.skill.evaluations.intent.Intent]', + 'multi_turn': 'ask_smapi_model.v1.skill.evaluations.multi_turn.MultiTurn' + } # type: Dict + + attribute_map = { + 'session_ended': 'sessionEnded', + 'selected_intent': 'selectedIntent', + 'considered_intents': 'consideredIntents', + 'multi_turn': 'multiTurn' + } # type: Dict + supports_multiple_types = False + + def __init__(self, session_ended=None, selected_intent=None, considered_intents=None, multi_turn=None): + # type: (Optional[bool], Optional[ProfileNluSelectedIntent], Optional[List[Intent]], Optional[MultiTurn]) -> 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. + :type session_ended: (optional) bool + :param selected_intent: + :type selected_intent: (optional) ask_smapi_model.v1.skill.evaluations.profile_nlu_selected_intent.ProfileNluSelectedIntent + :param considered_intents: All intents that Alexa considered for the utterance in the request, but did not select. + :type considered_intents: (optional) list[ask_smapi_model.v1.skill.evaluations.intent.Intent] + :param multi_turn: + :type multi_turn: (optional) ask_smapi_model.v1.skill.evaluations.multi_turn.MultiTurn + """ + self.__discriminator_value = None # type: str + + self.session_ended = session_ended + self.selected_intent = selected_intent + self.considered_intents = considered_intents + self.multi_turn = multi_turn + + 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, ProfileNluResponse): + 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/evaluations/profile_nlu_selected_intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_selected_intent.py new file mode 100644 index 0000000..c5e5cdb --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/profile_nlu_selected_intent.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.evaluations.intent import Intent + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.evaluations.confirmation_status_type import ConfirmationStatusType + from ask_smapi_model.v1.skill.evaluations.slot import Slot + + +class ProfileNluSelectedIntent(Intent): + """ + The intent that Alexa selected for the utterance in the request. + + + :param name: + :type name: (optional) str + :param confirmation_status: + :type confirmation_status: (optional) ask_smapi_model.v1.skill.evaluations.confirmation_status_type.ConfirmationStatusType + :param slots: A map of key-value pairs that further describes what the user meant based on a predefined intent schema. The map can be empty. + :type slots: (optional) dict(str, ask_smapi_model.v1.skill.evaluations.slot.Slot) + + """ + deserialized_types = { + 'name': 'str', + 'confirmation_status': 'ask_smapi_model.v1.skill.evaluations.confirmation_status_type.ConfirmationStatusType', + 'slots': 'dict(str, ask_smapi_model.v1.skill.evaluations.slot.Slot)' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'confirmation_status': 'confirmationStatus', + 'slots': 'slots' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, confirmation_status=None, slots=None): + # type: (Optional[str], Optional[ConfirmationStatusType], Optional[Dict[str, Slot]]) -> None + """The intent that Alexa selected for the utterance in the request. + + :param name: + :type name: (optional) str + :param confirmation_status: + :type confirmation_status: (optional) ask_smapi_model.v1.skill.evaluations.confirmation_status_type.ConfirmationStatusType + :param slots: A map of key-value pairs that further describes what the user meant based on a predefined intent schema. The map can be empty. + :type slots: (optional) dict(str, ask_smapi_model.v1.skill.evaluations.slot.Slot) + """ + self.__discriminator_value = None # type: str + + super(ProfileNluSelectedIntent, self).__init__(name=name, confirmation_status=confirmation_status, slots=slots) + + 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, ProfileNluSelectedIntent): + 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/evaluations/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..f0b288a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_items.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 + from datetime import datetime + from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status import ResolutionsPerAuthorityStatus + from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_value_items import ResolutionsPerAuthorityValueItems + + +class ResolutionsPerAuthorityItems(object): + """ + + :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. + :type authority: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status.ResolutionsPerAuthorityStatus + :param values: An array of resolved values for the slot. + :type values: (optional) list[ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_value_items.ResolutionsPerAuthorityValueItems] + + """ + deserialized_types = { + 'authority': 'str', + 'status': 'ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status.ResolutionsPerAuthorityStatus', + 'values': 'list[ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_value_items.ResolutionsPerAuthorityValueItems]' + } # type: Dict + + attribute_map = { + 'authority': 'authority', + 'status': 'status', + 'values': 'values' + } # type: Dict + supports_multiple_types = False + + def __init__(self, authority=None, status=None, values=None): + # type: (Optional[str], Optional[ResolutionsPerAuthorityStatus], Optional[List[ResolutionsPerAuthorityValueItems]]) -> 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. + :type authority: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status.ResolutionsPerAuthorityStatus + :param values: An array of resolved values for the slot. + :type values: (optional) list[ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_value_items.ResolutionsPerAuthorityValueItems] + """ + self.__discriminator_value = None # type: str + + self.authority = authority + self.status = status + self.values = values + + 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, ResolutionsPerAuthorityItems): + 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/evaluations/resolutions_per_authority_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status.py new file mode 100644 index 0000000..9786c59 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status.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 + from datetime import datetime + from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status_code import ResolutionsPerAuthorityStatusCode + + +class ResolutionsPerAuthorityStatus(object): + """ + An object representing the status of entity resolution for the slot. + + + :param code: + :type code: (optional) ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status_code.ResolutionsPerAuthorityStatusCode + + """ + deserialized_types = { + 'code': 'ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status_code.ResolutionsPerAuthorityStatusCode' + } # type: Dict + + attribute_map = { + 'code': 'code' + } # type: Dict + supports_multiple_types = False + + def __init__(self, code=None): + # type: (Optional[ResolutionsPerAuthorityStatusCode]) -> None + """An object representing the status of entity resolution for the slot. + + :param code: + :type code: (optional) ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_status_code.ResolutionsPerAuthorityStatusCode + """ + self.__discriminator_value = None # type: str + + 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, ResolutionsPerAuthorityStatus): + 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/evaluations/resolutions_per_authority_status_code.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status_code.py new file mode 100644 index 0000000..4eb4398 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_status_code.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 + from datetime import datetime + + +class ResolutionsPerAuthorityStatusCode(Enum): + """ + 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. + + + + Allowed enum values: [ER_SUCCESS_MATCH, ER_SUCCESS_NO_MATCH, ER_ERROR_TIMEOUT, ER_ERROR_EXCEPTION] + """ + ER_SUCCESS_MATCH = "ER_SUCCESS_MATCH" + ER_SUCCESS_NO_MATCH = "ER_SUCCESS_NO_MATCH" + ER_ERROR_TIMEOUT = "ER_ERROR_TIMEOUT" + ER_ERROR_EXCEPTION = "ER_ERROR_EXCEPTION" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ResolutionsPerAuthorityStatusCode): + 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/evaluations/resolutions_per_authority_value_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_value_items.py new file mode 100644 index 0000000..4f37232 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/resolutions_per_authority_value_items.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 + from datetime import datetime + + +class ResolutionsPerAuthorityValueItems(object): + """ + An object representing the resolved value for the slot, based on the user's utterance and the slot type definition. + + + :param name: The string for the resolved slot value. + :type name: (optional) str + :param id: The unique ID defined for the resolved slot value. This is based on the IDs defined in the slot type definition. + :type id: (optional) str + + """ + deserialized_types = { + 'name': 'str', + 'id': 'str' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'id': 'id' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, id=None): + # type: (Optional[str], Optional[str]) -> None + """An object representing the resolved value for the slot, based on the user's utterance and the slot type definition. + + :param name: The string for the resolved slot value. + :type name: (optional) str + :param id: The unique ID defined for the resolved slot value. This is based on the IDs defined in the slot type definition. + :type id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.name = name + 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, ResolutionsPerAuthorityValueItems): + 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/evaluations/slot.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot.py new file mode 100644 index 0000000..dad5902 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.evaluations.confirmation_status_type import ConfirmationStatusType + from ask_smapi_model.v1.skill.evaluations.slot_resolutions import SlotResolutions + + +class Slot(object): + """ + + :param name: + :type name: (optional) str + :param value: + :type value: (optional) str + :param confirmation_status: + :type confirmation_status: (optional) ask_smapi_model.v1.skill.evaluations.confirmation_status_type.ConfirmationStatusType + :param resolutions: + :type resolutions: (optional) ask_smapi_model.v1.skill.evaluations.slot_resolutions.SlotResolutions + + """ + deserialized_types = { + 'name': 'str', + 'value': 'str', + 'confirmation_status': 'ask_smapi_model.v1.skill.evaluations.confirmation_status_type.ConfirmationStatusType', + 'resolutions': 'ask_smapi_model.v1.skill.evaluations.slot_resolutions.SlotResolutions' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'value': 'value', + 'confirmation_status': 'confirmationStatus', + 'resolutions': 'resolutions' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, value=None, confirmation_status=None, resolutions=None): + # type: (Optional[str], Optional[str], Optional[ConfirmationStatusType], Optional[SlotResolutions]) -> None + """ + + :param name: + :type name: (optional) str + :param value: + :type value: (optional) str + :param confirmation_status: + :type confirmation_status: (optional) ask_smapi_model.v1.skill.evaluations.confirmation_status_type.ConfirmationStatusType + :param resolutions: + :type resolutions: (optional) ask_smapi_model.v1.skill.evaluations.slot_resolutions.SlotResolutions + """ + self.__discriminator_value = None # type: str + + self.name = name + self.value = value + self.confirmation_status = confirmation_status + self.resolutions = resolutions + + 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, Slot): + 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/evaluations/slot_resolutions.py b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot_resolutions.py new file mode 100644 index 0000000..c27ba19 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/evaluations/slot_resolutions.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 + from datetime import datetime + from ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_items import ResolutionsPerAuthorityItems + + +class SlotResolutions(object): + """ + 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. + :type resolutions_per_authority: (optional) list[ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_items.ResolutionsPerAuthorityItems] + + """ + deserialized_types = { + 'resolutions_per_authority': 'list[ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_items.ResolutionsPerAuthorityItems]' + } # type: Dict + + attribute_map = { + 'resolutions_per_authority': 'resolutionsPerAuthority' + } # type: Dict + supports_multiple_types = False + + def __init__(self, resolutions_per_authority=None): + # type: (Optional[List[ResolutionsPerAuthorityItems]]) -> 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. + :type resolutions_per_authority: (optional) list[ask_smapi_model.v1.skill.evaluations.resolutions_per_authority_items.ResolutionsPerAuthorityItems] + """ + self.__discriminator_value = None # type: str + + self.resolutions_per_authority = resolutions_per_authority + + 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, SlotResolutions): + 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/export_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/export_response.py new file mode 100644 index 0000000..ac3f040 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/export_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 + from datetime import datetime + from ask_smapi_model.v1.skill.response_status import ResponseStatus + from ask_smapi_model.v1.skill.export_response_skill import ExportResponseSkill + + +class ExportResponse(object): + """ + + :param status: + :type status: (optional) ask_smapi_model.v1.skill.response_status.ResponseStatus + :param skill: + :type skill: (optional) ask_smapi_model.v1.skill.export_response_skill.ExportResponseSkill + + """ + deserialized_types = { + 'status': 'ask_smapi_model.v1.skill.response_status.ResponseStatus', + 'skill': 'ask_smapi_model.v1.skill.export_response_skill.ExportResponseSkill' + } # type: Dict + + attribute_map = { + 'status': 'status', + 'skill': 'skill' + } # type: Dict + supports_multiple_types = False + + def __init__(self, status=None, skill=None): + # type: (Optional[ResponseStatus], Optional[ExportResponseSkill]) -> None + """ + + :param status: + :type status: (optional) ask_smapi_model.v1.skill.response_status.ResponseStatus + :param skill: + :type skill: (optional) ask_smapi_model.v1.skill.export_response_skill.ExportResponseSkill + """ + self.__discriminator_value = None # type: str + + self.status = status + self.skill = skill + + 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, ExportResponse): + 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/export_response_skill.py b/ask-smapi-model/ask_smapi_model/v1/skill/export_response_skill.py new file mode 100644 index 0000000..b87a083 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/export_response_skill.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 + from datetime import datetime + + +class ExportResponseSkill(object): + """ + Defines the structure of the GetExport response. + + + :param e_tag: + :type e_tag: (optional) str + :param location: + :type location: (optional) str + :param expires_at: ExpiresAt timestamp in milliseconds. + :type expires_at: (optional) str + + """ + deserialized_types = { + 'e_tag': 'str', + 'location': 'str', + 'expires_at': 'str' + } # type: Dict + + attribute_map = { + 'e_tag': 'eTag', + 'location': 'location', + 'expires_at': 'expiresAt' + } # type: Dict + supports_multiple_types = False + + def __init__(self, e_tag=None, location=None, expires_at=None): + # type: (Optional[str], Optional[str], Optional[str]) -> None + """Defines the structure of the GetExport response. + + :param e_tag: + :type e_tag: (optional) str + :param location: + :type location: (optional) str + :param expires_at: ExpiresAt timestamp in milliseconds. + :type expires_at: (optional) str + """ + self.__discriminator_value = None # type: str + + self.e_tag = e_tag + self.location = location + self.expires_at = expires_at + + 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, ExportResponseSkill): + 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/history/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/__init__.py new file mode 100644 index 0000000..366b136 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/__init__.py @@ -0,0 +1,30 @@ +# 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 .intent import Intent +from .intent_requests import IntentRequests +from .confidence import Confidence +from .sort_field_for_intent_request_type import SortFieldForIntentRequestType +from .intent_request_locales import IntentRequestLocales +from .slot import Slot +from .interaction_type import InteractionType +from .intent_confidence_bin import IntentConfidenceBin +from .locale_in_query import LocaleInQuery +from .dialog_act import DialogAct +from .confidence_bin import ConfidenceBin +from .intent_request import IntentRequest +from .dialog_act_name import DialogActName +from .publication_status import PublicationStatus 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 new file mode 100644 index 0000000..cab1197 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/confidence.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 + from datetime import datetime + from ask_smapi_model.v1.skill.history.confidence_bin import ConfidenceBin + + +class Confidence(object): + """ + The hypothesized confidence for this interaction. + + + :param bin: + :type bin: (optional) ask_smapi_model.v1.skill.history.confidence_bin.ConfidenceBin + + """ + deserialized_types = { + 'bin': 'ask_smapi_model.v1.skill.history.confidence_bin.ConfidenceBin' + } # type: Dict + + attribute_map = { + 'bin': 'bin' + } # type: Dict + supports_multiple_types = False + + def __init__(self, bin=None): + # type: (Optional[ConfidenceBin]) -> None + """The hypothesized confidence for this interaction. + + :param bin: + :type bin: (optional) ask_smapi_model.v1.skill.history.confidence_bin.ConfidenceBin + """ + self.__discriminator_value = None # type: str + + self.bin = bin + + 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, Confidence): + 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/history/confidence_bin.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/confidence_bin.py new file mode 100644 index 0000000..99143dd --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/confidence_bin.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 + from datetime import datetime + + +class ConfidenceBin(Enum): + """ + Intent confidence bin for this utterance. * `HIGH`: Intent was recognized with high confidence. * `MEDIUM`: Intent was recognized with medium confidence. * `LOW`: Intent was recognized with low confidence. Note: Low confidence intents are not sent to the skill. + + + + Allowed enum values: [HIGH, MEDIUM, LOW] + """ + HIGH = "HIGH" + MEDIUM = "MEDIUM" + LOW = "LOW" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ConfidenceBin): + 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/history/dialog_act.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act.py new file mode 100644 index 0000000..261e622 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act.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 + from datetime import datetime + from ask_smapi_model.v1.skill.history.dialog_act_name import DialogActName + + +class DialogAct(object): + """ + The dialog act used in the interaction. + + + :param name: + :type name: (optional) ask_smapi_model.v1.skill.history.dialog_act_name.DialogActName + + """ + deserialized_types = { + 'name': 'ask_smapi_model.v1.skill.history.dialog_act_name.DialogActName' + } # type: Dict + + attribute_map = { + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None): + # type: (Optional[DialogActName]) -> None + """The dialog act used in the interaction. + + :param name: + :type name: (optional) ask_smapi_model.v1.skill.history.dialog_act_name.DialogActName + """ + self.__discriminator_value = None # type: str + + 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, DialogAct): + 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/history/dialog_act_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act_name.py new file mode 100644 index 0000000..bec91c6 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/dialog_act_name.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 + from datetime import datetime + + +class DialogActName(Enum): + """ + Dialog act directive name. * `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) + + + + Allowed enum values: [Dialog_ElicitSlot, Dialog_ConfirmSlot, Dialog_ConfirmIntent] + """ + Dialog_ElicitSlot = "Dialog.ElicitSlot" + Dialog_ConfirmSlot = "Dialog.ConfirmSlot" + Dialog_ConfirmIntent = "Dialog.ConfirmIntent" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DialogActName): + 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/history/intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent.py new file mode 100644 index 0000000..6b3b3f8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent.py @@ -0,0 +1,124 @@ +# 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.history.confidence import Confidence + from ask_smapi_model.v1.skill.history.slot import Slot + + +class Intent(object): + """ + Provides the intent name, slots and confidence of the intent used in this interaction. + + + :param name: The hypothesized intent for this utterance. + :type name: (optional) str + :param confidence: + :type confidence: (optional) ask_smapi_model.v1.skill.history.confidence.Confidence + :param slots: The hypothesized slot(s) for this interaction. + :type slots: (optional) dict(str, ask_smapi_model.v1.skill.history.slot.Slot) + + """ + deserialized_types = { + 'name': 'str', + 'confidence': 'ask_smapi_model.v1.skill.history.confidence.Confidence', + 'slots': 'dict(str, ask_smapi_model.v1.skill.history.slot.Slot)' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'confidence': 'confidence', + 'slots': 'slots' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, confidence=None, slots=None): + # type: (Optional[str], Optional[Confidence], Optional[Dict[str, Slot]]) -> None + """Provides the intent name, slots and confidence of the intent used in this interaction. + + :param name: The hypothesized intent for this utterance. + :type name: (optional) str + :param confidence: + :type confidence: (optional) ask_smapi_model.v1.skill.history.confidence.Confidence + :param slots: The hypothesized slot(s) for this interaction. + :type slots: (optional) dict(str, ask_smapi_model.v1.skill.history.slot.Slot) + """ + self.__discriminator_value = None # type: str + + self.name = name + self.confidence = confidence + self.slots = slots + + 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, Intent): + 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/history/intent_confidence_bin.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_confidence_bin.py new file mode 100644 index 0000000..1bed71f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_confidence_bin.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 + from datetime import datetime + + +class IntentConfidenceBin(Enum): + """ + A filter used to retrieve items where the intent confidence bin is equal to the given value. * `HIGH`: Intent was recognized with high confidence. * `MEDIUM`: Intent was recognized with medium confidence. * `LOW`: Intent was recognized with low confidence. Note: Low confidence intents are not sent to the skill. + + + + Allowed enum values: [HIGH, MEDIUM, LOW] + """ + HIGH = "HIGH" + MEDIUM = "MEDIUM" + LOW = "LOW" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, IntentConfidenceBin): + 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/history/intent_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request.py new file mode 100644 index 0000000..9b79a9e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request.py @@ -0,0 +1,154 @@ +# 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.history.intent_request_locales import IntentRequestLocales + from ask_smapi_model.v1.skill.history.publication_status import PublicationStatus + from ask_smapi_model.v1.stage_type import StageType + from ask_smapi_model.v1.skill.history.interaction_type import InteractionType + from ask_smapi_model.v1.skill.history.dialog_act import DialogAct + from ask_smapi_model.v1.skill.history.intent import Intent + + +class IntentRequest(object): + """ + + :param dialog_act: + :type dialog_act: (optional) ask_smapi_model.v1.skill.history.dialog_act.DialogAct + :param intent: + :type intent: (optional) ask_smapi_model.v1.skill.history.intent.Intent + :param interaction_type: + :type interaction_type: (optional) ask_smapi_model.v1.skill.history.interaction_type.InteractionType + :param locale: + :type locale: (optional) ask_smapi_model.v1.skill.history.intent_request_locales.IntentRequestLocales + :param publication_status: + :type publication_status: (optional) ask_smapi_model.v1.skill.history.publication_status.PublicationStatus + :param stage: + :type stage: (optional) ask_smapi_model.v1.stage_type.StageType + :param utterance_text: The transcribed user speech. + :type utterance_text: (optional) str + + """ + deserialized_types = { + 'dialog_act': 'ask_smapi_model.v1.skill.history.dialog_act.DialogAct', + 'intent': 'ask_smapi_model.v1.skill.history.intent.Intent', + 'interaction_type': 'ask_smapi_model.v1.skill.history.interaction_type.InteractionType', + 'locale': 'ask_smapi_model.v1.skill.history.intent_request_locales.IntentRequestLocales', + 'publication_status': 'ask_smapi_model.v1.skill.history.publication_status.PublicationStatus', + 'stage': 'ask_smapi_model.v1.stage_type.StageType', + 'utterance_text': 'str' + } # type: Dict + + attribute_map = { + 'dialog_act': 'dialogAct', + 'intent': 'intent', + 'interaction_type': 'interactionType', + 'locale': 'locale', + 'publication_status': 'publicationStatus', + 'stage': 'stage', + 'utterance_text': 'utteranceText' + } # type: Dict + 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[DialogAct], Optional[Intent], Optional[InteractionType], Optional[IntentRequestLocales], Optional[PublicationStatus], Optional[StageType], Optional[str]) -> None + """ + + :param dialog_act: + :type dialog_act: (optional) ask_smapi_model.v1.skill.history.dialog_act.DialogAct + :param intent: + :type intent: (optional) ask_smapi_model.v1.skill.history.intent.Intent + :param interaction_type: + :type interaction_type: (optional) ask_smapi_model.v1.skill.history.interaction_type.InteractionType + :param locale: + :type locale: (optional) ask_smapi_model.v1.skill.history.intent_request_locales.IntentRequestLocales + :param publication_status: + :type publication_status: (optional) ask_smapi_model.v1.skill.history.publication_status.PublicationStatus + :param stage: + :type stage: (optional) ask_smapi_model.v1.stage_type.StageType + :param utterance_text: The transcribed user speech. + :type utterance_text: (optional) str + """ + self.__discriminator_value = None # type: str + + self.dialog_act = dialog_act + self.intent = intent + self.interaction_type = interaction_type + self.locale = locale + self.publication_status = publication_status + self.stage = stage + self.utterance_text = utterance_text + + 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, IntentRequest): + 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/history/intent_request_locales.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request_locales.py new file mode 100644 index 0000000..a9559cf --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_request_locales.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 + from datetime import datetime + + +class IntentRequestLocales(Enum): + """ + Skill locale in which this interaction occurred. + + + + Allowed enum values: [en_US, en_GB, en_IN, en_CA, en_AU, de_DE, ja_JP] + """ + en_US = "en-US" + en_GB = "en-GB" + en_IN = "en-IN" + en_CA = "en-CA" + en_AU = "en-AU" + de_DE = "de-DE" + ja_JP = "ja-JP" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, IntentRequestLocales): + 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/history/intent_requests.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_requests.py new file mode 100644 index 0000000..84ed0e3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/intent_requests.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.links import Links + from ask_smapi_model.v1.skill.history.intent_request import IntentRequest + + +class IntentRequests(object): + """ + 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: + :type links: (optional) ask_smapi_model.v1.links.Links + :param next_token: This token can be used to load the next page of the result. + :type next_token: (optional) str + :param is_truncated: This property is true when all the results matching the search request haven't been returned, false otherwise. + :type is_truncated: (optional) bool + :param total_count: Total number of records that matched the given search query. + :type total_count: (optional) float + :param start_index: Position of the current page in the result set. + :type start_index: (optional) float + :param skill_id: The Skill Id. + :type skill_id: (optional) str + :param items: List of intent requests for the skill + :type items: (optional) list[ask_smapi_model.v1.skill.history.intent_request.IntentRequest] + + """ + deserialized_types = { + 'links': 'ask_smapi_model.v1.links.Links', + 'next_token': 'str', + 'is_truncated': 'bool', + 'total_count': 'float', + 'start_index': 'float', + 'skill_id': 'str', + 'items': 'list[ask_smapi_model.v1.skill.history.intent_request.IntentRequest]' + } # type: Dict + + attribute_map = { + 'links': '_links', + 'next_token': 'nextToken', + 'is_truncated': 'isTruncated', + 'total_count': 'totalCount', + 'start_index': 'startIndex', + 'skill_id': 'skillId', + 'items': 'items' + } # type: Dict + 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[Links], Optional[str], Optional[bool], Optional[float], Optional[float], Optional[str], Optional[List[IntentRequest]]) -> 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: + :type links: (optional) ask_smapi_model.v1.links.Links + :param next_token: This token can be used to load the next page of the result. + :type next_token: (optional) str + :param is_truncated: This property is true when all the results matching the search request haven't been returned, false otherwise. + :type is_truncated: (optional) bool + :param total_count: Total number of records that matched the given search query. + :type total_count: (optional) float + :param start_index: Position of the current page in the result set. + :type start_index: (optional) float + :param skill_id: The Skill Id. + :type skill_id: (optional) str + :param items: List of intent requests for the skill + :type items: (optional) list[ask_smapi_model.v1.skill.history.intent_request.IntentRequest] + """ + self.__discriminator_value = None # type: str + + self.links = links + self.next_token = next_token + self.is_truncated = is_truncated + self.total_count = total_count + self.start_index = start_index + self.skill_id = skill_id + 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, IntentRequests): + 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/history/interaction_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/interaction_type.py new file mode 100644 index 0000000..fbf4c65 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/interaction_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 + from datetime import datetime + + +class InteractionType(Enum): + """ + Indicates if the utterance was executed as a \"ONE_SHOT\" interaction or \"MODAL\" interaction. * `ONE_SHOT`: The user invokes the skill and states their intent in a single phrase. * `MODAL`: The user first invokes the skill and then states their intent. + + + + Allowed enum values: [ONE_SHOT, MODAL] + """ + ONE_SHOT = "ONE_SHOT" + MODAL = "MODAL" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, InteractionType): + 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/history/locale_in_query.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/locale_in_query.py new file mode 100644 index 0000000..0fb9ad9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/locale_in_query.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 + from datetime import datetime + + +class LocaleInQuery(Enum): + """ + A filter used to retrieve items where the locale is equal to the given value. + + + + Allowed enum values: [en_US, en_GB, en_IN, en_CA, en_AU, de_DE, ja_JP] + """ + en_US = "en-US" + en_GB = "en-GB" + en_IN = "en-IN" + en_CA = "en-CA" + en_AU = "en-AU" + de_DE = "de-DE" + ja_JP = "ja-JP" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, LocaleInQuery): + 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/history/publication_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/history/publication_status.py new file mode 100644 index 0000000..9d24100 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/publication_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 + from datetime import datetime + + +class PublicationStatus(Enum): + """ + The publication status of the skill when this interaction occurred + + + + Allowed enum values: [Development, Certification] + """ + Development = "Development" + Certification = "Certification" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, PublicationStatus): + 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/history/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/history/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..742f876 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/slot.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 + from datetime import datetime + + +class Slot(object): + """ + + :param name: Name of the slot that was used in this interaction. + :type name: (optional) str + + """ + deserialized_types = { + 'name': 'str' + } # type: Dict + + attribute_map = { + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None): + # type: (Optional[str]) -> None + """ + + :param name: Name of the slot that was used in this interaction. + :type name: (optional) str + """ + self.__discriminator_value = None # type: str + + 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, Slot): + 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/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 new file mode 100644 index 0000000..9c808cc --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/history/sort_field_for_intent_request_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 + from datetime import datetime + + +class SortFieldForIntentRequestType(Enum): + """ + + + Allowed enum values: [recordCount, intent_name, intent_confidence_bin, stage, dialogAct_name, locale, utteranceText, publicationStatus, interactionType] + """ + recordCount = "recordCount" + intent_name = "intent.name" + intent_confidence_bin = "intent.confidence.bin" + stage = "stage" + dialogAct_name = "dialogAct.name" + locale = "locale" + utteranceText = "utteranceText" + publicationStatus = "publicationStatus" + interactionType = "interactionType" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SortFieldForIntentRequestType): + 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/image_attributes.py b/ask-smapi-model/ask_smapi_model/v1/skill/image_attributes.py new file mode 100644 index 0000000..408fe04 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/image_attributes.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 + from datetime import datetime + from ask_smapi_model.v1.skill.image_size import ImageSize + from ask_smapi_model.v1.skill.image_dimension import ImageDimension + + +class ImageAttributes(object): + """ + 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 + + """ + deserialized_types = { + 'dimension': 'ask_smapi_model.v1.skill.image_dimension.ImageDimension', + 'size': 'ask_smapi_model.v1.skill.image_size.ImageSize' + } # type: Dict + + attribute_map = { + 'dimension': 'dimension', + 'size': 'size' + } # type: Dict + supports_multiple_types = False + + def __init__(self, dimension=None, size=None): + # type: (Optional[ImageDimension], Optional[ImageSize]) -> 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 + """ + self.__discriminator_value = None # type: str + + self.dimension = dimension + self.size = size + + 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, ImageAttributes): + 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/image_dimension.py b/ask-smapi-model/ask_smapi_model/v1/skill/image_dimension.py new file mode 100644 index 0000000..c17b6c3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/image_dimension.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 + from datetime import datetime + + +class ImageDimension(object): + """ + Dimensions of an image. + + + :param width_in_pixels: Width of the image in pixels. + :type width_in_pixels: (optional) int + :param height_in_pixels: Height of the image in pixels. + :type height_in_pixels: (optional) int + + """ + deserialized_types = { + 'width_in_pixels': 'int', + 'height_in_pixels': 'int' + } # type: Dict + + attribute_map = { + 'width_in_pixels': 'widthInPixels', + 'height_in_pixels': 'heightInPixels' + } # type: Dict + supports_multiple_types = False + + def __init__(self, width_in_pixels=None, height_in_pixels=None): + # type: (Optional[int], Optional[int]) -> None + """Dimensions of an image. + + :param width_in_pixels: Width of the image in pixels. + :type width_in_pixels: (optional) int + :param height_in_pixels: Height of the image in pixels. + :type height_in_pixels: (optional) int + """ + self.__discriminator_value = None # type: str + + self.width_in_pixels = width_in_pixels + self.height_in_pixels = height_in_pixels + + 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, ImageDimension): + 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/image_size.py b/ask-smapi-model/ask_smapi_model/v1/skill/image_size.py new file mode 100644 index 0000000..431bc4c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/image_size.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 + from datetime import datetime + from ask_smapi_model.v1.skill.image_size_unit import ImageSizeUnit + + +class ImageSize(object): + """ + On disk storage size of image. + + + :param value: Value measuring the size of the image. + :type value: (optional) float + :param unit: + :type unit: (optional) ask_smapi_model.v1.skill.image_size_unit.ImageSizeUnit + + """ + deserialized_types = { + 'value': 'float', + 'unit': 'ask_smapi_model.v1.skill.image_size_unit.ImageSizeUnit' + } # type: Dict + + attribute_map = { + 'value': 'value', + 'unit': 'unit' + } # type: Dict + supports_multiple_types = False + + def __init__(self, value=None, unit=None): + # type: (Optional[float], Optional[ImageSizeUnit]) -> None + """On disk storage size of image. + + :param value: Value measuring the size of the image. + :type value: (optional) float + :param unit: + :type unit: (optional) ask_smapi_model.v1.skill.image_size_unit.ImageSizeUnit + """ + self.__discriminator_value = None # type: str + + self.value = value + self.unit = unit + + 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, ImageSize): + 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/image_size_unit.py b/ask-smapi-model/ask_smapi_model/v1/skill/image_size_unit.py new file mode 100644 index 0000000..b672c1e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/image_size_unit.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 + from datetime import datetime + + +class ImageSizeUnit(Enum): + """ + Unit of measurement for size of image. + + + + Allowed enum values: [MB] + """ + MB = "MB" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ImageSizeUnit): + 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/import_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/import_response.py new file mode 100644 index 0000000..4e71235 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/import_response.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 + from datetime import datetime + from ask_smapi_model.v1.skill.standardized_error import StandardizedError + from ask_smapi_model.v1.skill.response_status import ResponseStatus + from ask_smapi_model.v1.skill.import_response_skill import ImportResponseSkill + + +class ImportResponse(object): + """ + + :param status: + :type status: (optional) ask_smapi_model.v1.skill.response_status.ResponseStatus + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param warnings: + :type warnings: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param skill: + :type skill: (optional) ask_smapi_model.v1.skill.import_response_skill.ImportResponseSkill + + """ + deserialized_types = { + 'status': 'ask_smapi_model.v1.skill.response_status.ResponseStatus', + 'errors': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]', + 'warnings': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]', + 'skill': 'ask_smapi_model.v1.skill.import_response_skill.ImportResponseSkill' + } # type: Dict + + attribute_map = { + 'status': 'status', + 'errors': 'errors', + 'warnings': 'warnings', + 'skill': 'skill' + } # type: Dict + supports_multiple_types = False + + def __init__(self, status=None, errors=None, warnings=None, skill=None): + # type: (Optional[ResponseStatus], Optional[List[StandardizedError]], Optional[List[StandardizedError]], Optional[ImportResponseSkill]) -> None + """ + + :param status: + :type status: (optional) ask_smapi_model.v1.skill.response_status.ResponseStatus + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param warnings: + :type warnings: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param skill: + :type skill: (optional) ask_smapi_model.v1.skill.import_response_skill.ImportResponseSkill + """ + self.__discriminator_value = None # type: str + + self.status = status + self.errors = errors + self.warnings = warnings + self.skill = skill + + 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, ImportResponse): + 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/import_response_skill.py b/ask-smapi-model/ask_smapi_model/v1/skill/import_response_skill.py new file mode 100644 index 0000000..0554c79 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/import_response_skill.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 + from datetime import datetime + from ask_smapi_model.v1.skill.resource_import_status import ResourceImportStatus + + +class ImportResponseSkill(object): + """ + + :param skill_id: + :type skill_id: (optional) str + :param e_tag: + :type e_tag: (optional) str + :param resources: + :type resources: (optional) list[ask_smapi_model.v1.skill.resource_import_status.ResourceImportStatus] + + """ + deserialized_types = { + 'skill_id': 'str', + 'e_tag': 'str', + 'resources': 'list[ask_smapi_model.v1.skill.resource_import_status.ResourceImportStatus]' + } # type: Dict + + attribute_map = { + 'skill_id': 'skillId', + 'e_tag': 'eTag', + 'resources': 'resources' + } # type: Dict + supports_multiple_types = False + + def __init__(self, skill_id=None, e_tag=None, resources=None): + # type: (Optional[str], Optional[str], Optional[List[ResourceImportStatus]]) -> None + """ + + :param skill_id: + :type skill_id: (optional) str + :param e_tag: + :type e_tag: (optional) str + :param resources: + :type resources: (optional) list[ask_smapi_model.v1.skill.resource_import_status.ResourceImportStatus] + """ + self.__discriminator_value = None # type: str + + self.skill_id = skill_id + self.e_tag = e_tag + self.resources = resources + + 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, ImportResponseSkill): + 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/instance.py b/ask-smapi-model/ask_smapi_model/v1/skill/instance.py new file mode 100644 index 0000000..e02fb8d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/instance.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 + from datetime import datetime + from ask_smapi_model.v1.skill.validation_data_types import ValidationDataTypes + + +class Instance(object): + """ + 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. + :type property_path: (optional) str + :param data_type: + :type data_type: (optional) ask_smapi_model.v1.skill.validation_data_types.ValidationDataTypes + :param value: String value of the instance. Incase of null, object or array the value field would be null or not present. Incase of string, boolean or integer dataType it will be the corresponding String value. + :type value: (optional) str + + """ + deserialized_types = { + 'property_path': 'str', + 'data_type': 'ask_smapi_model.v1.skill.validation_data_types.ValidationDataTypes', + 'value': 'str' + } # type: Dict + + attribute_map = { + 'property_path': 'propertyPath', + 'data_type': 'dataType', + 'value': 'value' + } # type: Dict + supports_multiple_types = False + + def __init__(self, property_path=None, data_type=None, value=None): + # type: (Optional[str], Optional[ValidationDataTypes], 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. + :type property_path: (optional) str + :param data_type: + :type data_type: (optional) ask_smapi_model.v1.skill.validation_data_types.ValidationDataTypes + :param value: String value of the instance. Incase of null, object or array the value field would be null or not present. Incase of string, boolean or integer dataType it will be the corresponding String value. + :type value: (optional) str + """ + self.__discriminator_value = None # type: str + + self.property_path = property_path + self.data_type = data_type + self.value = 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, Instance): + 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/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/__init__.py new file mode 100644 index 0000000..4ad0809 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/__init__.py @@ -0,0 +1,44 @@ +# 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 .intent import Intent +from .slot_type import SlotType +from .dialog_prompts import DialogPrompts +from .value_supplier import ValueSupplier +from .language_model import LanguageModel +from .is_less_than_or_equal_to import IsLessThanOrEqualTo +from .slot_definition import SlotDefinition +from .dialog import Dialog +from .delegation_strategy_type import DelegationStrategyType +from .value_catalog import ValueCatalog +from .dialog_slot_items import DialogSlotItems +from .dialog_intents import DialogIntents +from .has_entity_resolution_match import HasEntityResolutionMatch +from .slot_validation import SlotValidation +from .is_not_in_set import IsNotInSet +from .is_in_duration import IsInDuration +from .is_in_set import IsInSet +from .catalog_value_supplier import CatalogValueSupplier +from .interaction_model_schema import InteractionModelSchema +from .prompt_items_type import PromptItemsType +from .prompt import Prompt +from .is_less_than import IsLessThan +from .prompt_items import PromptItems +from .dialog_intents_prompts import Prompts +from .is_not_in_duration import IsNotInDuration +from .interaction_model_data import InteractionModelData +from .is_greater_than_or_equal_to import IsGreaterThanOrEqualTo +from .is_greater_than import IsGreaterThan 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 new file mode 100644 index 0000000..bd8b7ff --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/__init__.py @@ -0,0 +1,27 @@ +# 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 .list_catalog_response import ListCatalogResponse +from .update_request import UpdateRequest +from .catalog_response import CatalogResponse +from .catalog_status_type import CatalogStatusType +from .last_update_request import LastUpdateRequest +from .catalog_status import CatalogStatus +from .catalog_definition_output import CatalogDefinitionOutput +from .catalog_input import CatalogInput +from .definition_data import DefinitionData +from .catalog_item import CatalogItem +from .catalog_entity import CatalogEntity 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 new file mode 100644 index 0000000..dba0d3e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_definition_output.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_entity import CatalogEntity + + +class CatalogDefinitionOutput(object): + """ + Catalog request definitions. + + + :param catalog: + :type catalog: (optional) ask_smapi_model.v1.skill.interaction_model.catalog.catalog_entity.CatalogEntity + :param creation_time: Time of the catalog definition creation. + :type creation_time: (optional) str + :param total_versions: Total number of versions. + :type total_versions: (optional) str + + """ + deserialized_types = { + 'catalog': 'ask_smapi_model.v1.skill.interaction_model.catalog.catalog_entity.CatalogEntity', + 'creation_time': 'str', + 'total_versions': 'str' + } # type: Dict + + attribute_map = { + 'catalog': 'catalog', + 'creation_time': 'creationTime', + 'total_versions': 'totalVersions' + } # type: Dict + supports_multiple_types = False + + def __init__(self, catalog=None, creation_time=None, total_versions=None): + # type: (Optional[CatalogEntity], Optional[str], Optional[str]) -> None + """Catalog request definitions. + + :param catalog: + :type catalog: (optional) ask_smapi_model.v1.skill.interaction_model.catalog.catalog_entity.CatalogEntity + :param creation_time: Time of the catalog definition creation. + :type creation_time: (optional) str + :param total_versions: Total number of versions. + :type total_versions: (optional) str + """ + self.__discriminator_value = None # type: str + + self.catalog = catalog + self.creation_time = creation_time + self.total_versions = total_versions + + 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, CatalogDefinitionOutput): + 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/catalog/catalog_entity.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_entity.py new file mode 100644 index 0000000..cdeb0d5 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_entity.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 + from datetime import datetime + + +class CatalogEntity(object): + """ + Definition for catalog entity. + + + :param name: Name of the catalog. + :type name: (optional) str + :param description: Description string about the catalog. + :type description: (optional) str + + """ + deserialized_types = { + 'name': 'str', + 'description': 'str' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'description': 'description' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, description=None): + # type: (Optional[str], Optional[str]) -> None + """Definition for catalog entity. + + :param name: Name of the catalog. + :type name: (optional) str + :param description: Description string about the catalog. + :type description: (optional) str + """ + self.__discriminator_value = None # type: str + + self.name = name + self.description = 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, CatalogEntity): + 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/catalog/catalog_input.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_input.py new file mode 100644 index 0000000..28a28a5 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_input.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 + from datetime import datetime + + +class CatalogInput(object): + """ + Definition for catalog input. + + + :param name: Name of the catalog. + :type name: (optional) str + :param description: Description string about the catalog. + :type description: (optional) str + + """ + deserialized_types = { + 'name': 'str', + 'description': 'str' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'description': 'description' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, description=None): + # type: (Optional[str], Optional[str]) -> None + """Definition for catalog input. + + :param name: Name of the catalog. + :type name: (optional) str + :param description: Description string about the catalog. + :type description: (optional) str + """ + self.__discriminator_value = None # type: str + + self.name = name + self.description = 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, CatalogInput): + 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/catalog/catalog_item.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_item.py new file mode 100644 index 0000000..43acff5 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_item.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 + from datetime import datetime + from ask_smapi_model.v1.links import Links + + +class CatalogItem(object): + """ + Definition for catalog entity. + + + :param name: Name of the catalog. + :type name: (optional) str + :param description: Description string about the catalog. + :type description: (optional) str + :param catalog_id: Identifier of the catalog, optional in get response as the request already has catalogId. + :type catalog_id: (optional) str + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + + """ + deserialized_types = { + 'name': 'str', + 'description': 'str', + 'catalog_id': 'str', + 'links': 'ask_smapi_model.v1.links.Links' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'catalog_id': 'catalogId', + 'links': '_links' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, description=None, catalog_id=None, links=None): + # type: (Optional[str], Optional[str], Optional[str], Optional[Links]) -> None + """Definition for catalog entity. + + :param name: Name of the catalog. + :type name: (optional) str + :param description: Description string about the catalog. + :type description: (optional) str + :param catalog_id: Identifier of the catalog, optional in get response as the request already has catalogId. + :type catalog_id: (optional) str + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + """ + self.__discriminator_value = None # type: str + + self.name = name + self.description = description + self.catalog_id = catalog_id + self.links = links + + 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, CatalogItem): + 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/catalog/catalog_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_response.py new file mode 100644 index 0000000..e31d139 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_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 + from datetime import datetime + + +class CatalogResponse(object): + """ + CatalogId information. + + + :param catalog_id: ID of the catalog created. + :type catalog_id: (optional) str + + """ + deserialized_types = { + 'catalog_id': 'str' + } # type: Dict + + attribute_map = { + 'catalog_id': 'catalogId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, catalog_id=None): + # type: (Optional[str]) -> None + """CatalogId information. + + :param catalog_id: ID of the catalog created. + :type catalog_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.catalog_id = catalog_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, CatalogResponse): + 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/catalog/catalog_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status.py new file mode 100644 index 0000000..e4bf37f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.catalog.last_update_request import LastUpdateRequest + + +class CatalogStatus(object): + """ + Defines the structure for catalog status response. + + + :param last_update_request: + :type last_update_request: (optional) ask_smapi_model.v1.skill.interaction_model.catalog.last_update_request.LastUpdateRequest + + """ + deserialized_types = { + 'last_update_request': 'ask_smapi_model.v1.skill.interaction_model.catalog.last_update_request.LastUpdateRequest' + } # type: Dict + + attribute_map = { + 'last_update_request': 'lastUpdateRequest' + } # type: Dict + supports_multiple_types = False + + def __init__(self, last_update_request=None): + # type: (Optional[LastUpdateRequest]) -> None + """Defines the structure for catalog status response. + + :param last_update_request: + :type last_update_request: (optional) ask_smapi_model.v1.skill.interaction_model.catalog.last_update_request.LastUpdateRequest + """ + self.__discriminator_value = None # type: str + + self.last_update_request = last_update_request + + 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, CatalogStatus): + 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/catalog/catalog_status_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status_type.py new file mode 100644 index 0000000..1f0ca4b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/catalog_status_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 + from datetime import datetime + + +class CatalogStatusType(Enum): + """ + Status of last modification request for a resource. + + + + Allowed enum values: [FAILED, IN_PROGRESS, SUCCEEDED] + """ + FAILED = "FAILED" + IN_PROGRESS = "IN_PROGRESS" + SUCCEEDED = "SUCCEEDED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, CatalogStatusType): + 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/catalog/definition_data.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/definition_data.py new file mode 100644 index 0000000..3abcfab --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/definition_data.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_input import CatalogInput + + +class DefinitionData(object): + """ + Catalog request definitions. + + + :param catalog: + :type catalog: (optional) ask_smapi_model.v1.skill.interaction_model.catalog.catalog_input.CatalogInput + :param vendor_id: The vendorId that the catalog should belong to. + :type vendor_id: (optional) str + + """ + deserialized_types = { + 'catalog': 'ask_smapi_model.v1.skill.interaction_model.catalog.catalog_input.CatalogInput', + 'vendor_id': 'str' + } # type: Dict + + attribute_map = { + 'catalog': 'catalog', + 'vendor_id': 'vendorId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, catalog=None, vendor_id=None): + # type: (Optional[CatalogInput], Optional[str]) -> None + """Catalog request definitions. + + :param catalog: + :type catalog: (optional) ask_smapi_model.v1.skill.interaction_model.catalog.catalog_input.CatalogInput + :param vendor_id: The vendorId that the catalog should belong to. + :type vendor_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.catalog = catalog + self.vendor_id = vendor_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, DefinitionData): + 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/catalog/last_update_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/last_update_request.py new file mode 100644 index 0000000..a04ecdb --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/last_update_request.py @@ -0,0 +1,124 @@ +# 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.interaction_model.catalog.catalog_status_type import CatalogStatusType + from ask_smapi_model.v1.skill.standardized_error import StandardizedError + + +class LastUpdateRequest(object): + """ + Contains attributes related to last modification request of a resource. + + + :param status: + :type status: (optional) ask_smapi_model.v1.skill.interaction_model.catalog.catalog_status_type.CatalogStatusType + :param version: The version id of the entity returned. + :type version: (optional) str + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + + """ + deserialized_types = { + 'status': 'ask_smapi_model.v1.skill.interaction_model.catalog.catalog_status_type.CatalogStatusType', + 'version': 'str', + 'errors': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]' + } # type: Dict + + attribute_map = { + 'status': 'status', + 'version': 'version', + 'errors': 'errors' + } # type: Dict + supports_multiple_types = False + + def __init__(self, status=None, version=None, errors=None): + # type: (Optional[CatalogStatusType], Optional[str], Optional[List[StandardizedError]]) -> None + """Contains attributes related to last modification request of a resource. + + :param status: + :type status: (optional) ask_smapi_model.v1.skill.interaction_model.catalog.catalog_status_type.CatalogStatusType + :param version: The version id of the entity returned. + :type version: (optional) str + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + """ + self.__discriminator_value = None # type: str + + self.status = status + self.version = version + 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, LastUpdateRequest): + 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/catalog/list_catalog_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/list_catalog_response.py new file mode 100644 index 0000000..cda2f23 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/list_catalog_response.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.catalog.catalog_item import CatalogItem + from ask_smapi_model.v1.links import Links + + +class ListCatalogResponse(object): + """ + List of catalog versions of a skill for the vendor. + + + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param catalogs: List of catalogs. + :type catalogs: (optional) list[ask_smapi_model.v1.skill.interaction_model.catalog.catalog_item.CatalogItem] + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + :param total_count: + :type total_count: (optional) int + + """ + deserialized_types = { + 'links': 'ask_smapi_model.v1.links.Links', + 'catalogs': 'list[ask_smapi_model.v1.skill.interaction_model.catalog.catalog_item.CatalogItem]', + 'is_truncated': 'bool', + 'next_token': 'str', + 'total_count': 'int' + } # type: Dict + + attribute_map = { + 'links': '_links', + 'catalogs': 'catalogs', + 'is_truncated': 'isTruncated', + 'next_token': 'nextToken', + 'total_count': 'totalCount' + } # type: Dict + supports_multiple_types = False + + def __init__(self, links=None, catalogs=None, is_truncated=None, next_token=None, total_count=None): + # type: (Optional[Links], Optional[List[CatalogItem]], Optional[bool], Optional[str], Optional[int]) -> None + """List of catalog versions of a skill for the vendor. + + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param catalogs: List of catalogs. + :type catalogs: (optional) list[ask_smapi_model.v1.skill.interaction_model.catalog.catalog_item.CatalogItem] + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + :param total_count: + :type total_count: (optional) int + """ + self.__discriminator_value = None # type: str + + self.links = links + self.catalogs = catalogs + self.is_truncated = is_truncated + self.next_token = next_token + self.total_count = total_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, ListCatalogResponse): + 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/catalog/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..db2fd0a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog/update_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 + from datetime import datetime + + +class UpdateRequest(object): + """ + Catalog update request object. + + + :param name: The catalog name. + :type name: (optional) str + :param description: The catalog description with a 255 character maximum. + :type description: (optional) str + + """ + deserialized_types = { + 'name': 'str', + 'description': 'str' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'description': 'description' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, description=None): + # type: (Optional[str], Optional[str]) -> None + """Catalog update request object. + + :param name: The catalog name. + :type name: (optional) str + :param description: The catalog description with a 255 character maximum. + :type description: (optional) str + """ + self.__discriminator_value = None # type: str + + self.name = name + self.description = 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, 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-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 new file mode 100644 index 0000000..48349c8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/catalog_value_supplier.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_smapi_model.v1.skill.interaction_model.value_supplier import ValueSupplier + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.value_catalog import ValueCatalog + + +class CatalogValueSupplier(ValueSupplier): + """ + Supply slot values from catalog(s). + + + :param value_catalog: + :type value_catalog: (optional) ask_smapi_model.v1.skill.interaction_model.value_catalog.ValueCatalog + + """ + deserialized_types = { + 'object_type': 'str', + 'value_catalog': 'ask_smapi_model.v1.skill.interaction_model.value_catalog.ValueCatalog' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'value_catalog': 'valueCatalog' + } # type: Dict + supports_multiple_types = False + + def __init__(self, value_catalog=None): + # type: (Optional[ValueCatalog]) -> None + """Supply slot values from catalog(s). + + :param value_catalog: + :type value_catalog: (optional) ask_smapi_model.v1.skill.interaction_model.value_catalog.ValueCatalog + """ + self.__discriminator_value = "CatalogValueSupplier" # type: str + + self.object_type = self.__discriminator_value + super(CatalogValueSupplier, self).__init__(object_type=self.__discriminator_value) + self.value_catalog = value_catalog + + 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, CatalogValueSupplier): + 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/delegation_strategy_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/delegation_strategy_type.py new file mode 100644 index 0000000..82e6cd9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/delegation_strategy_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 + from datetime import datetime + + +class DelegationStrategyType(Enum): + """ + Enumerates delegation strategies used to control automatic dialog management through the defined dialog model. When no delegation strategies are defined, the value SKILL_RESPONSE is assumed. + + + + Allowed enum values: [ALWAYS, SKILL_RESPONSE] + """ + ALWAYS = "ALWAYS" + SKILL_RESPONSE = "SKILL_RESPONSE" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DelegationStrategyType): + 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/dialog.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog.py new file mode 100644 index 0000000..9940984 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.dialog_intents import DialogIntents + from ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type import DelegationStrategyType + + +class Dialog(object): + """ + 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. + :type delegation_strategy: (optional) ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type.DelegationStrategyType + :param intents: List of intents that have dialog rules associated with them. Dialogs can also span multiple intents. + :type intents: (optional) list[ask_smapi_model.v1.skill.interaction_model.dialog_intents.DialogIntents] + + """ + deserialized_types = { + 'delegation_strategy': 'ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type.DelegationStrategyType', + 'intents': 'list[ask_smapi_model.v1.skill.interaction_model.dialog_intents.DialogIntents]' + } # type: Dict + + attribute_map = { + 'delegation_strategy': 'delegationStrategy', + 'intents': 'intents' + } # type: Dict + supports_multiple_types = False + + def __init__(self, delegation_strategy=None, intents=None): + # type: (Optional[DelegationStrategyType], Optional[List[DialogIntents]]) -> 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. + :type delegation_strategy: (optional) ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type.DelegationStrategyType + :param intents: List of intents that have dialog rules associated with them. Dialogs can also span multiple intents. + :type intents: (optional) list[ask_smapi_model.v1.skill.interaction_model.dialog_intents.DialogIntents] + """ + self.__discriminator_value = None # type: str + + self.delegation_strategy = delegation_strategy + self.intents = 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, Dialog): + 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/dialog_intents.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents.py new file mode 100644 index 0000000..910e9ab --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.dialog_slot_items import DialogSlotItems + from ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type import DelegationStrategyType + from ask_smapi_model.v1.skill.interaction_model.prompts import Prompts + + +class DialogIntents(object): + """ + + :param name: Name of the intent that has a dialog specification. + :type name: (optional) str + :param delegation_strategy: Defines an intent-specific delegation strategy for this dialog intent. Overrides dialog-level setting. + :type delegation_strategy: (optional) ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type.DelegationStrategyType + :param slots: List of slots that have dialog rules. + :type slots: (optional) list[ask_smapi_model.v1.skill.interaction_model.dialog_slot_items.DialogSlotItems] + :param confirmation_required: Describes whether confirmation of the intent is required. + :type confirmation_required: (optional) bool + :param prompts: + :type prompts: (optional) ask_smapi_model.v1.skill.interaction_model.prompts.Prompts + + """ + deserialized_types = { + 'name': 'str', + 'delegation_strategy': 'ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type.DelegationStrategyType', + 'slots': 'list[ask_smapi_model.v1.skill.interaction_model.dialog_slot_items.DialogSlotItems]', + 'confirmation_required': 'bool', + 'prompts': 'ask_smapi_model.v1.skill.interaction_model.prompts.Prompts' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'delegation_strategy': 'delegationStrategy', + 'slots': 'slots', + 'confirmation_required': 'confirmationRequired', + 'prompts': 'prompts' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, delegation_strategy=None, slots=None, confirmation_required=None, prompts=None): + # type: (Optional[str], Optional[DelegationStrategyType], Optional[List[DialogSlotItems]], Optional[bool], Optional[Prompts]) -> None + """ + + :param name: Name of the intent that has a dialog specification. + :type name: (optional) str + :param delegation_strategy: Defines an intent-specific delegation strategy for this dialog intent. Overrides dialog-level setting. + :type delegation_strategy: (optional) ask_smapi_model.v1.skill.interaction_model.delegation_strategy_type.DelegationStrategyType + :param slots: List of slots that have dialog rules. + :type slots: (optional) list[ask_smapi_model.v1.skill.interaction_model.dialog_slot_items.DialogSlotItems] + :param confirmation_required: Describes whether confirmation of the intent is required. + :type confirmation_required: (optional) bool + :param prompts: + :type prompts: (optional) ask_smapi_model.v1.skill.interaction_model.prompts.Prompts + """ + self.__discriminator_value = None # type: str + + self.name = name + self.delegation_strategy = delegation_strategy + self.slots = slots + self.confirmation_required = confirmation_required + self.prompts = prompts + + 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, DialogIntents): + 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/dialog_intents_prompts.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents_prompts.py new file mode 100644 index 0000000..282fbfd --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_intents_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 + from datetime import datetime + + +class Prompts(object): + """ + Collection of prompts for this intent. + + + :param elicitation: Enum value in the dialog_slots map to reference the elicitation prompt id. + :type elicitation: (optional) str + :param confirmation: Enum value in the dialog_slots map to reference the confirmation prompt id. + :type confirmation: (optional) str + + """ + deserialized_types = { + 'elicitation': 'str', + 'confirmation': 'str' + } # type: Dict + + attribute_map = { + 'elicitation': 'elicitation', + 'confirmation': 'confirmation' + } # type: Dict + supports_multiple_types = False + + def __init__(self, elicitation=None, confirmation=None): + # type: (Optional[str], Optional[str]) -> None + """Collection of prompts for this intent. + + :param elicitation: Enum value in the dialog_slots map to reference the elicitation prompt id. + :type elicitation: (optional) str + :param confirmation: Enum value in the dialog_slots map to reference the confirmation prompt id. + :type confirmation: (optional) str + """ + self.__discriminator_value = None # type: str + + self.elicitation = elicitation + self.confirmation = confirmation + + 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, Prompts): + 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/dialog_prompts.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_prompts.py new file mode 100644 index 0000000..b6b5cc1 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_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 + from datetime import datetime + + +class DialogPrompts(object): + """ + Dialog prompts associated with this slot i.e. for elicitation and/or confirmation. + + + :param elicitation: Reference to a prompt-id to use If this slot value is missing. + :type elicitation: (optional) str + :param confirmation: Reference to a prompt-id to use to confirm the slots value. + :type confirmation: (optional) str + + """ + deserialized_types = { + 'elicitation': 'str', + 'confirmation': 'str' + } # type: Dict + + attribute_map = { + 'elicitation': 'elicitation', + 'confirmation': 'confirmation' + } # type: Dict + supports_multiple_types = False + + def __init__(self, elicitation=None, confirmation=None): + # type: (Optional[str], Optional[str]) -> None + """Dialog prompts associated with this slot i.e. for elicitation and/or confirmation. + + :param elicitation: Reference to a prompt-id to use If this slot value is missing. + :type elicitation: (optional) str + :param confirmation: Reference to a prompt-id to use to confirm the slots value. + :type confirmation: (optional) str + """ + self.__discriminator_value = None # type: str + + self.elicitation = elicitation + self.confirmation = confirmation + + 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, DialogPrompts): + 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/dialog_slot_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_slot_items.py new file mode 100644 index 0000000..9a84a3e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/dialog_slot_items.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.slot_validation import SlotValidation + from ask_smapi_model.v1.skill.interaction_model.dialog_prompts import DialogPrompts + + +class DialogSlotItems(object): + """ + + :param name: The name of the slot that has dialog rules associated with it. + :type name: (optional) str + :param object_type: Type of the slot in the dialog intent. + :type object_type: (optional) str + :param elicitation_required: Describes whether elicitation of the slot is required. + :type elicitation_required: (optional) bool + :param confirmation_required: Describes whether confirmation of the slot is required. + :type confirmation_required: (optional) bool + :param prompts: + :type prompts: (optional) ask_smapi_model.v1.skill.interaction_model.dialog_prompts.DialogPrompts + :param validations: List of validations for the slot. if validation fails, user will be prompted with the provided prompt. + :type validations: (optional) list[ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation] + + """ + deserialized_types = { + 'name': 'str', + 'object_type': 'str', + 'elicitation_required': 'bool', + 'confirmation_required': 'bool', + 'prompts': 'ask_smapi_model.v1.skill.interaction_model.dialog_prompts.DialogPrompts', + 'validations': 'list[ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation]' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'object_type': 'type', + 'elicitation_required': 'elicitationRequired', + 'confirmation_required': 'confirmationRequired', + 'prompts': 'prompts', + 'validations': 'validations' + } # type: Dict + 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[DialogPrompts], Optional[List[SlotValidation]]) -> None + """ + + :param name: The name of the slot that has dialog rules associated with it. + :type name: (optional) str + :param object_type: Type of the slot in the dialog intent. + :type object_type: (optional) str + :param elicitation_required: Describes whether elicitation of the slot is required. + :type elicitation_required: (optional) bool + :param confirmation_required: Describes whether confirmation of the slot is required. + :type confirmation_required: (optional) bool + :param prompts: + :type prompts: (optional) ask_smapi_model.v1.skill.interaction_model.dialog_prompts.DialogPrompts + :param validations: List of validations for the slot. if validation fails, user will be prompted with the provided prompt. + :type validations: (optional) list[ask_smapi_model.v1.skill.interaction_model.slot_validation.SlotValidation] + """ + self.__discriminator_value = None # type: str + + self.name = name + self.object_type = object_type + self.elicitation_required = elicitation_required + self.confirmation_required = confirmation_required + self.prompts = prompts + self.validations = validations + + 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, DialogSlotItems): + 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/has_entity_resolution_match.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/has_entity_resolution_match.py new file mode 100644 index 0000000..2a05df3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/has_entity_resolution_match.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.interaction_model.slot_validation import SlotValidation + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class HasEntityResolutionMatch(SlotValidation): + """ + The hasEntityResolutionMatch would allow Alexa to trigger a re-prompt when the status produced by ER is \"ER_SUCCESS_NO_MATCH\". + + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'prompt': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'prompt': 'prompt' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prompt=None): + # type: (Optional[str]) -> None + """The hasEntityResolutionMatch would allow Alexa to trigger a re-prompt when the status produced by ER is \"ER_SUCCESS_NO_MATCH\". + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + """ + self.__discriminator_value = "HasEntityResolutionMatch" # type: str + + self.object_type = self.__discriminator_value + super(HasEntityResolutionMatch, self).__init__(object_type=self.__discriminator_value, prompt=prompt) + + 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, HasEntityResolutionMatch): + 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/intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/intent.py new file mode 100644 index 0000000..7b2ccbd --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/intent.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.slot_definition import SlotDefinition + + +class Intent(object): + """ + The set of intents your service can accept and process. + + + :param name: Name to identify the intent. + :type name: (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. + :type samples: (optional) list[str] + + """ + deserialized_types = { + 'name': 'str', + 'slots': 'list[ask_smapi_model.v1.skill.interaction_model.slot_definition.SlotDefinition]', + 'samples': 'list[str]' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'slots': 'slots', + 'samples': 'samples' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, slots=None, samples=None): + # type: (Optional[str], Optional[List[SlotDefinition]], 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 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. + :type samples: (optional) list[str] + """ + self.__discriminator_value = None # type: str + + self.name = name + self.slots = slots + self.samples = samples + + 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, Intent): + 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/interaction_model_data.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_data.py new file mode 100644 index 0000000..568505c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_data.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.interaction_model_schema import InteractionModelSchema + + +class InteractionModelData(object): + """ + + :param version: + :type version: (optional) str + :param description: + :type description: (optional) str + :param interaction_model: + :type interaction_model: (optional) ask_smapi_model.v1.skill.interaction_model.interaction_model_schema.InteractionModelSchema + + """ + deserialized_types = { + 'version': 'str', + 'description': 'str', + 'interaction_model': 'ask_smapi_model.v1.skill.interaction_model.interaction_model_schema.InteractionModelSchema' + } # type: Dict + + attribute_map = { + 'version': 'version', + 'description': 'description', + 'interaction_model': 'interactionModel' + } # type: Dict + supports_multiple_types = False + + def __init__(self, version=None, description=None, interaction_model=None): + # type: (Optional[str], Optional[str], Optional[InteractionModelSchema]) -> None + """ + + :param version: + :type version: (optional) str + :param description: + :type description: (optional) str + :param interaction_model: + :type interaction_model: (optional) ask_smapi_model.v1.skill.interaction_model.interaction_model_schema.InteractionModelSchema + """ + self.__discriminator_value = None # type: str + + self.version = version + self.description = description + self.interaction_model = interaction_model + + 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, InteractionModelData): + 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/interaction_model_schema.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_schema.py new file mode 100644 index 0000000..86079f3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/interaction_model_schema.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.dialog import Dialog + from ask_smapi_model.v1.skill.interaction_model.language_model import LanguageModel + from ask_smapi_model.v1.skill.interaction_model.prompt import Prompt + + +class InteractionModelSchema(object): + """ + + :param language_model: + :type language_model: (optional) ask_smapi_model.v1.skill.interaction_model.language_model.LanguageModel + :param dialog: + :type dialog: (optional) ask_smapi_model.v1.skill.interaction_model.dialog.Dialog + :param prompts: List of prompts. + :type prompts: (optional) list[ask_smapi_model.v1.skill.interaction_model.prompt.Prompt] + + """ + deserialized_types = { + 'language_model': 'ask_smapi_model.v1.skill.interaction_model.language_model.LanguageModel', + 'dialog': 'ask_smapi_model.v1.skill.interaction_model.dialog.Dialog', + 'prompts': 'list[ask_smapi_model.v1.skill.interaction_model.prompt.Prompt]' + } # type: Dict + + attribute_map = { + 'language_model': 'languageModel', + 'dialog': 'dialog', + 'prompts': 'prompts' + } # type: Dict + supports_multiple_types = False + + def __init__(self, language_model=None, dialog=None, prompts=None): + # type: (Optional[LanguageModel], Optional[Dialog], Optional[List[Prompt]]) -> None + """ + + :param language_model: + :type language_model: (optional) ask_smapi_model.v1.skill.interaction_model.language_model.LanguageModel + :param dialog: + :type dialog: (optional) ask_smapi_model.v1.skill.interaction_model.dialog.Dialog + :param prompts: List of prompts. + :type prompts: (optional) list[ask_smapi_model.v1.skill.interaction_model.prompt.Prompt] + """ + self.__discriminator_value = None # type: str + + self.language_model = language_model + self.dialog = dialog + self.prompts = prompts + + 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, InteractionModelSchema): + 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/is_greater_than.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_greater_than.py new file mode 100644 index 0000000..374fd02 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_greater_than.py @@ -0,0 +1,119 @@ +# 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.slot_validation import SlotValidation + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class IsGreaterThan(SlotValidation): + """ + Validates that slot value is greater than the specified value. + + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param value: Value to compare to. + :type value: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'prompt': 'str', + 'value': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'prompt': 'prompt', + 'value': 'value' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prompt=None, value=None): + # type: (Optional[str], Optional[str]) -> None + """Validates that slot value is greater than the specified value. + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param value: Value to compare to. + :type value: (optional) str + """ + self.__discriminator_value = "IsGreaterThan" # type: str + + self.object_type = self.__discriminator_value + super(IsGreaterThan, self).__init__(object_type=self.__discriminator_value, prompt=prompt) + self.value = 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, IsGreaterThan): + 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/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 new file mode 100644 index 0000000..5419917 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_greater_than_or_equal_to.py @@ -0,0 +1,119 @@ +# 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.slot_validation import SlotValidation + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class IsGreaterThanOrEqualTo(SlotValidation): + """ + Validates that slot value is greater than or equals to the specified value. + + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param value: Value to compare to. + :type value: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'prompt': 'str', + 'value': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'prompt': 'prompt', + 'value': 'value' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prompt=None, value=None): + # type: (Optional[str], Optional[str]) -> None + """Validates that slot value is greater than or equals to the specified value. + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param value: Value to compare to. + :type value: (optional) str + """ + self.__discriminator_value = "IsGreaterThanOrEqualTo" # type: str + + self.object_type = self.__discriminator_value + super(IsGreaterThanOrEqualTo, self).__init__(object_type=self.__discriminator_value, prompt=prompt) + self.value = 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, IsGreaterThanOrEqualTo): + 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/is_in_duration.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_duration.py new file mode 100644 index 0000000..7c84490 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_duration.py @@ -0,0 +1,126 @@ +# 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.slot_validation import SlotValidation + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class IsInDuration(SlotValidation): + """ + Validates that the given date or time (as a slot value) is in a given interval. Unlike other range validations, duration based validations lets the developer define a dynamic range of date or time using ISO_8601 Duration Format. Based on the given 'start' and 'end' parameters an interval is created. The slot value given by the skill's user at runtime is then validated inside this interval. Both 'start' and 'end' parameters are in reference to the current date/time. Here the current date/time refers to the date/time when the skill's user made the request. + + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param start: * `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format. + :type start: (optional) str + :param end: * `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format. + :type end: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'prompt': 'str', + 'start': 'str', + 'end': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'prompt': 'prompt', + 'start': 'start', + 'end': 'end' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prompt=None, start=None, end=None): + # type: (Optional[str], Optional[str], Optional[str]) -> None + """Validates that the given date or time (as a slot value) is in a given interval. Unlike other range validations, duration based validations lets the developer define a dynamic range of date or time using ISO_8601 Duration Format. Based on the given 'start' and 'end' parameters an interval is created. The slot value given by the skill's user at runtime is then validated inside this interval. Both 'start' and 'end' parameters are in reference to the current date/time. Here the current date/time refers to the date/time when the skill's user made the request. + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param start: * `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format. + :type start: (optional) str + :param end: * `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format. + :type end: (optional) str + """ + self.__discriminator_value = "IsInDuration" # type: str + + self.object_type = self.__discriminator_value + super(IsInDuration, self).__init__(object_type=self.__discriminator_value, prompt=prompt) + self.start = start + self.end = end + + 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, IsInDuration): + 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/is_in_set.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_set.py new file mode 100644 index 0000000..926ce9c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_in_set.py @@ -0,0 +1,119 @@ +# 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.slot_validation import SlotValidation + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class IsInSet(SlotValidation): + """ + Validates if the slot is in the specified set of values. + + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param values: List of values to check. + :type values: (optional) list[str] + + """ + deserialized_types = { + 'object_type': 'str', + 'prompt': 'str', + 'values': 'list[str]' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'prompt': 'prompt', + 'values': 'values' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prompt=None, values=None): + # type: (Optional[str], Optional[List[object]]) -> None + """Validates if the slot is in the specified set of values. + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param values: List of values to check. + :type values: (optional) list[str] + """ + self.__discriminator_value = "IsInSet" # type: str + + self.object_type = self.__discriminator_value + super(IsInSet, self).__init__(object_type=self.__discriminator_value, prompt=prompt) + self.values = values + + 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, IsInSet): + 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/is_less_than.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_less_than.py new file mode 100644 index 0000000..e24fbd3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_less_than.py @@ -0,0 +1,119 @@ +# 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.slot_validation import SlotValidation + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class IsLessThan(SlotValidation): + """ + Validates that slot value is less than or equals to the specified value. + + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param value: Value to compare to. + :type value: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'prompt': 'str', + 'value': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'prompt': 'prompt', + 'value': 'value' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prompt=None, value=None): + # type: (Optional[str], Optional[str]) -> None + """Validates that slot value is less than or equals to the specified value. + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param value: Value to compare to. + :type value: (optional) str + """ + self.__discriminator_value = "IsLessThan" # type: str + + self.object_type = self.__discriminator_value + super(IsLessThan, self).__init__(object_type=self.__discriminator_value, prompt=prompt) + self.value = 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, IsLessThan): + 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/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 new file mode 100644 index 0000000..c98c644 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_less_than_or_equal_to.py @@ -0,0 +1,119 @@ +# 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.slot_validation import SlotValidation + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class IsLessThanOrEqualTo(SlotValidation): + """ + Validates that slot value is less than or equals to the specified value. + + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param value: Value to compare to. + :type value: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'prompt': 'str', + 'value': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'prompt': 'prompt', + 'value': 'value' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prompt=None, value=None): + # type: (Optional[str], Optional[str]) -> None + """Validates that slot value is less than or equals to the specified value. + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param value: Value to compare to. + :type value: (optional) str + """ + self.__discriminator_value = "IsLessThanOrEqualTo" # type: str + + self.object_type = self.__discriminator_value + super(IsLessThanOrEqualTo, self).__init__(object_type=self.__discriminator_value, prompt=prompt) + self.value = 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, IsLessThanOrEqualTo): + 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/is_not_in_duration.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_duration.py new file mode 100644 index 0000000..0b2e2ad --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_duration.py @@ -0,0 +1,126 @@ +# 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.slot_validation import SlotValidation + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class IsNotInDuration(SlotValidation): + """ + Validates that the given date or time (as a slot value) is not in a given interval. Unlike other range validations, duration based validations lets the developer define a dynamic range of date or time using ISO_8601 Duration Format. Based on the given 'start' and 'end' parameters an interval is created. The slot value given by the skill's user at runtime is then validated inside this interval. Both 'start' and 'end' parameters are in reference to the current date/time. Here the current date/time refers to the date/time when the skill's user made the request. + + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param start: * `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format. + :type start: (optional) str + :param end: * `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format. + :type end: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'prompt': 'str', + 'start': 'str', + 'end': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'prompt': 'prompt', + 'start': 'start', + 'end': 'end' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prompt=None, start=None, end=None): + # type: (Optional[str], Optional[str], Optional[str]) -> None + """Validates that the given date or time (as a slot value) is not in a given interval. Unlike other range validations, duration based validations lets the developer define a dynamic range of date or time using ISO_8601 Duration Format. Based on the given 'start' and 'end' parameters an interval is created. The slot value given by the skill's user at runtime is then validated inside this interval. Both 'start' and 'end' parameters are in reference to the current date/time. Here the current date/time refers to the date/time when the skill's user made the request. + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param start: * `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format. + :type start: (optional) str + :param end: * `AMAZON.DATE`: ISO 8601 Duration using Y, M or D components or ISO 8601 Calendar Date in YYYY-MM-DD format. * `AMAZON.TIME`: ISO 8601 Duration using H or M component or ISO 8601 24-Hour Clock Time in hh:mm format. + :type end: (optional) str + """ + self.__discriminator_value = "IsNotInDuration" # type: str + + self.object_type = self.__discriminator_value + super(IsNotInDuration, self).__init__(object_type=self.__discriminator_value, prompt=prompt) + self.start = start + self.end = end + + 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, IsNotInDuration): + 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/is_not_in_set.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_set.py new file mode 100644 index 0000000..7a7865c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/is_not_in_set.py @@ -0,0 +1,119 @@ +# 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.slot_validation import SlotValidation + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class IsNotInSet(SlotValidation): + """ + Validates if the slot is not in the specified set of values. + + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param values: List of values to check. + :type values: (optional) list[str] + + """ + deserialized_types = { + 'object_type': 'str', + 'prompt': 'str', + 'values': 'list[str]' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'prompt': 'prompt', + 'values': 'values' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prompt=None, values=None): + # type: (Optional[str], Optional[List[object]]) -> None + """Validates if the slot is not in the specified set of values. + + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + :param values: List of values to check. + :type values: (optional) list[str] + """ + self.__discriminator_value = "IsNotInSet" # type: str + + self.object_type = self.__discriminator_value + super(IsNotInSet, self).__init__(object_type=self.__discriminator_value, prompt=prompt) + self.values = values + + 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, IsNotInSet): + 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 new file mode 100644 index 0000000..a865027 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/language_model.py @@ -0,0 +1,124 @@ +# 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.interaction_model.slot_type import SlotType + from ask_smapi_model.v1.skill.interaction_model.intent import Intent + + +class LanguageModel(object): + """ + Define the language model. + + + :param invocation_name: Invocation name of the skill. + :type invocation_name: (optional) str + :param types: + :type types: (optional) list[ask_smapi_model.v1.skill.interaction_model.slot_type.SlotType] + :param intents: + :type intents: (optional) list[ask_smapi_model.v1.skill.interaction_model.intent.Intent] + + """ + deserialized_types = { + 'invocation_name': 'str', + 'types': 'list[ask_smapi_model.v1.skill.interaction_model.slot_type.SlotType]', + 'intents': 'list[ask_smapi_model.v1.skill.interaction_model.intent.Intent]' + } # type: Dict + + attribute_map = { + 'invocation_name': 'invocationName', + 'types': 'types', + 'intents': 'intents' + } # type: Dict + supports_multiple_types = False + + def __init__(self, invocation_name=None, types=None, intents=None): + # type: (Optional[str], Optional[List[SlotType]], Optional[List[Intent]]) -> None + """Define the language model. + + :param invocation_name: Invocation name of the skill. + :type invocation_name: (optional) str + :param types: + :type types: (optional) list[ask_smapi_model.v1.skill.interaction_model.slot_type.SlotType] + :param intents: + :type intents: (optional) list[ask_smapi_model.v1.skill.interaction_model.intent.Intent] + """ + self.__discriminator_value = None # type: str + + self.invocation_name = invocation_name + self.types = types + self.intents = 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, LanguageModel): + 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/prompt.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt.py new file mode 100644 index 0000000..42e2dfc --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.prompt_items import PromptItems + + +class Prompt(object): + """ + + :param id: The prompt id, this id can be used from dialog definitions. + :type id: (optional) str + :param variations: List of variations of the prompt, each variation can be either a text string or a well defined ssml string depending on the type defined. + :type variations: (optional) list[ask_smapi_model.v1.skill.interaction_model.prompt_items.PromptItems] + + """ + deserialized_types = { + 'id': 'str', + 'variations': 'list[ask_smapi_model.v1.skill.interaction_model.prompt_items.PromptItems]' + } # type: Dict + + attribute_map = { + 'id': 'id', + 'variations': 'variations' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None, variations=None): + # type: (Optional[str], Optional[List[PromptItems]]) -> None + """ + + :param id: The prompt id, this id can be used from dialog definitions. + :type id: (optional) str + :param variations: List of variations of the prompt, each variation can be either a text string or a well defined ssml string depending on the type defined. + :type variations: (optional) list[ask_smapi_model.v1.skill.interaction_model.prompt_items.PromptItems] + """ + self.__discriminator_value = None # type: str + + self.id = id + self.variations = variations + + 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, Prompt): + 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/prompt_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items.py new file mode 100644 index 0000000..538b194 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.prompt_items_type import PromptItemsType + + +class PromptItems(object): + """ + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.interaction_model.prompt_items_type.PromptItemsType + :param value: Specifies the prompt. + :type value: (optional) str + + """ + deserialized_types = { + 'object_type': 'ask_smapi_model.v1.skill.interaction_model.prompt_items_type.PromptItemsType', + 'value': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'value': 'value' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, value=None): + # type: (Optional[PromptItemsType], Optional[str]) -> None + """ + + :param object_type: + :type object_type: (optional) ask_smapi_model.v1.skill.interaction_model.prompt_items_type.PromptItemsType + :param value: Specifies the prompt. + :type value: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.value = 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, PromptItems): + 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/prompt_items_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items_type.py new file mode 100644 index 0000000..96ef714 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/prompt_items_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 + from datetime import datetime + + +class PromptItemsType(Enum): + """ + Prompt can be specified in different formats e.g. text, ssml. + + + + Allowed enum values: [SSML, PlainText] + """ + SSML = "SSML" + PlainText = "PlainText" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, PromptItemsType): + 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/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..f15dfcf --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_definition.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 + from datetime import datetime + + +class SlotDefinition(object): + """ + Slot definition. + + + :param name: The name of the slot. + :type name: (optional) str + :param object_type: The type of the slot. It can be a built-in or custom type. + :type object_type: (optional) str + :param samples: Phrases the user can speak e.g. to trigger an intent or provide value for a slot elicitation. + :type samples: (optional) list[str] + + """ + deserialized_types = { + 'name': 'str', + 'object_type': 'str', + 'samples': 'list[str]' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'object_type': 'type', + 'samples': 'samples' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, object_type=None, samples=None): + # type: (Optional[str], Optional[str], Optional[List[object]]) -> None + """Slot definition. + + :param name: The name of the slot. + :type name: (optional) str + :param object_type: The type of the slot. It can be a built-in or custom type. + :type object_type: (optional) str + :param samples: Phrases the user can speak e.g. to trigger an intent or provide value for a slot elicitation. + :type samples: (optional) list[str] + """ + self.__discriminator_value = None # type: str + + self.name = name + self.object_type = object_type + self.samples = samples + + 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, SlotDefinition): + 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/slot_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_type.py new file mode 100644 index 0000000..c29ce89 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_type.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.value_supplier import ValueSupplier + + +class SlotType(object): + """ + 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 values: List of expected values. Values outside the list are still returned. + :type values: (optional) list[str] + :param value_supplier: + :type value_supplier: (optional) ask_smapi_model.v1.skill.interaction_model.value_supplier.ValueSupplier + + """ + deserialized_types = { + 'name': 'str', + 'values': 'list[str]', + 'value_supplier': 'ask_smapi_model.v1.skill.interaction_model.value_supplier.ValueSupplier' + } # type: Dict + + attribute_map = { + 'name': 'name', + '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[object]], Optional[ValueSupplier]) -> 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 values: List of expected values. Values outside the list are still returned. + :type values: (optional) list[str] + :param value_supplier: + :type value_supplier: (optional) ask_smapi_model.v1.skill.interaction_model.value_supplier.ValueSupplier + """ + self.__discriminator_value = None # type: str + + self.name = name + self.values = values + self.value_supplier = value_supplier + + 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, SlotType): + 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/slot_validation.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_validation.py new file mode 100644 index 0000000..e43e1cc --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/slot_validation.py @@ -0,0 +1,163 @@ +# 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 + from datetime import datetime + + +class SlotValidation(object): + """ + Validation on a slot with support for prompt and confirmation. + + + :param object_type: The exact type of validation e.g. IsLessThan,IsGreaterThan etc. + :type object_type: (optional) str + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (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. + + | HasEntityResolutionMatch: :py:class:`ask_smapi_model.v1.skill.interaction_model.has_entity_resolution_match.HasEntityResolutionMatch`, + | + | IsLessThanOrEqualTo: :py:class:`ask_smapi_model.v1.skill.interaction_model.is_less_than_or_equal_to.IsLessThanOrEqualTo`, + | + | IsInDuration: :py:class:`ask_smapi_model.v1.skill.interaction_model.is_in_duration.IsInDuration`, + | + | IsLessThan: :py:class:`ask_smapi_model.v1.skill.interaction_model.is_less_than.IsLessThan`, + | + | IsGreaterThan: :py:class:`ask_smapi_model.v1.skill.interaction_model.is_greater_than.IsGreaterThan`, + | + | IsNotInSet: :py:class:`ask_smapi_model.v1.skill.interaction_model.is_not_in_set.IsNotInSet`, + | + | IsNotInDuration: :py:class:`ask_smapi_model.v1.skill.interaction_model.is_not_in_duration.IsNotInDuration`, + | + | IsGreaterThanOrEqualTo: :py:class:`ask_smapi_model.v1.skill.interaction_model.is_greater_than_or_equal_to.IsGreaterThanOrEqualTo`, + | + | IsInSet: :py:class:`ask_smapi_model.v1.skill.interaction_model.is_in_set.IsInSet` + + """ + deserialized_types = { + 'object_type': 'str', + 'prompt': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'prompt': 'prompt' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'HasEntityResolutionMatch': 'ask_smapi_model.v1.skill.interaction_model.has_entity_resolution_match.HasEntityResolutionMatch', + 'IsLessThanOrEqualTo': 'ask_smapi_model.v1.skill.interaction_model.is_less_than_or_equal_to.IsLessThanOrEqualTo', + 'IsInDuration': 'ask_smapi_model.v1.skill.interaction_model.is_in_duration.IsInDuration', + 'IsLessThan': 'ask_smapi_model.v1.skill.interaction_model.is_less_than.IsLessThan', + 'IsGreaterThan': 'ask_smapi_model.v1.skill.interaction_model.is_greater_than.IsGreaterThan', + 'IsNotInSet': 'ask_smapi_model.v1.skill.interaction_model.is_not_in_set.IsNotInSet', + 'IsNotInDuration': 'ask_smapi_model.v1.skill.interaction_model.is_not_in_duration.IsNotInDuration', + 'IsGreaterThanOrEqualTo': 'ask_smapi_model.v1.skill.interaction_model.is_greater_than_or_equal_to.IsGreaterThanOrEqualTo', + 'IsInSet': 'ask_smapi_model.v1.skill.interaction_model.is_in_set.IsInSet' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None, prompt=None): + # type: (Optional[str], Optional[str]) -> None + """Validation on a slot with support for prompt and confirmation. + + :param object_type: The exact type of validation e.g. IsLessThan,IsGreaterThan etc. + :type object_type: (optional) str + :param prompt: The prompt id that should be used if validation fails. + :type prompt: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.prompt = prompt + + @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, SlotValidation): + 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/value_catalog.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_catalog.py new file mode 100644 index 0000000..f7f6174 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_catalog.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 + from datetime import datetime + + +class ValueCatalog(object): + """ + Catalog reference to provide values. + + + :param id: CatalogId + :type id: (optional) str + :param version: Catalog version + :type version: (optional) str + + """ + deserialized_types = { + 'id': 'str', + 'version': 'str' + } # type: Dict + + attribute_map = { + 'id': 'id', + 'version': 'version' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None, version=None): + # type: (Optional[str], Optional[str]) -> None + """Catalog reference to provide values. + + :param id: CatalogId + :type id: (optional) str + :param version: Catalog version + :type version: (optional) str + """ + self.__discriminator_value = None # type: str + + self.id = 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, ValueCatalog): + 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/value_supplier.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_supplier.py new file mode 100644 index 0000000..3b91aec --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/value_supplier.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 + from datetime import datetime + + +class ValueSupplier(object): + """ + Supplier object to provide slot values. + + + :param object_type: The exact type of validation e.g.CatalogValueSupplier etc. + :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. + + | CatalogValueSupplier: :py:class:`ask_smapi_model.v1.skill.interaction_model.catalog_value_supplier.CatalogValueSupplier` + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + discriminator_value_class_map = { + 'CatalogValueSupplier': 'ask_smapi_model.v1.skill.interaction_model.catalog_value_supplier.CatalogValueSupplier' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None): + # type: (Optional[str]) -> None + """Supplier object to provide slot values. + + :param object_type: The exact type of validation e.g.CatalogValueSupplier etc. + :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, ValueSupplier): + 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/version/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/__init__.py new file mode 100644 index 0000000..d666a81 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/__init__.py @@ -0,0 +1,26 @@ +# 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 .version_data import VersionData +from .list_response import ListResponse +from .catalog_update import CatalogUpdate +from .catalog_version_data import CatalogVersionData +from .value_schema_name import ValueSchemaName +from .links import Links +from .catalog_values import CatalogValues +from .version_items import VersionItems +from .value_schema import ValueSchema +from .input_source import InputSource 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 new file mode 100644 index 0000000..4b093f1 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_update.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 + from datetime import datetime + + +class CatalogUpdate(object): + """ + Catalog update description object. + + + :param description: The catalog description with a 255 character maximum. + :type description: (optional) str + + """ + deserialized_types = { + 'description': 'str' + } # type: Dict + + attribute_map = { + 'description': 'description' + } # type: Dict + supports_multiple_types = False + + def __init__(self, description=None): + # type: (Optional[str]) -> None + """Catalog update description object. + + :param description: The catalog description with a 255 character maximum. + :type description: (optional) str + """ + self.__discriminator_value = None # type: str + + self.description = 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, CatalogUpdate): + 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/version/catalog_values.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_values.py new file mode 100644 index 0000000..ff84a44 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_values.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.links import Links + from ask_smapi_model.v1.skill.interaction_model.version.value_schema import ValueSchema + + +class CatalogValues(object): + """ + List of catalog values. + + + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + :param total_count: Total number of catalog values. + :type total_count: (optional) int + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param values: + :type values: (optional) list[ask_smapi_model.v1.skill.interaction_model.version.value_schema.ValueSchema] + + """ + deserialized_types = { + 'is_truncated': 'bool', + 'next_token': 'str', + 'total_count': 'int', + 'links': 'ask_smapi_model.v1.links.Links', + 'values': 'list[ask_smapi_model.v1.skill.interaction_model.version.value_schema.ValueSchema]' + } # type: Dict + + attribute_map = { + 'is_truncated': 'isTruncated', + 'next_token': 'nextToken', + 'total_count': 'totalCount', + 'links': '_links', + 'values': 'values' + } # type: Dict + 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[Links], Optional[List[ValueSchema]]) -> None + """List of catalog values. + + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + :param total_count: Total number of catalog values. + :type total_count: (optional) int + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param values: + :type values: (optional) list[ask_smapi_model.v1.skill.interaction_model.version.value_schema.ValueSchema] + """ + self.__discriminator_value = None # type: str + + self.is_truncated = is_truncated + self.next_token = next_token + self.total_count = total_count + self.links = links + self.values = values + + 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, CatalogValues): + 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/version/catalog_version_data.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_version_data.py new file mode 100644 index 0000000..7027f1c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/catalog_version_data.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.version.input_source import InputSource + + +class CatalogVersionData(object): + """ + Catalog version data with metadata. + + + :param source: + :type source: (optional) ask_smapi_model.v1.skill.interaction_model.version.input_source.InputSource + :param description: Description string for specific catalog version. + :type description: (optional) str + :param version: Specific catalog version. + :type version: (optional) str + + """ + deserialized_types = { + 'source': 'ask_smapi_model.v1.skill.interaction_model.version.input_source.InputSource', + 'description': 'str', + 'version': 'str' + } # type: Dict + + attribute_map = { + 'source': 'source', + 'description': 'description', + 'version': 'version' + } # type: Dict + supports_multiple_types = False + + def __init__(self, source=None, description=None, version=None): + # type: (Optional[InputSource], Optional[str], Optional[str]) -> None + """Catalog version data with metadata. + + :param source: + :type source: (optional) ask_smapi_model.v1.skill.interaction_model.version.input_source.InputSource + :param description: Description string for specific catalog version. + :type description: (optional) str + :param version: Specific catalog version. + :type version: (optional) str + """ + self.__discriminator_value = None # type: str + + self.source = source + self.description = description + 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, CatalogVersionData): + 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/version/input_source.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/input_source.py new file mode 100644 index 0000000..811a98d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/input_source.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 + from datetime import datetime + + +class InputSource(object): + """ + Definition for catalog version input data. + + + :param object_type: Type of catalog. + :type object_type: (optional) str + :param url: Url to the catalog reference. + :type url: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'url': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'url': 'url' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, url=None): + # type: (Optional[str], Optional[str]) -> None + """Definition for catalog version input data. + + :param object_type: Type of catalog. + :type object_type: (optional) str + :param url: Url to the catalog reference. + :type url: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + self.url = url + + 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, InputSource): + 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/version/links.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/links.py new file mode 100644 index 0000000..d950083 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/links.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 + from datetime import datetime + from ask_smapi_model.v1.link import Link + + +class Links(object): + """ + + :param object_self: + :type object_self: (optional) ask_smapi_model.v1.link.Link + + """ + deserialized_types = { + 'object_self': 'ask_smapi_model.v1.link.Link' + } # type: Dict + + attribute_map = { + 'object_self': 'self' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_self=None): + # type: (Optional[Link]) -> None + """ + + :param object_self: + :type object_self: (optional) ask_smapi_model.v1.link.Link + """ + self.__discriminator_value = None # type: str + + self.object_self = object_self + + 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, Links): + 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/version/list_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/list_response.py new file mode 100644 index 0000000..bf49f5a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/list_response.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 + from datetime import datetime + from ask_smapi_model.v1.links import Links + from ask_smapi_model.v1.skill.interaction_model.version.version_items import VersionItems + + +class ListResponse(object): + """ + List of interactionModel versions of a skill for the vendor + + + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param skill_model_versions: List of interaction model versions. + :type skill_model_versions: (optional) list[ask_smapi_model.v1.skill.interaction_model.version.version_items.VersionItems] + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + + """ + deserialized_types = { + 'links': 'ask_smapi_model.v1.links.Links', + 'skill_model_versions': 'list[ask_smapi_model.v1.skill.interaction_model.version.version_items.VersionItems]', + 'is_truncated': 'bool', + 'next_token': 'str' + } # type: Dict + + attribute_map = { + 'links': '_links', + 'skill_model_versions': 'skillModelVersions', + 'is_truncated': 'isTruncated', + 'next_token': 'nextToken' + } # type: Dict + supports_multiple_types = False + + def __init__(self, links=None, skill_model_versions=None, is_truncated=None, next_token=None): + # type: (Optional[Links], Optional[List[VersionItems]], Optional[bool], Optional[str]) -> None + """List of interactionModel versions of a skill for the vendor + + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param skill_model_versions: List of interaction model versions. + :type skill_model_versions: (optional) list[ask_smapi_model.v1.skill.interaction_model.version.version_items.VersionItems] + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + """ + self.__discriminator_value = None # type: str + + self.links = links + self.skill_model_versions = skill_model_versions + self.is_truncated = is_truncated + 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, ListResponse): + 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/version/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..2bae12e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/value_schema.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.version.value_schema_name import ValueSchemaName + + +class ValueSchema(object): + """ + The value schema in type object of interaction model. + + + :param id: + :type id: (optional) str + :param name: + :type name: (optional) ask_smapi_model.v1.skill.interaction_model.version.value_schema_name.ValueSchemaName + + """ + deserialized_types = { + 'id': 'str', + 'name': 'ask_smapi_model.v1.skill.interaction_model.version.value_schema_name.ValueSchemaName' + } # type: Dict + + attribute_map = { + 'id': 'id', + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None, name=None): + # type: (Optional[str], Optional[ValueSchemaName]) -> None + """The value schema in type object of interaction model. + + :param id: + :type id: (optional) str + :param name: + :type name: (optional) ask_smapi_model.v1.skill.interaction_model.version.value_schema_name.ValueSchemaName + """ + self.__discriminator_value = None # type: str + + self.id = id + 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, ValueSchema): + 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/version/value_schema_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/value_schema_name.py new file mode 100644 index 0000000..dfdabe0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/value_schema_name.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 + from datetime import datetime + + +class ValueSchemaName(object): + """ + + :param value: + :type value: (optional) str + :param synonyms: + :type synonyms: (optional) list[str] + + """ + deserialized_types = { + 'value': 'str', + 'synonyms': 'list[str]' + } # type: Dict + + attribute_map = { + 'value': 'value', + 'synonyms': 'synonyms' + } # type: Dict + supports_multiple_types = False + + def __init__(self, value=None, synonyms=None): + # type: (Optional[str], Optional[List[object]]) -> None + """ + + :param value: + :type value: (optional) str + :param synonyms: + :type synonyms: (optional) list[str] + """ + self.__discriminator_value = None # type: str + + self.value = value + self.synonyms = synonyms + + 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, ValueSchemaName): + 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/version/version_data.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_data.py new file mode 100644 index 0000000..5c475cb --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_data.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.version.input_source import InputSource + + +class VersionData(object): + """ + Catalog version specific data. + + + :param source: + :type source: (optional) ask_smapi_model.v1.skill.interaction_model.version.input_source.InputSource + :param description: Description string for specific catalog version. + :type description: (optional) str + + """ + deserialized_types = { + 'source': 'ask_smapi_model.v1.skill.interaction_model.version.input_source.InputSource', + 'description': 'str' + } # type: Dict + + attribute_map = { + 'source': 'source', + 'description': 'description' + } # type: Dict + supports_multiple_types = False + + def __init__(self, source=None, description=None): + # type: (Optional[InputSource], Optional[str]) -> None + """Catalog version specific data. + + :param source: + :type source: (optional) ask_smapi_model.v1.skill.interaction_model.version.input_source.InputSource + :param description: Description string for specific catalog version. + :type description: (optional) str + """ + self.__discriminator_value = None # type: str + + self.source = source + self.description = 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, VersionData): + 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/version/version_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_items.py new file mode 100644 index 0000000..916a89d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interaction_model/version/version_items.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interaction_model.version.links import Links + + +class VersionItems(object): + """ + Version metadata about the entity. + + + :param version: + :type version: (optional) str + :param creation_time: + :type creation_time: (optional) str + :param description: + :type description: (optional) str + :param links: + :type links: (optional) ask_smapi_model.v1.skill.interaction_model.version.links.Links + + """ + deserialized_types = { + 'version': 'str', + 'creation_time': 'str', + 'description': 'str', + 'links': 'ask_smapi_model.v1.skill.interaction_model.version.links.Links' + } # type: Dict + + attribute_map = { + 'version': 'version', + 'creation_time': 'creationTime', + 'description': 'description', + 'links': '_links' + } # type: Dict + supports_multiple_types = False + + def __init__(self, version=None, creation_time=None, description=None, links=None): + # type: (Optional[str], Optional[str], Optional[str], Optional[Links]) -> None + """Version metadata about the entity. + + :param version: + :type version: (optional) str + :param creation_time: + :type creation_time: (optional) str + :param description: + :type description: (optional) str + :param links: + :type links: (optional) ask_smapi_model.v1.skill.interaction_model.version.links.Links + """ + self.__discriminator_value = None # type: str + + self.version = version + self.creation_time = creation_time + self.description = description + self.links = links + + 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, VersionItems): + 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/interface_definition.py b/ask-smapi-model/ask_smapi_model/v1/skill/interface_definition.py new file mode 100644 index 0000000..150c099 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interface_definition.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 + from datetime import datetime + from ask_smapi_model.v1.skill.interface_intent import InterfaceIntent + + +class InterfaceDefinition(object): + """ + Interface related objects. + + + :param is_global: Whether this interface is available in all supported locales. + :type is_global: (optional) bool + :param locales: The locales of the interface. + :type locales: (optional) list[str] + :param intents: The intents in the interface. + :type intents: (optional) list[ask_smapi_model.v1.skill.interface_intent.InterfaceIntent] + + """ + deserialized_types = { + 'is_global': 'bool', + 'locales': 'list[str]', + 'intents': 'list[ask_smapi_model.v1.skill.interface_intent.InterfaceIntent]' + } # type: Dict + + attribute_map = { + 'is_global': 'isGlobal', + 'locales': 'locales', + 'intents': 'intents' + } # type: Dict + supports_multiple_types = False + + def __init__(self, is_global=None, locales=None, intents=None): + # type: (Optional[bool], Optional[List[object]], Optional[List[InterfaceIntent]]) -> None + """Interface related objects. + + :param is_global: Whether this interface is available in all supported locales. + :type is_global: (optional) bool + :param locales: The locales of the interface. + :type locales: (optional) list[str] + :param intents: The intents in the interface. + :type intents: (optional) list[ask_smapi_model.v1.skill.interface_intent.InterfaceIntent] + """ + self.__discriminator_value = None # type: str + + self.is_global = is_global + self.locales = locales + self.intents = 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, InterfaceDefinition): + 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/interface_intent.py b/ask-smapi-model/ask_smapi_model/v1/skill/interface_intent.py new file mode 100644 index 0000000..40c13cd --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/interface_intent.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class InterfaceIntent(object): + """ + + :param is_extensible: Whether the intent is extensible. + :type is_extensible: (optional) bool + :param name: Name of the intent. + :type name: (optional) str + :param is_required: Whether the intent is required in the interface. + :type is_required: (optional) bool + + """ + deserialized_types = { + 'is_extensible': 'bool', + 'name': 'str', + 'is_required': 'bool' + } # type: Dict + + attribute_map = { + 'is_extensible': 'isExtensible', + 'name': 'name', + 'is_required': 'isRequired' + } # type: Dict + supports_multiple_types = False + + def __init__(self, is_extensible=None, name=None, is_required=None): + # type: (Optional[bool], Optional[str], Optional[bool]) -> None + """ + + :param is_extensible: Whether the intent is extensible. + :type is_extensible: (optional) bool + :param name: Name of the intent. + :type name: (optional) str + :param is_required: Whether the intent is required in the interface. + :type is_required: (optional) bool + """ + self.__discriminator_value = None # type: str + + self.is_extensible = is_extensible + self.name = name + self.is_required = is_required + + 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, InterfaceIntent): + 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/last_update_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/last_update_request.py new file mode 100644 index 0000000..7bc113b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/last_update_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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.build_details import BuildDetails + from ask_smapi_model.v1.skill.status import Status + from ask_smapi_model.v1.skill.standardized_error import StandardizedError + + +class LastUpdateRequest(object): + """ + Contains attributes related to last modification (create/update) request of a resource. + + + :param status: + :type status: (optional) ask_smapi_model.v1.skill.status.Status + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param warnings: + :type warnings: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param build_details: + :type build_details: (optional) ask_smapi_model.v1.skill.build_details.BuildDetails + + """ + deserialized_types = { + 'status': 'ask_smapi_model.v1.skill.status.Status', + 'errors': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]', + 'warnings': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]', + 'build_details': 'ask_smapi_model.v1.skill.build_details.BuildDetails' + } # type: Dict + + attribute_map = { + 'status': 'status', + 'errors': 'errors', + 'warnings': 'warnings', + 'build_details': 'buildDetails' + } # type: Dict + supports_multiple_types = False + + def __init__(self, status=None, errors=None, warnings=None, build_details=None): + # type: (Optional[Status], Optional[List[StandardizedError]], Optional[List[StandardizedError]], Optional[BuildDetails]) -> None + """Contains attributes related to last modification (create/update) request of a resource. + + :param status: + :type status: (optional) ask_smapi_model.v1.skill.status.Status + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param warnings: + :type warnings: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param build_details: + :type build_details: (optional) ask_smapi_model.v1.skill.build_details.BuildDetails + """ + self.__discriminator_value = None # type: str + + self.status = status + self.errors = errors + self.warnings = warnings + self.build_details = build_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, LastUpdateRequest): + 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/list_skill_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/list_skill_response.py new file mode 100644 index 0000000..063e44b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/list_skill_response.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 + from datetime import datetime + from ask_smapi_model.v1.links import Links + from ask_smapi_model.v1.skill.skill_summary import SkillSummary + + +class ListSkillResponse(object): + """ + List of skills for the vendor. + + + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param skills: List of skill summaries. List might contain either one, two or three entries for a given skillId depending on the skill's publication history and the publication method. `Skill containing certified stage` * If a skill was never published to live, this list will contain two entries `:` one with stage 'development' and another with stage 'certified'. Both of these summaries will have same skillId. * For any skill that has been published to 'live', this list will contain three entries `:` one with stage 'development', one with stage `certified` and one with stage 'live'. All of these summaries will have same skillId. `Skill without certified stage` * If a skill was never published to live, this list will contain only one entry for the skill with stage as 'development'. * For any skill that has been published to 'live', this list will contain two entries `:` one with stage 'development' and another with stage 'live'. Both of these summaries will have same skillId. + :type skills: (optional) list[ask_smapi_model.v1.skill.skill_summary.SkillSummary] + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + + """ + deserialized_types = { + 'links': 'ask_smapi_model.v1.links.Links', + 'skills': 'list[ask_smapi_model.v1.skill.skill_summary.SkillSummary]', + 'is_truncated': 'bool', + 'next_token': 'str' + } # type: Dict + + attribute_map = { + 'links': '_links', + 'skills': 'skills', + 'is_truncated': 'isTruncated', + 'next_token': 'nextToken' + } # type: Dict + supports_multiple_types = False + + def __init__(self, links=None, skills=None, is_truncated=None, next_token=None): + # type: (Optional[Links], Optional[List[SkillSummary]], Optional[bool], Optional[str]) -> None + """List of skills for the vendor. + + :param links: + :type links: (optional) ask_smapi_model.v1.links.Links + :param skills: List of skill summaries. List might contain either one, two or three entries for a given skillId depending on the skill's publication history and the publication method. `Skill containing certified stage` * If a skill was never published to live, this list will contain two entries `:` one with stage 'development' and another with stage 'certified'. Both of these summaries will have same skillId. * For any skill that has been published to 'live', this list will contain three entries `:` one with stage 'development', one with stage `certified` and one with stage 'live'. All of these summaries will have same skillId. `Skill without certified stage` * If a skill was never published to live, this list will contain only one entry for the skill with stage as 'development'. * For any skill that has been published to 'live', this list will contain two entries `:` one with stage 'development' and another with stage 'live'. Both of these summaries will have same skillId. + :type skills: (optional) list[ask_smapi_model.v1.skill.skill_summary.SkillSummary] + :param is_truncated: + :type is_truncated: (optional) bool + :param next_token: + :type next_token: (optional) str + """ + self.__discriminator_value = None # type: str + + self.links = links + self.skills = skills + self.is_truncated = is_truncated + 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, ListSkillResponse): + 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/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/__init__.py new file mode 100644 index 0000000..a028b1c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/__init__.py @@ -0,0 +1,94 @@ +# 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 .house_hold_list import HouseHoldList +from .localized_health_info import LocalizedHealthInfo +from .viewport_shape import ViewportShape +from .display_interface import DisplayInterface +from .skill_manifest_publishing_information import SkillManifestPublishingInformation +from .flash_briefing_content_type import FlashBriefingContentType +from .viewport_specification import ViewportSpecification +from .skill_manifest_privacy_and_compliance import SkillManifestPrivacyAndCompliance +from .music_interfaces import MusicInterfaces +from .health_request import HealthRequest +from .skill_manifest_envelope import SkillManifestEnvelope +from .video_country_info import VideoCountryInfo +from .health_apis import HealthApis +from .custom_interface import CustomInterface +from .version import Version +from .distribution_mode import DistributionMode +from .viewport_mode import ViewportMode +from .music_apis import MusicApis +from .alexa_for_business_interface import AlexaForBusinessInterface +from .gadget_support import GadgetSupport +from .flash_briefing_update_frequency import FlashBriefingUpdateFrequency +from .permission_name import PermissionName +from .smart_home_protocol import SmartHomeProtocol +from .music_content_name import MusicContentName +from .skill_manifest_apis import SkillManifestApis +from .audio_interface import AudioInterface +from .region import Region +from .skill_manifest_endpoint import SkillManifestEndpoint +from .custom_connections import CustomConnections +from .interface import Interface +from .connections import Connections +from .request import Request +from .alexa_for_business_apis import AlexaForBusinessApis +from .skill_manifest_localized_publishing_information import SkillManifestLocalizedPublishingInformation +from .event_publications import EventPublications +from .skill_manifest_localized_privacy_and_compliance import SkillManifestLocalizedPrivacyAndCompliance +from .localized_music_info import LocalizedMusicInfo +from .alexa_presentation_apl_interface import AlexaPresentationAplInterface +from .flash_briefing_genre import FlashBriefingGenre +from .video_apis_locale import VideoApisLocale +from .ssl_certificate_type import SSLCertificateType +from .music_request import MusicRequest +from .video_catalog_info import VideoCatalogInfo +from .custom_apis import CustomApis +from .lambda_endpoint import LambdaEndpoint +from .music_feature import MusicFeature +from .skill_manifest_custom_task import SkillManifestCustomTask +from .localized_flash_briefing_info_items import LocalizedFlashBriefingInfoItems +from .music_alias import MusicAlias +from .game_engine_interface import GameEngineInterface +from .up_channel_items import UpChannelItems +from .health_alias import HealthAlias +from .health_interface import HealthInterface +from .permission_items import PermissionItems +from .manifest_gadget_support import ManifestGadgetSupport +from .skill_manifest import SkillManifest +from .localized_flash_briefing_info import LocalizedFlashBriefingInfo +from .music_capability import MusicCapability +from .music_wordmark import MusicWordmark +from .request_name import RequestName +from .event_name_type import EventNameType +from .smart_home_apis import SmartHomeApis +from .flash_briefing_apis import FlashBriefingApis +from .video_region import VideoRegion +from .gadget_controller_interface import GadgetControllerInterface +from .distribution_countries import DistributionCountries +from .display_interface_apml_version import DisplayInterfaceApmlVersion +from .health_protocol_version import HealthProtocolVersion +from .lambda_region import LambdaRegion +from .skill_manifest_events import SkillManifestEvents +from .event_name import EventName +from .music_content_type import MusicContentType +from .connections_payload import ConnectionsPayload +from .data_protection_provider import DataProtectionProvider +from .video_app_interface import VideoAppInterface +from .video_apis import VideoApis +from .display_interface_template_version import DisplayInterfaceTemplateVersion +from .critical_data_handling import CriticalDataHandling 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 new file mode 100644 index 0000000..08673e3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_apis.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.alexa_for_business_interface import AlexaForBusinessInterface + from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpoint + from ask_smapi_model.v1.skill.manifest.region import Region + + +class AlexaForBusinessApis(object): + """ + Defines the structure of alexaForBusiness api in the skill manifest. + + + :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: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint + :param interfaces: Contains the list of supported interfaces. + :type interfaces: (optional) list[ask_smapi_model.v1.skill.manifest.alexa_for_business_interface.AlexaForBusinessInterface] + + """ + deserialized_types = { + '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.alexa_for_business_interface.AlexaForBusinessInterface]' + } # type: Dict + + attribute_map = { + 'regions': 'regions', + 'endpoint': 'endpoint', + 'interfaces': 'interfaces' + } # type: Dict + supports_multiple_types = False + + def __init__(self, regions=None, endpoint=None, interfaces=None): + # type: (Optional[Dict[str, Region]], Optional[SkillManifestEndpoint], Optional[List[AlexaForBusinessInterface]]) -> None + """Defines the structure of alexaForBusiness api in the skill manifest. + + :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: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint + :param interfaces: Contains the list of supported interfaces. + :type interfaces: (optional) list[ask_smapi_model.v1.skill.manifest.alexa_for_business_interface.AlexaForBusinessInterface] + """ + self.__discriminator_value = None # type: str + + self.regions = regions + self.endpoint = endpoint + self.interfaces = interfaces + + 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, AlexaForBusinessApis): + 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/alexa_for_business_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface.py new file mode 100644 index 0000000..8909bb9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_for_business_interface.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.version import Version + from ask_smapi_model.v1.skill.manifest.request import Request + + +class AlexaForBusinessInterface(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: Contains a list of requests/messages that skill can handle. + :type requests: (optional) list[ask_smapi_model.v1.skill.manifest.request.Request] + + """ + deserialized_types = { + 'namespace': 'str', + 'version': 'ask_smapi_model.v1.skill.manifest.version.Version', + 'requests': 'list[ask_smapi_model.v1.skill.manifest.request.Request]' + } # type: Dict + + attribute_map = { + 'namespace': 'namespace', + 'version': 'version', + 'requests': 'requests' + } # type: Dict + supports_multiple_types = False + + def __init__(self, namespace=None, version=None, requests=None): + # type: (Optional[str], Optional[Version], Optional[List[Request]]) -> 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: Contains a list of requests/messages that skill can handle. + :type requests: (optional) list[ask_smapi_model.v1.skill.manifest.request.Request] + """ + self.__discriminator_value = None # type: str + + self.namespace = namespace + self.version = version + self.requests = requests + + 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, AlexaForBusinessInterface): + 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/alexa_presentation_apl_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_presentation_apl_interface.py new file mode 100644 index 0000000..09fb5ff --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/alexa_presentation_apl_interface.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_smapi_model.v1.skill.manifest.interface import Interface + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.viewport_specification import ViewportSpecification + + +class AlexaPresentationAplInterface(Interface): + """ + Used to declare that the skill uses the Alexa.Presentation.APL interface. + + + :param supported_viewports: List of supported viewports. + :type supported_viewports: (optional) list[ask_smapi_model.v1.skill.manifest.viewport_specification.ViewportSpecification] + + """ + deserialized_types = { + 'object_type': 'str', + 'supported_viewports': 'list[ask_smapi_model.v1.skill.manifest.viewport_specification.ViewportSpecification]' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'supported_viewports': 'supportedViewports' + } # type: Dict + supports_multiple_types = False + + def __init__(self, supported_viewports=None): + # type: (Optional[List[ViewportSpecification]]) -> None + """Used to declare that the skill uses the Alexa.Presentation.APL interface. + + :param supported_viewports: List of supported viewports. + :type supported_viewports: (optional) list[ask_smapi_model.v1.skill.manifest.viewport_specification.ViewportSpecification] + """ + self.__discriminator_value = "ALEXA_PRESENTATION_APL" # type: str + + self.object_type = self.__discriminator_value + super(AlexaPresentationAplInterface, self).__init__(object_type=self.__discriminator_value) + self.supported_viewports = supported_viewports + + 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, AlexaPresentationAplInterface): + 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 new file mode 100644 index 0000000..7b6d58e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/audio_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 + from datetime import datetime + + +class AudioInterface(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 = "AUDIO" # type: str + + self.object_type = self.__discriminator_value + super(AudioInterface, 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, AudioInterface): + 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/connections.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/connections.py new file mode 100644 index 0000000..d73e552 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/connections.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.connections_payload import ConnectionsPayload + + +class Connections(object): + """ + Skill connection object. + + + :param name: Name of the connection. + :type name: (optional) str + :param payload: + :type payload: (optional) ask_smapi_model.v1.skill.manifest.connections_payload.ConnectionsPayload + + """ + deserialized_types = { + 'name': 'str', + 'payload': 'ask_smapi_model.v1.skill.manifest.connections_payload.ConnectionsPayload' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'payload': 'payload' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, payload=None): + # type: (Optional[str], Optional[ConnectionsPayload]) -> None + """Skill connection object. + + :param name: Name of the connection. + :type name: (optional) str + :param payload: + :type payload: (optional) ask_smapi_model.v1.skill.manifest.connections_payload.ConnectionsPayload + """ + self.__discriminator_value = None # type: str + + self.name = name + 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, Connections): + 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/connections_payload.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/connections_payload.py new file mode 100644 index 0000000..27a7fbf --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/connections_payload.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 + from datetime import datetime + + +class ConnectionsPayload(object): + """ + Payload of the connection. + + + :param object_type: Type of the payload. + :type object_type: (optional) str + :param version: Version of the payload. + :type version: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'version': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'version': 'version' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, version=None): + # type: (Optional[str], Optional[str]) -> None + """Payload of the connection. + + :param object_type: Type of the payload. + :type object_type: (optional) str + :param version: Version of the payload. + :type version: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + 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, ConnectionsPayload): + 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/critical_data_handling.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/critical_data_handling.py new file mode 100644 index 0000000..f4ba6fe --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/critical_data_handling.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.data_protection_provider import DataProtectionProvider + + +class CriticalDataHandling(object): + """ + Contains the critical data related info. + + + :param data_protection_provider: + :type data_protection_provider: (optional) ask_smapi_model.v1.skill.manifest.data_protection_provider.DataProtectionProvider + + """ + deserialized_types = { + 'data_protection_provider': 'ask_smapi_model.v1.skill.manifest.data_protection_provider.DataProtectionProvider' + } # type: Dict + + attribute_map = { + 'data_protection_provider': 'dataProtectionProvider' + } # type: Dict + supports_multiple_types = False + + def __init__(self, data_protection_provider=None): + # type: (Optional[DataProtectionProvider]) -> None + """Contains the critical data related info. + + :param data_protection_provider: + :type data_protection_provider: (optional) ask_smapi_model.v1.skill.manifest.data_protection_provider.DataProtectionProvider + """ + self.__discriminator_value = None # type: str + + self.data_protection_provider = data_protection_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, CriticalDataHandling): + 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_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_apis.py new file mode 100644 index 0000000..0f5b2e8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_apis.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.custom_connections import CustomConnections + from ask_smapi_model.v1.skill.manifest.interface import Interface + from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpoint + from ask_smapi_model.v1.skill.manifest.skill_manifest_custom_task import SkillManifestCustomTask + from ask_smapi_model.v1.skill.manifest.region import Region + + +class CustomApis(object): + """ + Defines the structure for custom 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) + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint + :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] + :param connections: + :type connections: (optional) ask_smapi_model.v1.skill.manifest.custom_connections.CustomConnections + + """ + deserialized_types = { + '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' + } # type: Dict + + attribute_map = { + 'regions': 'regions', + 'endpoint': 'endpoint', + 'interfaces': 'interfaces', + 'tasks': 'tasks', + 'connections': 'connections' + } # type: Dict + supports_multiple_types = False + + def __init__(self, regions=None, endpoint=None, interfaces=None, tasks=None, connections=None): + # type: (Optional[Dict[str, Region]], Optional[SkillManifestEndpoint], Optional[List[Interface]], Optional[List[SkillManifestCustomTask]], Optional[CustomConnections]) -> None + """Defines the structure for custom 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) + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint + :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] + :param connections: + :type connections: (optional) ask_smapi_model.v1.skill.manifest.custom_connections.CustomConnections + """ + self.__discriminator_value = None # type: str + + self.regions = regions + self.endpoint = endpoint + self.interfaces = interfaces + self.tasks = tasks + self.connections = connections + + 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, CustomApis): + 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_connections.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_connections.py new file mode 100644 index 0000000..d3acd18 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_connections.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.connections import Connections + + +class CustomConnections(object): + """ + Supported connections. + + + :param requires: List of required connections. + :type requires: (optional) list[ask_smapi_model.v1.skill.manifest.connections.Connections] + :param provides: List of provided connections. + :type provides: (optional) list[ask_smapi_model.v1.skill.manifest.connections.Connections] + + """ + deserialized_types = { + 'requires': 'list[ask_smapi_model.v1.skill.manifest.connections.Connections]', + 'provides': 'list[ask_smapi_model.v1.skill.manifest.connections.Connections]' + } # type: Dict + + attribute_map = { + 'requires': 'requires', + 'provides': 'provides' + } # type: Dict + supports_multiple_types = False + + def __init__(self, requires=None, provides=None): + # type: (Optional[List[Connections]], Optional[List[Connections]]) -> None + """Supported connections. + + :param requires: List of required connections. + :type requires: (optional) list[ask_smapi_model.v1.skill.manifest.connections.Connections] + :param provides: List of provided connections. + :type provides: (optional) list[ask_smapi_model.v1.skill.manifest.connections.Connections] + """ + self.__discriminator_value = None # type: str + + self.requires = requires + self.provides = provides + + 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, CustomConnections): + 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_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_interface.py new file mode 100644 index 0000000..a7b544b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/custom_interface.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.interface import Interface + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class CustomInterface(Interface): + """ + Skills using Custom Interfaces can send custom directives and receive custom events from custom endpoints such as Alexa gadgets. + + + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + 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.object_type = self.__discriminator_value + super(CustomInterface, 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, CustomInterface): + 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/data_protection_provider.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/data_protection_provider.py new file mode 100644 index 0000000..be6bba9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/data_protection_provider.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 + from datetime import datetime + + +class DataProtectionProvider(Enum): + """ + The data protection provider. + + + + Allowed enum values: [KEY_MASTER, AWS_KMS] + """ + KEY_MASTER = "KEY_MASTER" + AWS_KMS = "AWS_KMS" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DataProtectionProvider): + 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 new file mode 100644 index 0000000..0b5f8e9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface.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 +from ask_smapi_model.v1.skill.manifest.interface import Interface + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.display_interface_template_version import DisplayInterfaceTemplateVersion + from ask_smapi_model.v1.skill.manifest.display_interface_apml_version import DisplayInterfaceApmlVersion + + +class DisplayInterface(Interface): + """ + 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: + :type minimum_template_version: (optional) ask_smapi_model.v1.skill.manifest.display_interface_template_version.DisplayInterfaceTemplateVersion + :param minimum_apml_version: + :type minimum_apml_version: (optional) ask_smapi_model.v1.skill.manifest.display_interface_apml_version.DisplayInterfaceApmlVersion + + """ + deserialized_types = { + 'object_type': 'str', + 'minimum_template_version': 'ask_smapi_model.v1.skill.manifest.display_interface_template_version.DisplayInterfaceTemplateVersion', + 'minimum_apml_version': 'ask_smapi_model.v1.skill.manifest.display_interface_apml_version.DisplayInterfaceApmlVersion' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'minimum_template_version': 'minimumTemplateVersion', + 'minimum_apml_version': 'minimumApmlVersion' + } # type: Dict + supports_multiple_types = False + + def __init__(self, minimum_template_version=None, minimum_apml_version=None): + # type: (Optional[DisplayInterfaceTemplateVersion], Optional[DisplayInterfaceApmlVersion]) -> 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: + :type minimum_template_version: (optional) ask_smapi_model.v1.skill.manifest.display_interface_template_version.DisplayInterfaceTemplateVersion + :param minimum_apml_version: + :type minimum_apml_version: (optional) ask_smapi_model.v1.skill.manifest.display_interface_apml_version.DisplayInterfaceApmlVersion + """ + self.__discriminator_value = "RENDER_TEMPLATE" # type: str + + self.object_type = self.__discriminator_value + super(DisplayInterface, self).__init__(object_type=self.__discriminator_value) + self.minimum_template_version = minimum_template_version + self.minimum_apml_version = minimum_apml_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, DisplayInterface): + 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_apml_version.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_apml_version.py new file mode 100644 index 0000000..f9cf20e --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_apml_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 + from datetime import datetime + + +class DisplayInterfaceApmlVersion(Enum): + """ + The minimum version of the APML specification supported by the skill. If a device does not support a version greater than or equal to the version specified her then apmlVersion will not be passed inside the Display interface in the ASK request. + + + + Allowed enum values: [_0_2] + """ + _0_2 = "0.2" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DisplayInterfaceApmlVersion): + 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_template_version.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_template_version.py new file mode 100644 index 0000000..956f795 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/display_interface_template_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 + from datetime import datetime + + +class DisplayInterfaceTemplateVersion(Enum): + """ + The minimum version of pre-defined templates supported by the skill. If a device does not support a version greater than or equal to the version specified her then templateVersion will not be passed inside the Display interface in the ASK request. + + + + Allowed enum values: [_1] + """ + _1 = "1" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DisplayInterfaceTemplateVersion): + 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/distribution_countries.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_countries.py new file mode 100644 index 0000000..c05eb7f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_countries.py @@ -0,0 +1,303 @@ +# 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 DistributionCountries(Enum): + """ + + + Allowed enum values: [AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, HR, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IQ, IE, IM, IL, IT, CI, JM, JP, JE, JO, KZ, KE, KI, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, AN, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SK, SI, SB, SO, ZA, GS, ES, LK, SR, SJ, SZ, SE, CH, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW] + """ + AF = "AF" + AX = "AX" + AL = "AL" + DZ = "DZ" + AS = "AS" + AD = "AD" + AO = "AO" + AI = "AI" + AQ = "AQ" + AG = "AG" + AR = "AR" + AM = "AM" + AW = "AW" + AU = "AU" + AT = "AT" + AZ = "AZ" + BS = "BS" + BH = "BH" + BD = "BD" + BB = "BB" + BY = "BY" + BE = "BE" + BZ = "BZ" + BJ = "BJ" + BM = "BM" + BT = "BT" + BO = "BO" + BA = "BA" + BW = "BW" + BV = "BV" + BR = "BR" + IO = "IO" + BN = "BN" + BG = "BG" + BF = "BF" + BI = "BI" + KH = "KH" + CM = "CM" + CA = "CA" + CV = "CV" + KY = "KY" + CF = "CF" + TD = "TD" + CL = "CL" + CN = "CN" + CX = "CX" + CC = "CC" + CO = "CO" + KM = "KM" + CG = "CG" + CD = "CD" + CK = "CK" + CR = "CR" + HR = "HR" + CY = "CY" + CZ = "CZ" + DK = "DK" + DJ = "DJ" + DM = "DM" + DO = "DO" + EC = "EC" + EG = "EG" + SV = "SV" + GQ = "GQ" + ER = "ER" + EE = "EE" + ET = "ET" + FK = "FK" + FO = "FO" + FJ = "FJ" + FI = "FI" + FR = "FR" + GF = "GF" + PF = "PF" + TF = "TF" + GA = "GA" + GM = "GM" + GE = "GE" + DE = "DE" + GH = "GH" + GI = "GI" + GR = "GR" + GL = "GL" + GD = "GD" + GP = "GP" + GU = "GU" + GT = "GT" + GG = "GG" + GN = "GN" + GW = "GW" + GY = "GY" + HT = "HT" + HM = "HM" + VA = "VA" + HN = "HN" + HK = "HK" + HU = "HU" + IS = "IS" + IN = "IN" + ID = "ID" + IQ = "IQ" + IE = "IE" + IM = "IM" + IL = "IL" + IT = "IT" + CI = "CI" + JM = "JM" + JP = "JP" + JE = "JE" + JO = "JO" + KZ = "KZ" + KE = "KE" + KI = "KI" + KR = "KR" + KW = "KW" + KG = "KG" + LA = "LA" + LV = "LV" + LB = "LB" + LS = "LS" + LR = "LR" + LY = "LY" + LI = "LI" + LT = "LT" + LU = "LU" + MO = "MO" + MK = "MK" + MG = "MG" + MW = "MW" + MY = "MY" + MV = "MV" + ML = "ML" + MT = "MT" + MH = "MH" + MQ = "MQ" + MR = "MR" + MU = "MU" + YT = "YT" + MX = "MX" + FM = "FM" + MD = "MD" + MC = "MC" + MN = "MN" + ME = "ME" + MS = "MS" + MA = "MA" + MZ = "MZ" + MM = "MM" + NA = "NA" + NR = "NR" + NP = "NP" + NL = "NL" + AN = "AN" + NC = "NC" + NZ = "NZ" + NI = "NI" + NE = "NE" + NG = "NG" + NU = "NU" + NF = "NF" + MP = "MP" + NO = "NO" + OM = "OM" + PK = "PK" + PW = "PW" + PS = "PS" + PA = "PA" + PG = "PG" + PY = "PY" + PE = "PE" + PH = "PH" + PN = "PN" + PL = "PL" + PT = "PT" + PR = "PR" + QA = "QA" + RE = "RE" + RO = "RO" + RU = "RU" + RW = "RW" + BL = "BL" + SH = "SH" + KN = "KN" + LC = "LC" + MF = "MF" + PM = "PM" + VC = "VC" + WS = "WS" + SM = "SM" + ST = "ST" + SA = "SA" + SN = "SN" + RS = "RS" + SC = "SC" + SL = "SL" + SG = "SG" + SK = "SK" + SI = "SI" + SB = "SB" + SO = "SO" + ZA = "ZA" + GS = "GS" + ES = "ES" + LK = "LK" + SR = "SR" + SJ = "SJ" + SZ = "SZ" + SE = "SE" + CH = "CH" + TW = "TW" + TJ = "TJ" + TZ = "TZ" + TH = "TH" + TL = "TL" + TG = "TG" + TK = "TK" + TO = "TO" + TT = "TT" + TN = "TN" + TR = "TR" + TM = "TM" + TC = "TC" + TV = "TV" + UG = "UG" + UA = "UA" + AE = "AE" + GB = "GB" + US = "US" + UM = "UM" + UY = "UY" + UZ = "UZ" + VU = "VU" + VE = "VE" + VN = "VN" + VG = "VG" + VI = "VI" + WF = "WF" + EH = "EH" + YE = "YE" + ZM = "ZM" + ZW = "ZW" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DistributionCountries): + 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/distribution_mode.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_mode.py new file mode 100644 index 0000000..816120b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/distribution_mode.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 + from datetime import datetime + + +class DistributionMode(Enum): + """ + What audience the skill should be distributed to. \"PUBLIC\" - available to all users. Has ASIN and can be enabled. \"PRIVATE\" - available to entitled users. Has ASIN and can be enabled. \"INTERNAL\" - has no ASIN and cannot be enabled by users. Internally managed skills. + + + + Allowed enum values: [PRIVATE, PUBLIC, INTERNAL] + """ + PRIVATE = "PRIVATE" + PUBLIC = "PUBLIC" + INTERNAL = "INTERNAL" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, DistributionMode): + 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/event_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name.py new file mode 100644 index 0000000..76a15f0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.event_name_type import EventNameType + + +class EventName(object): + """ + + :param event_name: + :type event_name: (optional) ask_smapi_model.v1.skill.manifest.event_name_type.EventNameType + + """ + deserialized_types = { + 'event_name': 'ask_smapi_model.v1.skill.manifest.event_name_type.EventNameType' + } # type: Dict + + attribute_map = { + 'event_name': 'eventName' + } # type: Dict + supports_multiple_types = False + + def __init__(self, event_name=None): + # type: (Optional[EventNameType]) -> None + """ + + :param event_name: + :type event_name: (optional) ask_smapi_model.v1.skill.manifest.event_name_type.EventNameType + """ + self.__discriminator_value = None # type: str + + self.event_name = event_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, EventName): + 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/event_name_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name_type.py new file mode 100644 index 0000000..75a76f7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_name_type.py @@ -0,0 +1,290 @@ +# 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 EventNameType(Enum): + """ + Name of the event to be subscribed to. + + + + 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] + """ + 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" + 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" + 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" + 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" + Legacy_AudioPlayer_AudioStutter = "Legacy.AudioPlayer.AudioStutter" + Legacy_AudioPlayer_InitialPlaybackProgressReport = "Legacy.AudioPlayer.InitialPlaybackProgressReport" + Legacy_AudioPlayer_Metadata = "Legacy.AudioPlayer.Metadata" + Legacy_AudioPlayer_PeriodicPlaybackProgressReport = "Legacy.AudioPlayer.PeriodicPlaybackProgressReport" + Legacy_AudioPlayer_PlaybackError = "Legacy.AudioPlayer.PlaybackError" + Legacy_AudioPlayer_PlaybackFinished = "Legacy.AudioPlayer.PlaybackFinished" + 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_DeviceDisconnectedFailure = "Legacy.BluetoothNetwork.DeviceDisconnectedFailure" + Legacy_BluetoothNetwork_DeviceDisconnectedSuccess = "Legacy.BluetoothNetwork.DeviceDisconnectedSuccess" + Legacy_BluetoothNetwork_DevicePairFailure = "Legacy.BluetoothNetwork.DevicePairFailure" + 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_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_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_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_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_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" + 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" + 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_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" + 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" + 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" + Alexa_Presentation_PresentationDismissed = "Alexa.Presentation.PresentationDismissed" + 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" + FitnessSessionController_FitnessSessionEnded = "FitnessSessionController.FitnessSessionEnded" + FitnessSessionController_FitnessSessionError = "FitnessSessionController.FitnessSessionError" + FitnessSessionController_FitnessSessionPaused = "FitnessSessionController.FitnessSessionPaused" + FitnessSessionController_FitnessSessionResumed = "FitnessSessionController.FitnessSessionResumed" + 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" + PlaybackController_PauseCommandIssued = "PlaybackController.PauseCommandIssued" + PlaybackController_PlayCommandIssued = "PlaybackController.PlayCommandIssued" + PlaybackController_PreviousCommandIssued = "PlaybackController.PreviousCommandIssued" + EffectsController_RequestEffectChangeRequest = "EffectsController.RequestEffectChangeRequest" + EffectsController_RequestGuiChangeRequest = "EffectsController.RequestGuiChangeRequest" + EffectsController_StateReceiptChangeRequest = "EffectsController.StateReceiptChangeRequest" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, EventNameType): + 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/event_publications.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_publications.py new file mode 100644 index 0000000..327e856 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/event_publications.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 + from datetime import datetime + + +class EventPublications(object): + """ + + :param event_name: Name of the event to publish. + :type event_name: (optional) str + + """ + deserialized_types = { + 'event_name': 'str' + } # type: Dict + + attribute_map = { + 'event_name': 'eventName' + } # type: Dict + supports_multiple_types = False + + def __init__(self, event_name=None): + # type: (Optional[str]) -> None + """ + + :param event_name: Name of the event to publish. + :type event_name: (optional) str + """ + self.__discriminator_value = None # type: str + + self.event_name = event_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, EventPublications): + 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 new file mode 100644 index 0000000..db975f0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_apis.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info import LocalizedFlashBriefingInfo + + +class FlashBriefingApis(object): + """ + Defines the structure for flash briefing api of the skill. + + + :param locales: Defines the structure for locale specific flash briefing api information. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info.LocalizedFlashBriefingInfo) + + """ + deserialized_types = { + 'locales': 'dict(str, ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info.LocalizedFlashBriefingInfo)' + } # type: Dict + + attribute_map = { + 'locales': 'locales' + } # type: Dict + supports_multiple_types = False + + def __init__(self, locales=None): + # type: (Optional[Dict[str, LocalizedFlashBriefingInfo]]) -> None + """Defines the structure for flash briefing api of the skill. + + :param locales: Defines the structure for locale specific flash briefing api information. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info.LocalizedFlashBriefingInfo) + """ + 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, FlashBriefingApis): + 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_content_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_content_type.py new file mode 100644 index 0000000..12fc497 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_content_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 + from datetime import datetime + + +class FlashBriefingContentType(Enum): + """ + format of the feed content. + + + + Allowed enum values: [TEXT, AUDIO, AUDIO_AND_VIDEO] + """ + TEXT = "TEXT" + AUDIO = "AUDIO" + AUDIO_AND_VIDEO = "AUDIO_AND_VIDEO" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, FlashBriefingContentType): + 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_genre.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_genre.py new file mode 100644 index 0000000..c26f408 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_genre.py @@ -0,0 +1,77 @@ +# 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 FlashBriefingGenre(Enum): + """ + Type or subject of the content in the feed. + + + + Allowed enum values: [HEADLINE_NEWS, BUSINESS, POLITICS, ENTERTAINMENT, TECHNOLOGY, HUMOR, LIFESTYLE, SPORTS, SCIENCE, HEALTH_AND_FITNESS, ARTS_AND_CULTURE, PRODUCTIVITY_AND_UTILITIES, OTHER] + """ + HEADLINE_NEWS = "HEADLINE_NEWS" + BUSINESS = "BUSINESS" + POLITICS = "POLITICS" + ENTERTAINMENT = "ENTERTAINMENT" + TECHNOLOGY = "TECHNOLOGY" + HUMOR = "HUMOR" + LIFESTYLE = "LIFESTYLE" + SPORTS = "SPORTS" + SCIENCE = "SCIENCE" + HEALTH_AND_FITNESS = "HEALTH_AND_FITNESS" + ARTS_AND_CULTURE = "ARTS_AND_CULTURE" + PRODUCTIVITY_AND_UTILITIES = "PRODUCTIVITY_AND_UTILITIES" + OTHER = "OTHER" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, FlashBriefingGenre): + 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_update_frequency.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_update_frequency.py new file mode 100644 index 0000000..3e5a037 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/flash_briefing_update_frequency.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 + from datetime import datetime + + +class FlashBriefingUpdateFrequency(Enum): + """ + Tells how often the feed has new content. + + + + Allowed enum values: [HOURLY, DAILY, WEEKLY, UNKNOWN] + """ + HOURLY = "HOURLY" + DAILY = "DAILY" + WEEKLY = "WEEKLY" + UNKNOWN = "UNKNOWN" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, FlashBriefingUpdateFrequency): + 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 new file mode 100644 index 0000000..dd93eb1 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_controller_interface.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.interface import Interface + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class GadgetControllerInterface(Interface): + """ + Skills using Gadget Controller can send directives to Echo Buttons. This is a legacy interface specific to Echo Buttons. + + + + """ + deserialized_types = { + 'object_type': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type' + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """Skills using Gadget Controller can send directives to Echo Buttons. This is a legacy interface specific to Echo Buttons. + + """ + self.__discriminator_value = "GADGET_CONTROLLER" # type: str + + self.object_type = self.__discriminator_value + super(GadgetControllerInterface, 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, GadgetControllerInterface): + 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_support.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_support.py new file mode 100644 index 0000000..bac0208 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/gadget_support.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 + from datetime import datetime + + +class GadgetSupport(Enum): + """ + Specifies if gadget support is required/optional for this skill to work. + + + + Allowed enum values: [REQUIRED, OPTIONAL] + """ + REQUIRED = "REQUIRED" + OPTIONAL = "OPTIONAL" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, GadgetSupport): + 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/game_engine_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/game_engine_interface.py new file mode 100644 index 0000000..c5295fa --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/game_engine_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 + from datetime import datetime + + +class GameEngineInterface(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 = "GAME_ENGINE" # type: str + + self.object_type = self.__discriminator_value + super(GameEngineInterface, 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, GameEngineInterface): + 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_alias.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_alias.py new file mode 100644 index 0000000..fbf6db6 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_alias.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 + from datetime import datetime + + +class HealthAlias(object): + """ + + :param name: Name of alias to use when invoking a health skill. + :type name: (optional) str + + """ + deserialized_types = { + 'name': 'str' + } # type: Dict + + attribute_map = { + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None): + # type: (Optional[str]) -> None + """ + + :param name: Name of alias to use when invoking a health skill. + :type name: (optional) str + """ + self.__discriminator_value = None # type: str + + 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, HealthAlias): + 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/health_apis.py new file mode 100644 index 0000000..026b77d --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_apis.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.health_protocol_version import HealthProtocolVersion + from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpoint + from ask_smapi_model.v1.skill.manifest.region import Region + from ask_smapi_model.v1.skill.manifest.health_interface import HealthInterface + + +class HealthApis(object): + """ + Defines the structure of health api in the skill manifest. + + + :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: + :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 + + """ + 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' + } # type: Dict + + attribute_map = { + 'regions': 'regions', + 'endpoint': 'endpoint', + 'protocol_version': 'protocolVersion', + 'interfaces': 'interfaces' + } # type: Dict + supports_multiple_types = False + + def __init__(self, regions=None, endpoint=None, protocol_version=None, interfaces=None): + # type: (Optional[Dict[str, Region]], Optional[SkillManifestEndpoint], Optional[HealthProtocolVersion], Optional[HealthInterface]) -> None + """Defines the structure of health api in the skill manifest. + + :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: + :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 + """ + self.__discriminator_value = None # type: str + + self.regions = regions + self.endpoint = endpoint + self.protocol_version = protocol_version + self.interfaces = interfaces + + 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, HealthApis): + 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_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_interface.py new file mode 100644 index 0000000..3a11772 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_interface.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.health_request import HealthRequest + from ask_smapi_model.v1.skill.manifest.localized_health_info import LocalizedHealthInfo + from ask_smapi_model.v1.skill.manifest.version import Version + + +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) + + """ + 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)' + } # type: Dict + + attribute_map = { + 'namespace': 'namespace', + 'version': 'version', + 'requests': 'requests', + 'locales': 'locales' + } # type: Dict + supports_multiple_types = False + + def __init__(self, namespace=None, version=None, requests=None, locales=None): + # type: (Optional[str], Optional[Version], Optional[List[HealthRequest]], Optional[Dict[str, LocalizedHealthInfo]]) -> 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) + """ + 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] + """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, HealthInterface): + 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/health_protocol_version.py new file mode 100644 index 0000000..9c7817b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_protocol_version.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 + from datetime import datetime + + +class HealthProtocolVersion(Enum): + """ + + + Allowed enum values: [_1, _2] + """ + _1 = "1" + _2 = "2" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, HealthProtocolVersion): + 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/skill/manifest/health_request.py new file mode 100644 index 0000000..578fda8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/health_request.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 + from datetime import datetime + + +class HealthRequest(object): + """ + + :param name: Defines the name of request, each request has their own payload format. + :type name: (optional) str + + """ + deserialized_types = { + 'name': 'str' + } # type: Dict + + attribute_map = { + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None): + # type: (Optional[str]) -> None + """ + + :param name: Defines the name of request, each request has their own payload format. + :type name: (optional) str + """ + self.__discriminator_value = None # type: str + + 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, HealthRequest): + 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/house_hold_list.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/house_hold_list.py new file mode 100644 index 0000000..222fdda --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/house_hold_list.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 + from datetime import datetime + + +class HouseHoldList(object): + """ + Defines the structure of household list api in the skill manifest. + + + + """ + deserialized_types = { + } # type: Dict + + attribute_map = { + } # type: Dict + supports_multiple_types = False + + def __init__(self): + # type: () -> None + """Defines the structure of household list api in the skill manifest. + + """ + 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, HouseHoldList): + 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/interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/interface.py new file mode 100644 index 0000000..49abeec --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/interface.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 + from datetime import datetime + + +class Interface(object): + """ + + :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. + + | ALEXA_PRESENTATION_APL: :py:class:`ask_smapi_model.v1.skill.manifest.alexa_presentation_apl_interface.AlexaPresentationAplInterface`, + | + | VIDEO: :py:class:`ask_smapi_model.v1.skill.manifest.video_app_interface.VideoAppInterface`, + | + | CUSTOM_INTERFACE: :py:class:`ask_smapi_model.v1.skill.manifest.custom_interface.CustomInterface`, + | + | AUDIO: :py:class:`ask_smapi_model.v1.skill.manifest.audio_interface.AudioInterface`, + | + | GAME_ENGINE: :py:class:`ask_smapi_model.v1.skill.manifest.game_engine_interface.GameEngineInterface`, + | + | 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` + + """ + 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_smapi_model.v1.skill.manifest.alexa_presentation_apl_interface.AlexaPresentationAplInterface', + 'VIDEO': 'ask_smapi_model.v1.skill.manifest.video_app_interface.VideoAppInterface', + 'CUSTOM_INTERFACE': 'ask_smapi_model.v1.skill.manifest.custom_interface.CustomInterface', + 'AUDIO': 'ask_smapi_model.v1.skill.manifest.audio_interface.AudioInterface', + 'GAME_ENGINE': 'ask_smapi_model.v1.skill.manifest.game_engine_interface.GameEngineInterface', + 'RENDER_TEMPLATE': 'ask_smapi_model.v1.skill.manifest.display_interface.DisplayInterface', + 'GADGET_CONTROLLER': 'ask_smapi_model.v1.skill.manifest.gadget_controller_interface.GadgetControllerInterface' + } + + json_discriminator_key = "type" + + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, object_type=None): + # type: (Optional[str]) -> None + """ + + :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, Interface): + 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/lambda_endpoint.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_endpoint.py new file mode 100644 index 0000000..f623935 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_endpoint.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 + from datetime import datetime + + +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. + :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 + """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. + :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, LambdaEndpoint): + 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/lambda_region.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_region.py new file mode 100644 index 0000000..a827abb --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/lambda_region.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpoint + + +class LambdaRegion(object): + """ + Defines the structure of a regional information. + + + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint + + """ + deserialized_types = { + 'endpoint': 'ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint' + } # type: Dict + + attribute_map = { + 'endpoint': 'endpoint' + } # type: Dict + supports_multiple_types = False + + def __init__(self, endpoint=None): + # type: (Optional[LambdaEndpoint]) -> None + """Defines the structure of a regional information. + + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint + """ + self.__discriminator_value = None # type: str + + self.endpoint = endpoint + + 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, LambdaRegion): + 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 new file mode 100644 index 0000000..e6f98ed --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_flash_briefing_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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info_items import LocalizedFlashBriefingInfoItems + + +class LocalizedFlashBriefingInfo(object): + """ + Defines the localized flash briefing api 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] + :param custom_error_message: Alexa says this to the customer if the skill fails to render the content. + :type custom_error_message: (optional) str + + """ + deserialized_types = { + 'feeds': 'list[ask_smapi_model.v1.skill.manifest.localized_flash_briefing_info_items.LocalizedFlashBriefingInfoItems]', + 'custom_error_message': 'str' + } # type: Dict + + attribute_map = { + 'feeds': 'feeds', + 'custom_error_message': 'customErrorMessage' + } # type: Dict + supports_multiple_types = False + + def __init__(self, feeds=None, custom_error_message=None): + # type: (Optional[List[LocalizedFlashBriefingInfoItems]], Optional[str]) -> None + """Defines the localized flash briefing api 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] + :param custom_error_message: Alexa says this to the customer if the skill fails to render the content. + :type custom_error_message: (optional) str + """ + self.__discriminator_value = None # type: str + + self.feeds = feeds + self.custom_error_message = custom_error_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, LocalizedFlashBriefingInfo): + 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_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_flash_briefing_info_items.py new file mode 100644 index 0000000..132cd15 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_flash_briefing_info_items.py @@ -0,0 +1,165 @@ +# 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.manifest.flash_briefing_genre import FlashBriefingGenre + from ask_smapi_model.v1.skill.manifest.flash_briefing_content_type import FlashBriefingContentType + from ask_smapi_model.v1.skill.manifest.flash_briefing_update_frequency import FlashBriefingUpdateFrequency + + +class LocalizedFlashBriefingInfoItems(object): + """ + + :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. + :type logical_name: (optional) str + :param name: Name that identifies this feed. + :type name: (optional) str + :param url: Url for the feed + :type url: (optional) str + :param image_uri: Uri for the feed image + :type image_uri: (optional) str + :param content_type: + :type content_type: (optional) ask_smapi_model.v1.skill.manifest.flash_briefing_content_type.FlashBriefingContentType + :param genre: + :type genre: (optional) ask_smapi_model.v1.skill.manifest.flash_briefing_genre.FlashBriefingGenre + :param update_frequency: + :type update_frequency: (optional) ask_smapi_model.v1.skill.manifest.flash_briefing_update_frequency.FlashBriefingUpdateFrequency + :param vui_preamble: A short introduction for the feed that Alexa reads to the customer before the feed contents. Should start with \"In\" or \"From\". + :type vui_preamble: (optional) str + :param is_default: True if this should be the default feed to be enabled when customer enables the skill false otherwise. + :type is_default: (optional) bool + + """ + deserialized_types = { + 'logical_name': 'str', + 'name': 'str', + 'url': 'str', + 'image_uri': 'str', + 'content_type': 'ask_smapi_model.v1.skill.manifest.flash_briefing_content_type.FlashBriefingContentType', + 'genre': 'ask_smapi_model.v1.skill.manifest.flash_briefing_genre.FlashBriefingGenre', + 'update_frequency': 'ask_smapi_model.v1.skill.manifest.flash_briefing_update_frequency.FlashBriefingUpdateFrequency', + 'vui_preamble': 'str', + 'is_default': 'bool' + } # type: Dict + + attribute_map = { + 'logical_name': 'logicalName', + 'name': 'name', + 'url': 'url', + 'image_uri': 'imageUri', + 'content_type': 'contentType', + 'genre': 'genre', + 'update_frequency': 'updateFrequency', + 'vui_preamble': 'vuiPreamble', + 'is_default': 'isDefault' + } # type: Dict + 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[FlashBriefingContentType], Optional[FlashBriefingGenre], Optional[FlashBriefingUpdateFrequency], 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. + :type logical_name: (optional) str + :param name: Name that identifies this feed. + :type name: (optional) str + :param url: Url for the feed + :type url: (optional) str + :param image_uri: Uri for the feed image + :type image_uri: (optional) str + :param content_type: + :type content_type: (optional) ask_smapi_model.v1.skill.manifest.flash_briefing_content_type.FlashBriefingContentType + :param genre: + :type genre: (optional) ask_smapi_model.v1.skill.manifest.flash_briefing_genre.FlashBriefingGenre + :param update_frequency: + :type update_frequency: (optional) ask_smapi_model.v1.skill.manifest.flash_briefing_update_frequency.FlashBriefingUpdateFrequency + :param vui_preamble: A short introduction for the feed that Alexa reads to the customer before the feed contents. Should start with \"In\" or \"From\". + :type vui_preamble: (optional) str + :param is_default: True if this should be the default feed to be enabled when customer enables the skill false otherwise. + :type is_default: (optional) bool + """ + self.__discriminator_value = None # type: str + + self.logical_name = logical_name + self.name = name + self.url = url + self.image_uri = image_uri + self.content_type = content_type + self.genre = genre + self.update_frequency = update_frequency + self.vui_preamble = vui_preamble + self.is_default = is_default + + 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, LocalizedFlashBriefingInfoItems): + 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-smapi-model/ask_smapi_model/v1/skill/manifest/localized_health_info.py new file mode 100644 index 0000000..3378e43 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_health_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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.health_alias import HealthAlias + + +class LocalizedHealthInfo(object): + """ + Defines the structure for health skill locale specific publishing information in the skill manifest. + + + :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] + + """ + deserialized_types = { + 'prompt_name': 'str', + 'aliases': 'list[ask_smapi_model.v1.skill.manifest.health_alias.HealthAlias]' + } # type: Dict + + attribute_map = { + 'prompt_name': 'promptName', + 'aliases': 'aliases' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prompt_name=None, aliases=None): + # type: (Optional[str], Optional[List[HealthAlias]]) -> None + """Defines the structure for health skill locale specific publishing information in the skill manifest. + + :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] + """ + self.__discriminator_value = None # type: str + + self.prompt_name = prompt_name + self.aliases = aliases + + 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, LocalizedHealthInfo): + 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 new file mode 100644 index 0000000..766a0c2 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/localized_music_info.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.music_wordmark import MusicWordmark + from ask_smapi_model.v1.skill.manifest.music_alias import MusicAlias + from ask_smapi_model.v1.skill.manifest.music_feature import MusicFeature + + +class LocalizedMusicInfo(object): + """ + 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: + :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] + :param wordmark_logos: + :type wordmark_logos: (optional) list[ask_smapi_model.v1.skill.manifest.music_wordmark.MusicWordmark] + + """ + deserialized_types = { + 'prompt_name': 'str', + 'aliases': 'list[ask_smapi_model.v1.skill.manifest.music_alias.MusicAlias]', + 'features': 'list[ask_smapi_model.v1.skill.manifest.music_feature.MusicFeature]', + 'wordmark_logos': 'list[ask_smapi_model.v1.skill.manifest.music_wordmark.MusicWordmark]' + } # type: Dict + + attribute_map = { + 'prompt_name': 'promptName', + 'aliases': 'aliases', + 'features': 'features', + 'wordmark_logos': 'wordmarkLogos' + } # type: Dict + supports_multiple_types = False + + def __init__(self, prompt_name=None, aliases=None, features=None, wordmark_logos=None): + # type: (Optional[str], Optional[List[MusicAlias]], Optional[List[MusicFeature]], Optional[List[MusicWordmark]]) -> 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: + :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] + :param wordmark_logos: + :type wordmark_logos: (optional) list[ask_smapi_model.v1.skill.manifest.music_wordmark.MusicWordmark] + """ + self.__discriminator_value = None # type: str + + self.prompt_name = prompt_name + self.aliases = aliases + self.features = features + self.wordmark_logos = wordmark_logos + + 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, LocalizedMusicInfo): + 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/manifest_gadget_support.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/manifest_gadget_support.py new file mode 100644 index 0000000..42e4f8f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/manifest_gadget_support.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.gadget_support import GadgetSupport + + +class ManifestGadgetSupport(object): + """ + 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 + :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. + :type max_gadget_buttons: (optional) int + :param num_players_max: Maximum number of players in the game. + :type num_players_max: (optional) int + :param num_players_min: Minimum number of players in the game. + :type num_players_min: (optional) int + + """ + deserialized_types = { + 'requirement': 'ask_smapi_model.v1.skill.manifest.gadget_support.GadgetSupport', + 'min_gadget_buttons': 'int', + 'max_gadget_buttons': 'int', + 'num_players_max': 'int', + 'num_players_min': 'int' + } # type: Dict + + attribute_map = { + 'requirement': 'requirement', + 'min_gadget_buttons': 'minGadgetButtons', + 'max_gadget_buttons': 'maxGadgetButtons', + 'num_players_max': 'numPlayersMax', + 'num_players_min': 'numPlayersMin' + } # type: Dict + 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[GadgetSupport], 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 + :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. + :type max_gadget_buttons: (optional) int + :param num_players_max: Maximum number of players in the game. + :type num_players_max: (optional) int + :param num_players_min: Minimum number of players in the game. + :type num_players_min: (optional) int + """ + self.__discriminator_value = None # type: str + + self.requirement = requirement + self.min_gadget_buttons = min_gadget_buttons + self.max_gadget_buttons = max_gadget_buttons + self.num_players_max = num_players_max + self.num_players_min = num_players_min + + 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, ManifestGadgetSupport): + 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 new file mode 100644 index 0000000..5697c42 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_alias.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 + from datetime import datetime + + +class MusicAlias(object): + """ + + :param name: Alias name to be associated with the music skill. + :type name: (optional) str + + """ + deserialized_types = { + 'name': 'str' + } # type: Dict + + attribute_map = { + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None): + # type: (Optional[str]) -> None + """ + + :param name: Alias name to be associated with the music skill. + :type name: (optional) str + """ + self.__discriminator_value = None # type: str + + 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, MusicAlias): + 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_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_apis.py new file mode 100644 index 0000000..fb0b098 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_apis.py @@ -0,0 +1,149 @@ +# 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.manifest.localized_music_info import LocalizedMusicInfo + from ask_smapi_model.v1.skill.manifest.lambda_region import LambdaRegion + from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpoint + from ask_smapi_model.v1.skill.manifest.music_content_type import MusicContentType + from ask_smapi_model.v1.skill.manifest.music_capability import MusicCapability + from ask_smapi_model.v1.skill.manifest.music_interfaces import MusicInterfaces + + +class MusicApis(object): + """ + Defines the structure of music api in the skill manifest. + + + :param regions: Contains an array of the supported <region> Objects. + :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.lambda_endpoint.LambdaEndpoint + :param capabilities: Defines the structure of music capabilities information in the skill manifest. + :type capabilities: (optional) list[ask_smapi_model.v1.skill.manifest.music_capability.MusicCapability] + :param interfaces: + :type interfaces: (optional) ask_smapi_model.v1.skill.manifest.music_interfaces.MusicInterfaces + :param locales: Defines the structure of locale specific music information in the skill manifest. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.localized_music_info.LocalizedMusicInfo) + :param content_types: List of the type of content to be provided by the music skill. + :type content_types: (optional) list[ask_smapi_model.v1.skill.manifest.music_content_type.MusicContentType] + + """ + deserialized_types = { + 'regions': 'dict(str, ask_smapi_model.v1.skill.manifest.lambda_region.LambdaRegion)', + 'endpoint': 'ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint', + 'capabilities': 'list[ask_smapi_model.v1.skill.manifest.music_capability.MusicCapability]', + 'interfaces': 'ask_smapi_model.v1.skill.manifest.music_interfaces.MusicInterfaces', + 'locales': 'dict(str, ask_smapi_model.v1.skill.manifest.localized_music_info.LocalizedMusicInfo)', + 'content_types': 'list[ask_smapi_model.v1.skill.manifest.music_content_type.MusicContentType]' + } # type: Dict + + attribute_map = { + 'regions': 'regions', + 'endpoint': 'endpoint', + 'capabilities': 'capabilities', + 'interfaces': 'interfaces', + 'locales': 'locales', + 'content_types': 'contentTypes' + } # type: Dict + supports_multiple_types = False + + def __init__(self, regions=None, endpoint=None, capabilities=None, interfaces=None, locales=None, content_types=None): + # type: (Optional[Dict[str, LambdaRegion]], Optional[LambdaEndpoint], Optional[List[MusicCapability]], Optional[MusicInterfaces], Optional[Dict[str, LocalizedMusicInfo]], Optional[List[MusicContentType]]) -> None + """Defines the structure of music api in the skill manifest. + + :param regions: Contains an array of the supported <region> Objects. + :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.lambda_endpoint.LambdaEndpoint + :param capabilities: Defines the structure of music capabilities information in the skill manifest. + :type capabilities: (optional) list[ask_smapi_model.v1.skill.manifest.music_capability.MusicCapability] + :param interfaces: + :type interfaces: (optional) ask_smapi_model.v1.skill.manifest.music_interfaces.MusicInterfaces + :param locales: Defines the structure of locale specific music information in the skill manifest. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.localized_music_info.LocalizedMusicInfo) + :param content_types: List of the type of content to be provided by the music skill. + :type content_types: (optional) list[ask_smapi_model.v1.skill.manifest.music_content_type.MusicContentType] + """ + self.__discriminator_value = None # type: str + + self.regions = regions + self.endpoint = endpoint + self.capabilities = capabilities + self.interfaces = interfaces + self.locales = locales + self.content_types = content_types + + 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, MusicApis): + 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_capability.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_capability.py new file mode 100644 index 0000000..41cb7ea --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_capability.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class MusicCapability(object): + """ + + :param namespace: Namespace of music skill api. + :type namespace: (optional) str + :param name: Name of music skill api. + :type name: (optional) str + :param version: Version of music skill api. + :type version: (optional) str + + """ + deserialized_types = { + 'namespace': 'str', + 'name': 'str', + 'version': 'str' + } # type: Dict + + attribute_map = { + 'namespace': 'namespace', + 'name': 'name', + 'version': 'version' + } # type: Dict + supports_multiple_types = False + + def __init__(self, namespace=None, name=None, version=None): + # type: (Optional[str], Optional[str], Optional[str]) -> None + """ + + :param namespace: Namespace of music skill api. + :type namespace: (optional) str + :param name: Name of music skill api. + :type name: (optional) str + :param version: Version of music skill api. + :type version: (optional) str + """ + self.__discriminator_value = None # type: str + + self.namespace = namespace + self.name = name + 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, MusicCapability): + 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_content_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_name.py new file mode 100644 index 0000000..8fc4ee0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_name.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 + from datetime import datetime + + +class MusicContentName(Enum): + """ + Name of the content type that's supported for the music skill. + + + + Allowed enum values: [ON_DEMAND, RADIO, PODCAST] + """ + ON_DEMAND = "ON_DEMAND" + RADIO = "RADIO" + PODCAST = "PODCAST" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, MusicContentName): + 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_content_type.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_type.py new file mode 100644 index 0000000..ace55a8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_content_type.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.music_content_name import MusicContentName + + +class MusicContentType(object): + """ + Defines the structure for content that can be provided by a music skill. + + + :param name: + :type name: (optional) ask_smapi_model.v1.skill.manifest.music_content_name.MusicContentName + + """ + deserialized_types = { + 'name': 'ask_smapi_model.v1.skill.manifest.music_content_name.MusicContentName' + } # type: Dict + + attribute_map = { + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None): + # type: (Optional[MusicContentName]) -> None + """Defines the structure for content that can be provided by a music skill. + + :param name: + :type name: (optional) ask_smapi_model.v1.skill.manifest.music_content_name.MusicContentName + """ + self.__discriminator_value = None # type: str + + 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, MusicContentType): + 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_feature.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_feature.py new file mode 100644 index 0000000..15aceec --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_feature.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 + from datetime import datetime + + +class MusicFeature(object): + """ + + :param name: Feature name to be associated with the music skill. + :type name: (optional) str + + """ + deserialized_types = { + 'name': 'str' + } # type: Dict + + attribute_map = { + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None): + # type: (Optional[str]) -> None + """ + + :param name: Feature name to be associated with the music skill. + :type name: (optional) str + """ + self.__discriminator_value = None # type: str + + 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, MusicFeature): + 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_interfaces.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_interfaces.py new file mode 100644 index 0000000..6be1696 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_interfaces.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.music_request import MusicRequest + + +class MusicInterfaces(object): + """ + + :param namespace: Name of the interface. + :type namespace: (optional) str + :param version: Version of the interface. + :type version: (optional) str + :param requests: Contains a list of requests/messages that skill can handle. + :type requests: (optional) list[ask_smapi_model.v1.skill.manifest.music_request.MusicRequest] + + """ + deserialized_types = { + 'namespace': 'str', + 'version': 'str', + 'requests': 'list[ask_smapi_model.v1.skill.manifest.music_request.MusicRequest]' + } # type: Dict + + attribute_map = { + 'namespace': 'namespace', + 'version': 'version', + 'requests': 'requests' + } # type: Dict + supports_multiple_types = False + + def __init__(self, namespace=None, version=None, requests=None): + # type: (Optional[str], Optional[str], Optional[List[MusicRequest]]) -> None + """ + + :param namespace: Name of the interface. + :type namespace: (optional) str + :param version: Version of the interface. + :type version: (optional) str + :param requests: Contains a list of requests/messages that skill can handle. + :type requests: (optional) list[ask_smapi_model.v1.skill.manifest.music_request.MusicRequest] + """ + self.__discriminator_value = None # type: str + + self.namespace = namespace + self.version = version + self.requests = requests + + 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, MusicInterfaces): + 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_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_request.py new file mode 100644 index 0000000..ce396cc --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_request.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 + from datetime import datetime + + +class MusicRequest(object): + """ + + :param name: Name of the request. + :type name: (optional) str + + """ + deserialized_types = { + 'name': 'str' + } # type: Dict + + attribute_map = { + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None): + # type: (Optional[str]) -> None + """ + + :param name: Name of the request. + :type name: (optional) str + """ + self.__discriminator_value = None # type: str + + 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, MusicRequest): + 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_wordmark.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_wordmark.py new file mode 100644 index 0000000..dd91880 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/music_wordmark.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 + from datetime import datetime + + +class MusicWordmark(object): + """ + + :param uri: Wordmark logo to be used by devices with displays. + :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 + """ + + :param uri: Wordmark logo to be used by devices with displays. + :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, MusicWordmark): + 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 new file mode 100644 index 0000000..82de2b7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/permission_items.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.permission_name import PermissionName + + +class PermissionItems(object): + """ + + :param name: + :type name: (optional) ask_smapi_model.v1.skill.manifest.permission_name.PermissionName + + """ + deserialized_types = { + 'name': 'ask_smapi_model.v1.skill.manifest.permission_name.PermissionName' + } # type: Dict + + attribute_map = { + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None): + # type: (Optional[PermissionName]) -> None + """ + + :param name: + :type name: (optional) ask_smapi_model.v1.skill.manifest.permission_name.PermissionName + """ + self.__discriminator_value = None # type: str + + 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, PermissionItems): + 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_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/permission_name.py new file mode 100644 index 0000000..86b2ec7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/permission_name.py @@ -0,0 +1,95 @@ +# 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 PermissionName(Enum): + """ + Name of the required permission. + + + + 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_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] + """ + 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_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_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_devices_all_notifications_write = "alexa::devices:all:notifications:write" + alexa_devices_all_notifications_urgent_write = "alexa::devices:all:notifications:urgent:write" + alexa_alerts_reminders_skill_readwrite = "alexa::alerts:reminders:skill:readwrite" + alexa_alerts_timers_skill_readwrite = "alexa::alerts:timers:skill:readwrite" + 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_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" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, PermissionName): + 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/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..3c134ad --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/region.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpoint + + +class Region(object): + """ + Defines the structure for regional information. + + + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint + + """ + deserialized_types = { + 'endpoint': 'ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint' + } # type: Dict + + attribute_map = { + 'endpoint': 'endpoint' + } # type: Dict + supports_multiple_types = False + + def __init__(self, endpoint=None): + # type: (Optional[SkillManifestEndpoint]) -> None + """Defines the structure for regional information. + + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint + """ + self.__discriminator_value = None # type: str + + self.endpoint = endpoint + + 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, Region): + 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/request.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/request.py new file mode 100644 index 0000000..4d675c4 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/request.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.request_name import RequestName + + +class Request(object): + """ + + :param name: + :type name: (optional) ask_smapi_model.v1.skill.manifest.request_name.RequestName + + """ + deserialized_types = { + 'name': 'ask_smapi_model.v1.skill.manifest.request_name.RequestName' + } # type: Dict + + attribute_map = { + 'name': 'name' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None): + # type: (Optional[RequestName]) -> None + """ + + :param name: + :type name: (optional) ask_smapi_model.v1.skill.manifest.request_name.RequestName + """ + self.__discriminator_value = None # type: str + + 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, Request): + 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/request_name.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/request_name.py new file mode 100644 index 0000000..6227a3a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/request_name.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 + from datetime import datetime + + +class RequestName(Enum): + """ + Name of the request. + + + + Allowed enum values: [Search, Create, Update] + """ + Search = "Search" + Create = "Create" + Update = "Update" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, RequestName): + 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 new file mode 100644 index 0000000..730da95 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.skill_manifest_publishing_information import SkillManifestPublishingInformation + from ask_smapi_model.v1.skill.manifest.skill_manifest_apis import SkillManifestApis + from ask_smapi_model.v1.skill.manifest.permission_items import PermissionItems + from ask_smapi_model.v1.skill.manifest.skill_manifest_events import SkillManifestEvents + from ask_smapi_model.v1.skill.manifest.skill_manifest_privacy_and_compliance import SkillManifestPrivacyAndCompliance + + +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 publishing_information: + :type publishing_information: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_publishing_information.SkillManifestPublishingInformation + :param privacy_and_compliance: + :type privacy_and_compliance: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_privacy_and_compliance.SkillManifestPrivacyAndCompliance + :param events: + :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 apis: + :type apis: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_apis.SkillManifestApis + + """ + deserialized_types = { + 'manifest_version': 'str', + '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]', + 'apis': 'ask_smapi_model.v1.skill.manifest.skill_manifest_apis.SkillManifestApis' + } # type: Dict + + attribute_map = { + 'manifest_version': 'manifestVersion', + 'publishing_information': 'publishingInformation', + 'privacy_and_compliance': 'privacyAndCompliance', + 'events': 'events', + 'permissions': 'permissions', + '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[SkillManifestPublishingInformation], Optional[SkillManifestPrivacyAndCompliance], Optional[SkillManifestEvents], Optional[List[PermissionItems]], Optional[SkillManifestApis]) -> None + """Defines the structure for a skill's metadata. + + :param manifest_version: Version of the skill manifest. + :type manifest_version: (optional) str + :param publishing_information: + :type publishing_information: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_publishing_information.SkillManifestPublishingInformation + :param privacy_and_compliance: + :type privacy_and_compliance: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_privacy_and_compliance.SkillManifestPrivacyAndCompliance + :param events: + :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 apis: + :type apis: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_apis.SkillManifestApis + """ + self.__discriminator_value = None # type: str + + self.manifest_version = manifest_version + self.publishing_information = publishing_information + self.privacy_and_compliance = privacy_and_compliance + self.events = events + self.permissions = permissions + self.apis = apis + + 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, SkillManifest): + 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_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_apis.py new file mode 100644 index 0000000..b5362b7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_apis.py @@ -0,0 +1,165 @@ +# 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.manifest.video_apis import VideoApis + from ask_smapi_model.v1.skill.manifest.smart_home_apis import SmartHomeApis + from ask_smapi_model.v1.skill.manifest.flash_briefing_apis import FlashBriefingApis + from ask_smapi_model.v1.skill.manifest.music_apis import MusicApis + from ask_smapi_model.v1.skill.manifest.alexa_for_business_apis import AlexaForBusinessApis + from ask_smapi_model.v1.skill.manifest.health_apis import HealthApis + from ask_smapi_model.v1.skill.manifest.custom_apis import CustomApis + from ask_smapi_model.v1.skill.manifest.house_hold_list import HouseHoldList + + +class SkillManifestApis(object): + """ + 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 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 + + """ + deserialized_types = { + 'flash_briefing': 'ask_smapi_model.v1.skill.manifest.flash_briefing_apis.FlashBriefingApis', + 'custom': 'ask_smapi_model.v1.skill.manifest.custom_apis.CustomApis', + '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' + } # type: Dict + + attribute_map = { + 'flash_briefing': 'flashBriefing', + 'custom': 'custom', + 'smart_home': 'smartHome', + 'video': 'video', + 'alexa_for_business': 'alexaForBusiness', + 'health': 'health', + 'household_list': 'householdList', + 'music': 'music' + } # 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[FlashBriefingApis], Optional[CustomApis], Optional[SmartHomeApis], Optional[VideoApis], Optional[AlexaForBusinessApis], Optional[HealthApis], Optional[HouseHoldList], Optional[MusicApis]) -> 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 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 + """ + self.__discriminator_value = None # type: str + + self.flash_briefing = flash_briefing + self.custom = custom + 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 + + 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, SkillManifestApis): + 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/skill_manifest_custom_task.py new file mode 100644 index 0000000..98e13e2 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_custom_task.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 + from datetime import datetime + + +class SkillManifestCustomTask(object): + """ + Defines the name and version of the task that the skill wants to handle. + + + :param name: Name of the task. + :type name: (optional) str + :param version: Version of the task. + :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, version=None): + # type: (Optional[str], Optional[str]) -> None + """Defines the name and version of the task that the skill wants to handle. + + :param name: Name of the task. + :type name: (optional) str + :param version: Version of the task. + :type version: (optional) str + """ + self.__discriminator_value = None # type: str + + self.name = name + 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, SkillManifestCustomTask): + 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_endpoint.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_endpoint.py new file mode 100644 index 0000000..e740aef --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_endpoint.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.ssl_certificate_type import SSLCertificateType + + +class SkillManifestEndpoint(object): + """ + 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. + :type uri: (optional) str + :param request_envelope_version_supported: Supported version of the requestEnvelope. + :type request_envelope_version_supported: (optional) str + :param ssl_certificate_type: + :type ssl_certificate_type: (optional) ask_smapi_model.v1.skill.manifest.ssl_certificate_type.SSLCertificateType + + """ + deserialized_types = { + 'uri': 'str', + 'request_envelope_version_supported': 'str', + 'ssl_certificate_type': 'ask_smapi_model.v1.skill.manifest.ssl_certificate_type.SSLCertificateType' + } # type: Dict + + attribute_map = { + 'uri': 'uri', + 'request_envelope_version_supported': 'requestEnvelopeVersionSupported', + 'ssl_certificate_type': 'sslCertificateType' + } # type: Dict + supports_multiple_types = False + + def __init__(self, uri=None, request_envelope_version_supported=None, ssl_certificate_type=None): + # type: (Optional[str], Optional[str], Optional[SSLCertificateType]) -> 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. + :type uri: (optional) str + :param request_envelope_version_supported: Supported version of the requestEnvelope. + :type request_envelope_version_supported: (optional) str + :param ssl_certificate_type: + :type ssl_certificate_type: (optional) ask_smapi_model.v1.skill.manifest.ssl_certificate_type.SSLCertificateType + """ + self.__discriminator_value = None # type: str + + self.uri = uri + self.request_envelope_version_supported = request_envelope_version_supported + self.ssl_certificate_type = ssl_certificate_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, SkillManifestEndpoint): + 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_envelope.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_envelope.py new file mode 100644 index 0000000..1efb2bb --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_envelope.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.skill_manifest import SkillManifest + + +class SkillManifestEnvelope(object): + """ + + :param manifest: + :type manifest: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest.SkillManifest + + """ + deserialized_types = { + 'manifest': 'ask_smapi_model.v1.skill.manifest.skill_manifest.SkillManifest' + } # type: Dict + + attribute_map = { + 'manifest': 'manifest' + } # type: Dict + supports_multiple_types = False + + def __init__(self, manifest=None): + # type: (Optional[SkillManifest]) -> None + """ + + :param manifest: + :type manifest: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest.SkillManifest + """ + self.__discriminator_value = None # type: str + + self.manifest = manifest + + 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, SkillManifestEnvelope): + 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_events.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_events.py new file mode 100644 index 0000000..93c0193 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_events.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.event_publications import EventPublications + from ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint import SkillManifestEndpoint + from ask_smapi_model.v1.skill.manifest.region import Region + from ask_smapi_model.v1.skill.manifest.event_name import EventName + + +class SkillManifestEvents(object): + """ + 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. + :type subscriptions: (optional) list[ask_smapi_model.v1.skill.manifest.event_name.EventName] + :param publications: + :type publications: (optional) list[ask_smapi_model.v1.skill.manifest.event_publications.EventPublications] + :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: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint + + """ + deserialized_types = { + 'subscriptions': 'list[ask_smapi_model.v1.skill.manifest.event_name.EventName]', + 'publications': 'list[ask_smapi_model.v1.skill.manifest.event_publications.EventPublications]', + 'regions': 'dict(str, ask_smapi_model.v1.skill.manifest.region.Region)', + 'endpoint': 'ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint' + } # type: Dict + + attribute_map = { + 'subscriptions': 'subscriptions', + 'publications': 'publications', + 'regions': 'regions', + 'endpoint': 'endpoint' + } # type: Dict + supports_multiple_types = False + + def __init__(self, subscriptions=None, publications=None, regions=None, endpoint=None): + # type: (Optional[List[EventName]], Optional[List[EventPublications]], Optional[Dict[str, Region]], Optional[SkillManifestEndpoint]) -> 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. + :type subscriptions: (optional) list[ask_smapi_model.v1.skill.manifest.event_name.EventName] + :param publications: + :type publications: (optional) list[ask_smapi_model.v1.skill.manifest.event_publications.EventPublications] + :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: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.skill_manifest_endpoint.SkillManifestEndpoint + """ + self.__discriminator_value = None # type: str + + self.subscriptions = subscriptions + self.publications = publications + self.regions = regions + self.endpoint = endpoint + + 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, SkillManifestEvents): + 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_localized_privacy_and_compliance.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_privacy_and_compliance.py new file mode 100644 index 0000000..d22d27a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_privacy_and_compliance.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 + from datetime import datetime + + +class SkillManifestLocalizedPrivacyAndCompliance(object): + """ + Defines the structure for locale specific privacy & compliance information in the skill manifest. + + + :param privacy_policy_url: Link to the privacy policy that applies to this skill. + :type privacy_policy_url: (optional) str + :param terms_of_use_url: link to the terms of use document for this skill + :type terms_of_use_url: (optional) str + + """ + deserialized_types = { + 'privacy_policy_url': 'str', + 'terms_of_use_url': 'str' + } # type: Dict + + attribute_map = { + 'privacy_policy_url': 'privacyPolicyUrl', + 'terms_of_use_url': 'termsOfUseUrl' + } # type: Dict + supports_multiple_types = False + + def __init__(self, privacy_policy_url=None, terms_of_use_url=None): + # type: (Optional[str], Optional[str]) -> None + """Defines the structure for locale specific privacy & compliance information in the skill manifest. + + :param privacy_policy_url: Link to the privacy policy that applies to this skill. + :type privacy_policy_url: (optional) str + :param terms_of_use_url: link to the terms of use document for this skill + :type terms_of_use_url: (optional) str + """ + self.__discriminator_value = None # type: str + + self.privacy_policy_url = privacy_policy_url + self.terms_of_use_url = terms_of_use_url + + 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, SkillManifestLocalizedPrivacyAndCompliance): + 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_localized_publishing_information.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_publishing_information.py new file mode 100644 index 0000000..c36f9ed --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_localized_publishing_information.py @@ -0,0 +1,157 @@ +# 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 SkillManifestLocalizedPublishingInformation(object): + """ + 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. + :type name: (optional) str + :param small_icon_uri: URL to a small icon for the skill, which is shown in the list of skills (108x108px). + :type small_icon_uri: (optional) str + :param large_icon_uri: URL to a large icon that represents this skill (512x512px). + :type large_icon_uri: (optional) str + :param summary: Summary description of the skill, which is shown when viewing the list of skills. + :type summary: (optional) str + :param description: A full description explaining the skill’s core functionality and any prerequisites to using it (such as additional hardware, software, or accounts). For a Flash Briefing skill, you must list the feeds for the skill. + :type description: (optional) str + :param updates_description: Updates description of the skill's new features and fixes in the version. Should describe changes in the revisions of the skill. + :type updates_description: (optional) str + :param example_phrases: Three example phrases that illustrate how users can invoke your skill. For accuracy, these phrases must come directly from your sample utterances. + :type example_phrases: (optional) list[str] + :param keywords: Sample keyword phrases that describe the skill. + :type keywords: (optional) list[str] + + """ + deserialized_types = { + 'name': 'str', + 'small_icon_uri': 'str', + 'large_icon_uri': 'str', + 'summary': 'str', + 'description': 'str', + 'updates_description': 'str', + 'example_phrases': 'list[str]', + 'keywords': 'list[str]' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'small_icon_uri': 'smallIconUri', + 'large_icon_uri': 'largeIconUri', + 'summary': 'summary', + 'description': 'description', + 'updates_description': 'updatesDescription', + 'example_phrases': 'examplePhrases', + 'keywords': 'keywords' + } # 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 + """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. + :type name: (optional) str + :param small_icon_uri: URL to a small icon for the skill, which is shown in the list of skills (108x108px). + :type small_icon_uri: (optional) str + :param large_icon_uri: URL to a large icon that represents this skill (512x512px). + :type large_icon_uri: (optional) str + :param summary: Summary description of the skill, which is shown when viewing the list of skills. + :type summary: (optional) str + :param description: A full description explaining the skill’s core functionality and any prerequisites to using it (such as additional hardware, software, or accounts). For a Flash Briefing skill, you must list the feeds for the skill. + :type description: (optional) str + :param updates_description: Updates description of the skill's new features and fixes in the version. Should describe changes in the revisions of the skill. + :type updates_description: (optional) str + :param example_phrases: Three example phrases that illustrate how users can invoke your skill. For accuracy, these phrases must come directly from your sample utterances. + :type example_phrases: (optional) list[str] + :param keywords: Sample keyword phrases that describe the skill. + :type keywords: (optional) list[str] + """ + self.__discriminator_value = None # type: str + + self.name = name + self.small_icon_uri = small_icon_uri + self.large_icon_uri = large_icon_uri + self.summary = summary + self.description = description + self.updates_description = updates_description + self.example_phrases = example_phrases + self.keywords = keywords + + 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, SkillManifestLocalizedPublishingInformation): + 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_privacy_and_compliance.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_privacy_and_compliance.py new file mode 100644 index 0000000..5dfc6ae --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_privacy_and_compliance.py @@ -0,0 +1,159 @@ +# 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.manifest.skill_manifest_localized_privacy_and_compliance import SkillManifestLocalizedPrivacyAndCompliance + from ask_smapi_model.v1.skill.manifest.critical_data_handling import CriticalDataHandling + + +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. + :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 + :param uses_personal_info: True if the skill collects users' personal information false otherwise. + :type uses_personal_info: (optional) bool + :param is_child_directed: True if the skill is directed to or targets children under the age of 13/16 false otherwise. + :type is_child_directed: (optional) bool + :param is_export_compliant: True if it is certified that the skill may be imported to and exported from the United States and all other countries and regions in which Amazon operate its program or in which skill owner have authorized sales to end users (without the need for Amazon to obtain any license or clearance or take any other action) and is in full compliance with all applicable laws and regulations governing imports and export including those applicable to software that makes use of encryption technology. + :type is_export_compliant: (optional) bool + :param contains_ads: True if the skill contains advertising false otherwise. + :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 critical_data_handling: + :type critical_data_handling: (optional) ask_smapi_model.v1.skill.manifest.critical_data_handling.CriticalDataHandling + + """ + deserialized_types = { + 'locales': 'dict(str, ask_smapi_model.v1.skill.manifest.skill_manifest_localized_privacy_and_compliance.SkillManifestLocalizedPrivacyAndCompliance)', + 'allows_purchases': 'bool', + 'uses_personal_info': 'bool', + 'is_child_directed': 'bool', + 'is_export_compliant': 'bool', + 'contains_ads': 'bool', + 'uses_health_info': 'bool', + 'critical_data_handling': 'ask_smapi_model.v1.skill.manifest.critical_data_handling.CriticalDataHandling' + } # type: Dict + + attribute_map = { + 'locales': 'locales', + 'allows_purchases': 'allowsPurchases', + 'uses_personal_info': 'usesPersonalInfo', + 'is_child_directed': 'isChildDirected', + 'is_export_compliant': 'isExportCompliant', + 'contains_ads': 'containsAds', + 'uses_health_info': 'usesHealthInfo', + 'critical_data_handling': 'criticalDataHandling' + } # 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, critical_data_handling=None): + # type: (Optional[Dict[str, SkillManifestLocalizedPrivacyAndCompliance]], Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[bool], Optional[CriticalDataHandling]) -> 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. + :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 + :param uses_personal_info: True if the skill collects users' personal information false otherwise. + :type uses_personal_info: (optional) bool + :param is_child_directed: True if the skill is directed to or targets children under the age of 13/16 false otherwise. + :type is_child_directed: (optional) bool + :param is_export_compliant: True if it is certified that the skill may be imported to and exported from the United States and all other countries and regions in which Amazon operate its program or in which skill owner have authorized sales to end users (without the need for Amazon to obtain any license or clearance or take any other action) and is in full compliance with all applicable laws and regulations governing imports and export including those applicable to software that makes use of encryption technology. + :type is_export_compliant: (optional) bool + :param contains_ads: True if the skill contains advertising false otherwise. + :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 critical_data_handling: + :type critical_data_handling: (optional) ask_smapi_model.v1.skill.manifest.critical_data_handling.CriticalDataHandling + """ + self.__discriminator_value = None # type: str + + self.locales = locales + self.allows_purchases = allows_purchases + self.uses_personal_info = uses_personal_info + self.is_child_directed = is_child_directed + self.is_export_compliant = is_export_compliant + self.contains_ads = contains_ads + self.uses_health_info = uses_health_info + self.critical_data_handling = critical_data_handling + + 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, SkillManifestPrivacyAndCompliance): + 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_publishing_information.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_publishing_information.py new file mode 100644 index 0000000..ea33226 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/skill_manifest_publishing_information.py @@ -0,0 +1,168 @@ +# 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.manifest.skill_manifest_localized_publishing_information import SkillManifestLocalizedPublishingInformation + from ask_smapi_model.v1.skill.manifest.manifest_gadget_support import ManifestGadgetSupport + from ask_smapi_model.v1.skill.manifest.distribution_mode import DistributionMode + from ask_smapi_model.v1.skill.manifest.distribution_countries import DistributionCountries + + +class SkillManifestPublishingInformation(object): + """ + 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. + :type name: (optional) str + :param description: Description of the skill's purpose and feature and how it works. Should describe any prerequisites like hardware or account requirements and detailed steps for the customer to get started. For Flash Briefing skill list the feeds offered within the skill. Use a conversational tone and correct grammar and punctuation. This description displays to customers on the skill detail card in the Alexa app. + :type description: (optional) str + :param locales: Defines the structure for locale specific publishing information in the skill manifest. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.skill_manifest_localized_publishing_information.SkillManifestLocalizedPublishingInformation) + :param is_available_worldwide: True if the skill should be distributed in all countries where Amazon distributes skill false otherwise. + :type is_available_worldwide: (optional) bool + :param distribution_mode: + :type distribution_mode: (optional) ask_smapi_model.v1.skill.manifest.distribution_mode.DistributionMode + :param gadget_support: + :type gadget_support: (optional) ask_smapi_model.v1.skill.manifest.manifest_gadget_support.ManifestGadgetSupport + :param testing_instructions: Special instructions provided by the developer to test the skill. + :type testing_instructions: (optional) str + :param category: Category that best describes a skill. Indicates the filter category for the skill in the Alexa App. + :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] + + """ + deserialized_types = { + 'name': 'str', + 'description': 'str', + 'locales': 'dict(str, ask_smapi_model.v1.skill.manifest.skill_manifest_localized_publishing_information.SkillManifestLocalizedPublishingInformation)', + 'is_available_worldwide': 'bool', + 'distribution_mode': 'ask_smapi_model.v1.skill.manifest.distribution_mode.DistributionMode', + '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]' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'locales': 'locales', + 'is_available_worldwide': 'isAvailableWorldwide', + 'distribution_mode': 'distributionMode', + 'gadget_support': 'gadgetSupport', + 'testing_instructions': 'testingInstructions', + 'category': 'category', + 'distribution_countries': 'distributionCountries' + } # 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, SkillManifestLocalizedPublishingInformation]], Optional[bool], Optional[DistributionMode], Optional[ManifestGadgetSupport], Optional[str], Optional[str], Optional[List[DistributionCountries]]) -> 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. + :type name: (optional) str + :param description: Description of the skill's purpose and feature and how it works. Should describe any prerequisites like hardware or account requirements and detailed steps for the customer to get started. For Flash Briefing skill list the feeds offered within the skill. Use a conversational tone and correct grammar and punctuation. This description displays to customers on the skill detail card in the Alexa app. + :type description: (optional) str + :param locales: Defines the structure for locale specific publishing information in the skill manifest. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.skill_manifest_localized_publishing_information.SkillManifestLocalizedPublishingInformation) + :param is_available_worldwide: True if the skill should be distributed in all countries where Amazon distributes skill false otherwise. + :type is_available_worldwide: (optional) bool + :param distribution_mode: + :type distribution_mode: (optional) ask_smapi_model.v1.skill.manifest.distribution_mode.DistributionMode + :param gadget_support: + :type gadget_support: (optional) ask_smapi_model.v1.skill.manifest.manifest_gadget_support.ManifestGadgetSupport + :param testing_instructions: Special instructions provided by the developer to test the skill. + :type testing_instructions: (optional) str + :param category: Category that best describes a skill. Indicates the filter category for the skill in the Alexa App. + :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] + """ + self.__discriminator_value = None # type: str + + self.name = name + self.description = description + self.locales = locales + self.is_available_worldwide = is_available_worldwide + self.distribution_mode = distribution_mode + self.gadget_support = gadget_support + self.testing_instructions = testing_instructions + self.category = category + self.distribution_countries = distribution_countries + + 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, SkillManifestPublishingInformation): + 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/smart_home_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_apis.py new file mode 100644 index 0000000..3ddf5f4 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_apis.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.smart_home_protocol import SmartHomeProtocol + from ask_smapi_model.v1.skill.manifest.lambda_region import LambdaRegion + from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpoint + + +class SmartHomeApis(object): + """ + Defines the structure for 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) + :param endpoint: + :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 + + """ + 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' + } # type: Dict + + attribute_map = { + 'regions': 'regions', + 'endpoint': 'endpoint', + 'protocol_version': 'protocolVersion' + } # type: Dict + supports_multiple_types = False + + def __init__(self, regions=None, endpoint=None, protocol_version=None): + # type: (Optional[Dict[str, LambdaRegion]], Optional[LambdaEndpoint], Optional[SmartHomeProtocol]) -> None + """Defines the structure for 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) + :param endpoint: + :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 + """ + self.__discriminator_value = None # type: str + + self.regions = regions + self.endpoint = endpoint + self.protocol_version = protocol_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, SmartHomeApis): + 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/smart_home_protocol.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_protocol.py new file mode 100644 index 0000000..3237073 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/smart_home_protocol.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 + from datetime import datetime + + +class SmartHomeProtocol(Enum): + """ + Version of the Smart Home API. Default and recommended value is '3'. You may create a skill with version '2' for testing migration to version '3', but a skill submission using version '2' will not be certified. + + + + Allowed enum values: [_1, _2, _2_5, _2_9, _3] + """ + _1 = "1" + _2 = "2" + _2_5 = "2.5" + _2_9 = "2.9" + _3 = "3" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SmartHomeProtocol): + 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 new file mode 100644 index 0000000..a6def34 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/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 + from datetime import datetime + + +class SSLCertificateType(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, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SSLCertificateType): + 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/up_channel_items.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/up_channel_items.py new file mode 100644 index 0000000..fc8ff46 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/up_channel_items.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 + from datetime import datetime + + +class UpChannelItems(object): + """ + + :param object_type: Use \\\"SNS\\\" for this field. + :type object_type: (optional) str + :param uri: SNS Amazon Resource Name (ARN) for video skill through which video partner can send events to Alexa. + :type uri: (optional) str + + """ + deserialized_types = { + 'object_type': 'str', + 'uri': 'str' + } # type: Dict + + attribute_map = { + 'object_type': 'type', + 'uri': 'uri' + } # type: Dict + supports_multiple_types = False + + def __init__(self, object_type=None, uri=None): + # type: (Optional[str], Optional[str]) -> None + """ + + :param object_type: Use \\\"SNS\\\" for this field. + :type object_type: (optional) str + :param uri: SNS Amazon Resource Name (ARN) for video skill through which video partner can send events to Alexa. + :type uri: (optional) str + """ + self.__discriminator_value = None # type: str + + self.object_type = object_type + 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, UpChannelItems): + 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/version.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/version.py new file mode 100644 index 0000000..508589a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/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 + from datetime import datetime + + +class Version(Enum): + """ + Version of the interface. + + + + Allowed enum values: [_1] + """ + _1 = "1" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, Version): + 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_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis.py new file mode 100644 index 0000000..d6116d2 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.video_country_info import VideoCountryInfo + from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpoint + from ask_smapi_model.v1.skill.manifest.video_region import VideoRegion + from ask_smapi_model.v1.skill.manifest.video_apis_locale import VideoApisLocale + + +class VideoApis(object): + """ + Defines the structure for video api of the skill. + + + :param regions: Defines the structure for region information. + :type regions: (optional) dict(str, ask_smapi_model.v1.skill.manifest.video_region.VideoRegion) + :param locales: Defines the structure for the locale specific video api information. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.video_apis_locale.VideoApisLocale) + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint + :param countries: Object that contains <country> Objects for each supported country. + :type countries: (optional) dict(str, ask_smapi_model.v1.skill.manifest.video_country_info.VideoCountryInfo) + + """ + deserialized_types = { + 'regions': 'dict(str, ask_smapi_model.v1.skill.manifest.video_region.VideoRegion)', + 'locales': 'dict(str, ask_smapi_model.v1.skill.manifest.video_apis_locale.VideoApisLocale)', + 'endpoint': 'ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint', + 'countries': 'dict(str, ask_smapi_model.v1.skill.manifest.video_country_info.VideoCountryInfo)' + } # type: Dict + + attribute_map = { + 'regions': 'regions', + 'locales': 'locales', + 'endpoint': 'endpoint', + 'countries': 'countries' + } # type: Dict + supports_multiple_types = False + + def __init__(self, regions=None, locales=None, endpoint=None, countries=None): + # type: (Optional[Dict[str, VideoRegion]], Optional[Dict[str, VideoApisLocale]], Optional[LambdaEndpoint], Optional[Dict[str, VideoCountryInfo]]) -> None + """Defines the structure for video api of the skill. + + :param regions: Defines the structure for region information. + :type regions: (optional) dict(str, ask_smapi_model.v1.skill.manifest.video_region.VideoRegion) + :param locales: Defines the structure for the locale specific video api information. + :type locales: (optional) dict(str, ask_smapi_model.v1.skill.manifest.video_apis_locale.VideoApisLocale) + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint + :param countries: Object that contains <country> Objects for each supported country. + :type countries: (optional) dict(str, ask_smapi_model.v1.skill.manifest.video_country_info.VideoCountryInfo) + """ + self.__discriminator_value = None # type: str + + self.regions = regions + self.locales = locales + self.endpoint = endpoint + self.countries = countries + + 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, VideoApis): + 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_apis_locale.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis_locale.py new file mode 100644 index 0000000..e9614b9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_apis_locale.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.video_catalog_info import VideoCatalogInfo + + +class VideoApisLocale(object): + """ + 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] + + """ + 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]' + } # type: Dict + + attribute_map = { + 'video_provider_targeting_names': 'videoProviderTargetingNames', + 'video_provider_logo_uri': 'videoProviderLogoUri', + 'catalog_information': 'catalogInformation' + } # 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[VideoCatalogInfo]]) -> 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] + """ + 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 + + 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, VideoApisLocale): + 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_app_interface.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_app_interface.py new file mode 100644 index 0000000..fb78023 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_app_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 + from datetime import datetime + + +class VideoAppInterface(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 = "VIDEO" # type: str + + self.object_type = self.__discriminator_value + super(VideoAppInterface, 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, VideoAppInterface): + 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_catalog_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_catalog_info.py new file mode 100644 index 0000000..97dc2a9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_catalog_info.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 + from datetime import datetime + + +class VideoCatalogInfo(object): + """ + + :param source_id: + :type source_id: (optional) str + + """ + deserialized_types = { + 'source_id': 'str' + } # type: Dict + + attribute_map = { + 'source_id': 'sourceId' + } # type: Dict + supports_multiple_types = False + + def __init__(self, source_id=None): + # type: (Optional[str]) -> None + """ + + :param source_id: + :type source_id: (optional) str + """ + self.__discriminator_value = None # type: str + + self.source_id = source_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, VideoCatalogInfo): + 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_country_info.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_country_info.py new file mode 100644 index 0000000..b1a45be --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_country_info.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.video_catalog_info import VideoCatalogInfo + + +class VideoCountryInfo(object): + """ + Defines the structure of per-country video info in the skill manifest. + + + :param catalog_information: + :type catalog_information: (optional) list[ask_smapi_model.v1.skill.manifest.video_catalog_info.VideoCatalogInfo] + + """ + deserialized_types = { + 'catalog_information': 'list[ask_smapi_model.v1.skill.manifest.video_catalog_info.VideoCatalogInfo]' + } # type: Dict + + attribute_map = { + 'catalog_information': 'catalogInformation' + } # type: Dict + supports_multiple_types = False + + def __init__(self, catalog_information=None): + # type: (Optional[List[VideoCatalogInfo]]) -> None + """Defines the structure of per-country video info in the skill manifest. + + :param catalog_information: + :type catalog_information: (optional) list[ask_smapi_model.v1.skill.manifest.video_catalog_info.VideoCatalogInfo] + """ + self.__discriminator_value = None # type: str + + self.catalog_information = catalog_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, VideoCountryInfo): + 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_region.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_region.py new file mode 100644 index 0000000..aefda99 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/video_region.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.up_channel_items import UpChannelItems + from ask_smapi_model.v1.skill.manifest.lambda_endpoint import LambdaEndpoint + + +class VideoRegion(object): + """ + Defines the structure for endpoint information. + + + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint + :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', + 'upchannel': 'list[ask_smapi_model.v1.skill.manifest.up_channel_items.UpChannelItems]' + } # type: Dict + + attribute_map = { + 'endpoint': 'endpoint', + 'upchannel': 'upchannel' + } # type: Dict + supports_multiple_types = False + + def __init__(self, endpoint=None, upchannel=None): + # type: (Optional[LambdaEndpoint], Optional[List[UpChannelItems]]) -> None + """Defines the structure for endpoint information. + + :param endpoint: + :type endpoint: (optional) ask_smapi_model.v1.skill.manifest.lambda_endpoint.LambdaEndpoint + :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] + """ + self.__discriminator_value = None # type: str + + self.endpoint = endpoint + self.upchannel = upchannel + + 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, VideoRegion): + 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/viewport_mode.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_mode.py new file mode 100644 index 0000000..ced0ef2 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_mode.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 + from datetime import datetime + + +class ViewportMode(Enum): + """ + Defines the mode of viewport that comply with this specification. E.g. HUB TV. + + + + Allowed enum values: [HUB, TV] + """ + HUB = "HUB" + TV = "TV" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ViewportMode): + 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/viewport_shape.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_shape.py new file mode 100644 index 0000000..9c7c64c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_shape.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 + from datetime import datetime + + +class ViewportShape(Enum): + """ + Defines the shape of the device's viewport. + + + + Allowed enum values: [RECTANGLE, ROUND] + """ + RECTANGLE = "RECTANGLE" + ROUND = "ROUND" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ViewportShape): + 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/viewport_specification.py b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_specification.py new file mode 100644 index 0000000..691ac7a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/manifest/viewport_specification.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 + from datetime import datetime + from ask_smapi_model.v1.skill.manifest.viewport_shape import ViewportShape + from ask_smapi_model.v1.skill.manifest.viewport_mode import ViewportMode + + +class ViewportSpecification(object): + """ + Defines a viewport specification. + + + :param mode: + :type mode: (optional) ask_smapi_model.v1.skill.manifest.viewport_mode.ViewportMode + :param shape: + :type shape: (optional) ask_smapi_model.v1.skill.manifest.viewport_shape.ViewportShape + :param min_width: Defines the minimum width of viewport that comply with this specification. + :type min_width: (optional) int + :param max_width: Defines the maximum width of viewport that comply with this specification. + :type max_width: (optional) int + :param min_height: Defines the minimum height of viewport that comply with this specification. + :type min_height: (optional) int + :param max_height: Defines the maximum height of viewport that comply with this specification. + :type max_height: (optional) int + + """ + deserialized_types = { + 'mode': 'ask_smapi_model.v1.skill.manifest.viewport_mode.ViewportMode', + 'shape': 'ask_smapi_model.v1.skill.manifest.viewport_shape.ViewportShape', + 'min_width': 'int', + 'max_width': 'int', + 'min_height': 'int', + 'max_height': 'int' + } # type: Dict + + attribute_map = { + 'mode': 'mode', + 'shape': 'shape', + 'min_width': 'minWidth', + 'max_width': 'maxWidth', + 'min_height': 'minHeight', + 'max_height': 'maxHeight' + } # type: Dict + 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[ViewportMode], Optional[ViewportShape], Optional[int], Optional[int], Optional[int], Optional[int]) -> None + """Defines a viewport specification. + + :param mode: + :type mode: (optional) ask_smapi_model.v1.skill.manifest.viewport_mode.ViewportMode + :param shape: + :type shape: (optional) ask_smapi_model.v1.skill.manifest.viewport_shape.ViewportShape + :param min_width: Defines the minimum width of viewport that comply with this specification. + :type min_width: (optional) int + :param max_width: Defines the maximum width of viewport that comply with this specification. + :type max_width: (optional) int + :param min_height: Defines the minimum height of viewport that comply with this specification. + :type min_height: (optional) int + :param max_height: Defines the maximum height of viewport that comply with this specification. + :type max_height: (optional) int + """ + self.__discriminator_value = None # type: str + + self.mode = mode + self.shape = shape + self.min_width = min_width + self.max_width = max_width + self.min_height = min_height + self.max_height = max_height + + 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, ViewportSpecification): + 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/metrics/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/__init__.py new file mode 100644 index 0000000..2a147c3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/__init__.py @@ -0,0 +1,21 @@ +# 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 .stage_for_metric import StageForMetric +from .metric import Metric +from .period import Period +from .skill_type import SkillType +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 new file mode 100644 index 0000000..631c384 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/get_metric_data_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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + + +class GetMetricDataResponse(object): + """ + Response object for the API call which contains metrics data. + + + :param metric: The name of metric which customer requested. + :type metric: (optional) str + :param timestamps: The timestamps for the data points. + :type timestamps: (optional) list[datetime] + :param values: The data points for the metric corresponding to Timestamps. + :type values: (optional) list[float] + :param next_token: A token that marks the next batch of returned results. + :type next_token: (optional) str + + """ + deserialized_types = { + 'metric': 'str', + 'timestamps': 'list[datetime]', + 'values': 'list[float]', + 'next_token': 'str' + } # type: Dict + + attribute_map = { + 'metric': 'metric', + 'timestamps': 'timestamps', + 'values': 'values', + 'next_token': 'nextToken' + } # type: Dict + supports_multiple_types = False + + def __init__(self, metric=None, timestamps=None, values=None, next_token=None): + # type: (Optional[str], Optional[List[object]], Optional[List[object]], Optional[str]) -> None + """Response object for the API call which contains metrics data. + + :param metric: The name of metric which customer requested. + :type metric: (optional) str + :param timestamps: The timestamps for the data points. + :type timestamps: (optional) list[datetime] + :param values: The data points for the metric corresponding to Timestamps. + :type values: (optional) list[float] + :param next_token: A token that marks the next batch of returned results. + :type next_token: (optional) str + """ + self.__discriminator_value = None # type: str + + self.metric = metric + self.timestamps = timestamps + self.values = values + 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, GetMetricDataResponse): + 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/metrics/metric.py b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/metric.py new file mode 100644 index 0000000..8c4cbf5 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/metric.py @@ -0,0 +1,74 @@ +# 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 Metric(Enum): + """ + A distinct set of logic which predictably returns a set of data. + + + + Allowed enum values: [uniqueCustomers, totalEnablements, totalUtterances, successfulUtterances, failedUtterances, totalSessions, successfulSessions, incompleteSessions, userEndedSessions, skillEndedSessions] + """ + uniqueCustomers = "uniqueCustomers" + totalEnablements = "totalEnablements" + totalUtterances = "totalUtterances" + successfulUtterances = "successfulUtterances" + failedUtterances = "failedUtterances" + totalSessions = "totalSessions" + successfulSessions = "successfulSessions" + incompleteSessions = "incompleteSessions" + userEndedSessions = "userEndedSessions" + skillEndedSessions = "skillEndedSessions" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, Metric): + 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/metrics/period.py b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/period.py new file mode 100644 index 0000000..b314ae3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/period.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 + from datetime import datetime + + +class Period(Enum): + """ + The aggregation period to use when retrieving the metric, follows ISO_8601#Durations format. + + + + Allowed enum values: [SINGLE, PT15M, PT1H, P1D] + """ + SINGLE = "SINGLE" + PT15M = "PT15M" + PT1H = "PT1H" + P1D = "P1D" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, Period): + 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/metrics/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..c7a3cba --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/skill_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 + from datetime import datetime + + +class SkillType(Enum): + """ + The type of the skill (custom, smartHome and flashBriefing). + + + + Allowed enum values: [custom, smartHome, flashBriefing] + """ + custom = "custom" + smartHome = "smartHome" + flashBriefing = "flashBriefing" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SkillType): + 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/metrics/stage_for_metric.py b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/stage_for_metric.py new file mode 100644 index 0000000..85b56ce --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/metrics/stage_for_metric.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 + from datetime import datetime + + +class StageForMetric(Enum): + """ + The stage of the skill (live, development). + + + + Allowed enum values: [live, development] + """ + live = "live" + development = "development" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, StageForMetric): + 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/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/private/__init__.py new file mode 100644 index 0000000..e6e9f1c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/private/__init__.py @@ -0,0 +1,19 @@ +# 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 .list_private_distribution_accounts_response import ListPrivateDistributionAccountsResponse +from .private_distribution_account import PrivateDistributionAccount +from .accept_status import AcceptStatus diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/private/accept_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/private/accept_status.py new file mode 100644 index 0000000..3348117 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/private/accept_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 + from datetime import datetime + + +class AcceptStatus(Enum): + """ + Enterprise IT administrators' action on the private distribution. + + + + Allowed enum values: [ACCEPTED, PENDING] + """ + ACCEPTED = "ACCEPTED" + PENDING = "PENDING" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, AcceptStatus): + 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/list_private_distribution_accounts_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/private/list_private_distribution_accounts_response.py new file mode 100644 index 0000000..c4948ab --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/private/list_private_distribution_accounts_response.py @@ -0,0 +1,124 @@ +# 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 Links + from ask_smapi_model.v1.skill.private.private_distribution_account import PrivateDistributionAccount + + +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[Links], Optional[List[PrivateDistributionAccount]], 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/private/private_distribution_account.py b/ask-smapi-model/ask_smapi_model/v1/skill/private/private_distribution_account.py new file mode 100644 index 0000000..d113ca3 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/private/private_distribution_account.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 + from datetime import datetime + from ask_smapi_model.v1.skill.private.accept_status import AcceptStatus + + +class PrivateDistributionAccount(object): + """ + Contains information of the private distribution account with given id. + + + :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 + + """ + deserialized_types = { + 'principal': 'str', + 'accept_status': 'ask_smapi_model.v1.skill.private.accept_status.AcceptStatus' + } # type: Dict + + attribute_map = { + 'principal': 'principal', + 'accept_status': 'acceptStatus' + } # type: Dict + supports_multiple_types = False + + def __init__(self, principal=None, accept_status=None): + # type: (Optional[str], Optional[AcceptStatus]) -> None + """Contains information of the private distribution account with given id. + + :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 + """ + self.__discriminator_value = None # type: str + + self.principal = principal + self.accept_status = accept_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, PrivateDistributionAccount): + 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-smapi-model/ask_smapi_model/v1/skill/private/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..bc99a22 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/publication_method.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 + from datetime import datetime + + +class PublicationMethod(Enum): + """ + Determines if the skill should be submitted only for certification and manually publish later or publish immediately after the skill is certified. Omitting the publication method will default to auto publishing. + + + + Allowed enum values: [MANUAL_PUBLISHING, AUTO_PUBLISHING] + """ + MANUAL_PUBLISHING = "MANUAL_PUBLISHING" + AUTO_PUBLISHING = "AUTO_PUBLISHING" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, PublicationMethod): + 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/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/reason.py b/ask-smapi-model/ask_smapi_model/v1/skill/reason.py new file mode 100644 index 0000000..f9149b4 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/reason.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 + from datetime import datetime + + +class Reason(Enum): + """ + The reason to withdraw. + + + + Allowed enum values: [TEST_SKILL, MORE_FEATURES, DISCOVERED_ISSUE, NOT_RECEIVED_CERTIFICATION_FEEDBACK, NOT_INTEND_TO_PUBLISH, OTHER] + """ + TEST_SKILL = "TEST_SKILL" + MORE_FEATURES = "MORE_FEATURES" + DISCOVERED_ISSUE = "DISCOVERED_ISSUE" + NOT_RECEIVED_CERTIFICATION_FEEDBACK = "NOT_RECEIVED_CERTIFICATION_FEEDBACK" + NOT_INTEND_TO_PUBLISH = "NOT_INTEND_TO_PUBLISH" + OTHER = "OTHER" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, Reason): + 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/regional_ssl_certificate.py b/ask-smapi-model/ask_smapi_model/v1/skill/regional_ssl_certificate.py new file mode 100644 index 0000000..d0c2573 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/regional_ssl_certificate.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 + from datetime import datetime + + +class RegionalSSLCertificate(object): + """ + + :param ssl_certificate: + :type ssl_certificate: (optional) str + + """ + deserialized_types = { + 'ssl_certificate': 'str' + } # type: Dict + + attribute_map = { + 'ssl_certificate': 'sslCertificate' + } # type: Dict + supports_multiple_types = False + + def __init__(self, ssl_certificate=None): + # type: (Optional[str]) -> None + """ + + :param ssl_certificate: + :type ssl_certificate: (optional) str + """ + self.__discriminator_value = None # type: str + + self.ssl_certificate = ssl_certificate + + 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, RegionalSSLCertificate): + 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/resource_import_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/resource_import_status.py new file mode 100644 index 0000000..a1023a7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/resource_import_status.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 + from datetime import datetime + from ask_smapi_model.v1.skill.standardized_error import StandardizedError + from ask_smapi_model.v1.skill.action import Action + from ask_smapi_model.v1.skill.response_status import ResponseStatus + + +class ResourceImportStatus(object): + """ + Defines the structure for a resource deployment status. + + + :param name: Resource name. eg. manifest, interactionModels.en_US and so on. + :type name: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.response_status.ResponseStatus + :param action: + :type action: (optional) ask_smapi_model.v1.skill.action.Action + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param warnings: + :type warnings: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + + """ + deserialized_types = { + 'name': 'str', + 'status': 'ask_smapi_model.v1.skill.response_status.ResponseStatus', + 'action': 'ask_smapi_model.v1.skill.action.Action', + 'errors': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]', + 'warnings': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'status': 'status', + 'action': 'action', + 'errors': 'errors', + 'warnings': 'warnings' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, status=None, action=None, errors=None, warnings=None): + # type: (Optional[str], Optional[ResponseStatus], Optional[Action], Optional[List[StandardizedError]], Optional[List[StandardizedError]]) -> None + """Defines the structure for a resource deployment status. + + :param name: Resource name. eg. manifest, interactionModels.en_US and so on. + :type name: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.response_status.ResponseStatus + :param action: + :type action: (optional) ask_smapi_model.v1.skill.action.Action + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param warnings: + :type warnings: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + """ + self.__discriminator_value = None # type: str + + self.name = name + self.status = status + self.action = action + self.errors = errors + self.warnings = warnings + + 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, ResourceImportStatus): + 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/resource_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/resource_status.py new file mode 100644 index 0000000..5a90c12 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/resource_status.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.standardized_error import StandardizedError + from ask_smapi_model.v1.skill.last_update_request import LastUpdateRequest + + +class ResourceStatus(object): + """ + Defines the structure for a resource status. + + + :param last_update_request: + :type last_update_request: (optional) ask_smapi_model.v1.skill.last_update_request.LastUpdateRequest + :param e_tag: An opaque identifier for last successfully updated resource. + :type e_tag: (optional) str + :param version: Version for last successfully built model. + :type version: (optional) str + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param warnings: + :type warnings: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + + """ + deserialized_types = { + 'last_update_request': 'ask_smapi_model.v1.skill.last_update_request.LastUpdateRequest', + 'e_tag': 'str', + 'version': 'str', + 'errors': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]', + 'warnings': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]' + } # type: Dict + + attribute_map = { + 'last_update_request': 'lastUpdateRequest', + 'e_tag': 'eTag', + 'version': 'version', + 'errors': 'errors', + 'warnings': 'warnings' + } # type: Dict + supports_multiple_types = False + + def __init__(self, last_update_request=None, e_tag=None, version=None, errors=None, warnings=None): + # type: (Optional[LastUpdateRequest], Optional[str], Optional[str], Optional[List[StandardizedError]], Optional[List[StandardizedError]]) -> None + """Defines the structure for a resource status. + + :param last_update_request: + :type last_update_request: (optional) ask_smapi_model.v1.skill.last_update_request.LastUpdateRequest + :param e_tag: An opaque identifier for last successfully updated resource. + :type e_tag: (optional) str + :param version: Version for last successfully built model. + :type version: (optional) str + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param warnings: + :type warnings: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + """ + self.__discriminator_value = None # type: str + + self.last_update_request = last_update_request + self.e_tag = e_tag + self.version = version + self.errors = errors + self.warnings = warnings + + 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, ResourceStatus): + 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/response_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/response_status.py new file mode 100644 index 0000000..2fcb1a4 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/response_status.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 + from datetime import datetime + + +class ResponseStatus(Enum): + """ + Status for a Response resource. + + + + Allowed enum values: [FAILED, IN_PROGRESS, SUCCEEDED, ROLLBACK_SUCCEEDED, ROLLBACK_FAILED] + """ + FAILED = "FAILED" + IN_PROGRESS = "IN_PROGRESS" + SUCCEEDED = "SUCCEEDED" + ROLLBACK_SUCCEEDED = "ROLLBACK_SUCCEEDED" + ROLLBACK_FAILED = "ROLLBACK_FAILED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ResponseStatus): + 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/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/__init__.py new file mode 100644 index 0000000..0a66f0b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/__init__.py @@ -0,0 +1,31 @@ +# 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 .simulations_api_response import SimulationsApiResponse +from .session_mode import SessionMode +from .invocations import Invocations +from .metrics import Metrics +from .alexa_execution_info import AlexaExecutionInfo +from .simulations_api_request import SimulationsApiRequest +from .device import Device +from .session import Session +from .invocation_response import InvocationResponse +from .invocation_request import InvocationRequest +from .input import Input +from .alexa_response_content import AlexaResponseContent +from .alexa_response import AlexaResponse +from .simulation_result import SimulationResult +from .simulations_api_response_status import SimulationsApiResponseStatus 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 new file mode 100644 index 0000000..1b4cae4 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_execution_info.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 + from datetime import datetime + from ask_smapi_model.v1.skill.simulations.alexa_response import AlexaResponse + + +class AlexaExecutionInfo(object): + """ + + :param alexa_responses: + :type alexa_responses: (optional) list[ask_smapi_model.v1.skill.simulations.alexa_response.AlexaResponse] + + """ + deserialized_types = { + 'alexa_responses': 'list[ask_smapi_model.v1.skill.simulations.alexa_response.AlexaResponse]' + } # type: Dict + + attribute_map = { + 'alexa_responses': 'alexaResponses' + } # type: Dict + supports_multiple_types = False + + def __init__(self, alexa_responses=None): + # type: (Optional[List[AlexaResponse]]) -> None + """ + + :param alexa_responses: + :type alexa_responses: (optional) list[ask_smapi_model.v1.skill.simulations.alexa_response.AlexaResponse] + """ + self.__discriminator_value = None # type: str + + self.alexa_responses = alexa_responses + + 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, AlexaExecutionInfo): + 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/alexa_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_response.py new file mode 100644 index 0000000..2305026 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_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 + from datetime import datetime + from ask_smapi_model.v1.skill.simulations.alexa_response_content import AlexaResponseContent + + +class AlexaResponse(object): + """ + + :param object_type: The type of Alexa response + :type object_type: (optional) str + :param content: The detail information needs to exposed in this type of Alexa response. + :type content: (optional) ask_smapi_model.v1.skill.simulations.alexa_response_content.AlexaResponseContent + + """ + deserialized_types = { + 'object_type': 'str', + 'content': 'ask_smapi_model.v1.skill.simulations.alexa_response_content.AlexaResponseContent' + } # 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[AlexaResponseContent]) -> None + """ + + :param object_type: The type of Alexa response + :type object_type: (optional) str + :param content: The detail information needs to exposed in this type of Alexa response. + :type content: (optional) ask_smapi_model.v1.skill.simulations.alexa_response_content.AlexaResponseContent + """ + 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, AlexaResponse): + 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/alexa_response_content.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_response_content.py new file mode 100644 index 0000000..9634a8c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/alexa_response_content.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 + from datetime import datetime + + +class AlexaResponseContent(object): + """ + + :param caption: The plain text get from Alexa speech response + :type caption: (optional) str + + """ + deserialized_types = { + 'caption': 'str' + } # type: Dict + + attribute_map = { + 'caption': 'caption' + } # type: Dict + supports_multiple_types = False + + def __init__(self, caption=None): + # type: (Optional[str]) -> None + """ + + :param caption: The plain text get from Alexa speech response + :type caption: (optional) str + """ + self.__discriminator_value = None # type: str + + self.caption = caption + + 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, AlexaResponseContent): + 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/device.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/device.py new file mode 100644 index 0000000..100e8fc --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/device.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 + from datetime import datetime + + +class Device(object): + """ + Model of a virtual device used for simulation. This device object emulates attributes associated with a real Alexa enabled device. + + + :param locale: A valid locale (e.g \"en-US\") for the virtual device used in simulation. + :type locale: (optional) str + + """ + deserialized_types = { + 'locale': 'str' + } # type: Dict + + attribute_map = { + 'locale': 'locale' + } # type: Dict + supports_multiple_types = False + + def __init__(self, locale=None): + # type: (Optional[str]) -> None + """Model of a virtual device used for simulation. This device object emulates attributes associated with a real Alexa enabled device. + + :param locale: A valid locale (e.g \"en-US\") for the virtual device used in simulation. + :type locale: (optional) str + """ + self.__discriminator_value = None # type: str + + self.locale = 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, Device): + 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/input.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/input.py new file mode 100644 index 0000000..b0c0753 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/input.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 + from datetime import datetime + + +class Input(object): + """ + + :param content: A string corresponding to the utterance text of what a customer would say to Alexa. + :type content: (optional) str + + """ + deserialized_types = { + 'content': 'str' + } # type: Dict + + attribute_map = { + 'content': 'content' + } # type: Dict + supports_multiple_types = False + + def __init__(self, content=None): + # type: (Optional[str]) -> None + """ + + :param content: A string corresponding to the utterance text of what a customer would say to Alexa. + :type content: (optional) str + """ + self.__discriminator_value = None # type: str + + 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, Input): + 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/invocation_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_request.py new file mode 100644 index 0000000..28dbdce --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_request.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 + from datetime import datetime + + +class InvocationRequest(object): + """ + + :param endpoint: Skill's Lambda or HTTPS endpoint. + :type endpoint: (optional) str + :param body: JSON payload that was sent to the skill's Lambda or HTTPS endpoint. + :type body: (optional) dict(str, object) + + """ + deserialized_types = { + 'endpoint': 'str', + 'body': 'dict(str, object)' + } # type: Dict + + attribute_map = { + 'endpoint': 'endpoint', + 'body': 'body' + } # type: Dict + supports_multiple_types = False + + def __init__(self, endpoint=None, body=None): + # type: (Optional[str], Optional[Dict[str, object]]) -> None + """ + + :param endpoint: Skill's Lambda or HTTPS endpoint. + :type endpoint: (optional) str + :param body: JSON payload that was sent to the skill's Lambda or HTTPS endpoint. + :type body: (optional) dict(str, object) + """ + self.__discriminator_value = None # type: str + + self.endpoint = endpoint + 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, InvocationRequest): + 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/invocation_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_response.py new file mode 100644 index 0000000..b84ba5f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocation_response.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 + from datetime import datetime + + +class InvocationResponse(object): + """ + + :param body: Payload that was returned by the skill's Lambda or HTTPS endpoint. + :type body: (optional) dict(str, object) + + """ + deserialized_types = { + 'body': 'dict(str, object)' + } # type: Dict + + attribute_map = { + 'body': 'body' + } # type: Dict + supports_multiple_types = False + + def __init__(self, body=None): + # type: (Optional[Dict[str, object]]) -> None + """ + + :param body: Payload that was returned by the skill's Lambda or HTTPS endpoint. + :type body: (optional) dict(str, object) + """ + self.__discriminator_value = None # type: str + + 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, InvocationResponse): + 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/invocations.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocations.py new file mode 100644 index 0000000..c4df783 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/invocations.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 + from datetime import datetime + from ask_smapi_model.v1.skill.simulations.invocation_request import InvocationRequest + from ask_smapi_model.v1.skill.simulations.invocation_response import InvocationResponse + from ask_smapi_model.v1.skill.simulations.metrics import Metrics + + +class Invocations(object): + """ + + :param invocation_request: + :type invocation_request: (optional) ask_smapi_model.v1.skill.simulations.invocation_request.InvocationRequest + :param invocation_response: + :type invocation_response: (optional) ask_smapi_model.v1.skill.simulations.invocation_response.InvocationResponse + :param metrics: + :type metrics: (optional) ask_smapi_model.v1.skill.simulations.metrics.Metrics + + """ + deserialized_types = { + 'invocation_request': 'ask_smapi_model.v1.skill.simulations.invocation_request.InvocationRequest', + 'invocation_response': 'ask_smapi_model.v1.skill.simulations.invocation_response.InvocationResponse', + 'metrics': 'ask_smapi_model.v1.skill.simulations.metrics.Metrics' + } # type: Dict + + attribute_map = { + 'invocation_request': 'invocationRequest', + 'invocation_response': 'invocationResponse', + 'metrics': 'metrics' + } # type: Dict + supports_multiple_types = False + + def __init__(self, invocation_request=None, invocation_response=None, metrics=None): + # type: (Optional[InvocationRequest], Optional[InvocationResponse], Optional[Metrics]) -> None + """ + + :param invocation_request: + :type invocation_request: (optional) ask_smapi_model.v1.skill.simulations.invocation_request.InvocationRequest + :param invocation_response: + :type invocation_response: (optional) ask_smapi_model.v1.skill.simulations.invocation_response.InvocationResponse + :param metrics: + :type metrics: (optional) ask_smapi_model.v1.skill.simulations.metrics.Metrics + """ + self.__discriminator_value = None # type: str + + self.invocation_request = invocation_request + self.invocation_response = invocation_response + 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, Invocations): + 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/metrics.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/metrics.py new file mode 100644 index 0000000..b474c62 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/metrics.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 + from datetime import datetime + + +class Metrics(object): + """ + + :param skill_execution_time_in_milliseconds: How long, in milliseconds, it took the skill's Lambda or HTTPS endpoint to process the request. + :type skill_execution_time_in_milliseconds: (optional) int + + """ + deserialized_types = { + 'skill_execution_time_in_milliseconds': 'int' + } # type: Dict + + attribute_map = { + 'skill_execution_time_in_milliseconds': 'skillExecutionTimeInMilliseconds' + } # type: Dict + supports_multiple_types = False + + def __init__(self, skill_execution_time_in_milliseconds=None): + # type: (Optional[int]) -> None + """ + + :param skill_execution_time_in_milliseconds: How long, in milliseconds, it took the skill's Lambda or HTTPS endpoint to process the request. + :type skill_execution_time_in_milliseconds: (optional) int + """ + self.__discriminator_value = None # type: str + + self.skill_execution_time_in_milliseconds = skill_execution_time_in_milliseconds + + 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/simulations/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..c8c01ff --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/session.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 + from datetime import datetime + from ask_smapi_model.v1.skill.simulations.session_mode import SessionMode + + +class Session(object): + """ + Session settings for running current simulation. + + + :param mode: + :type mode: (optional) ask_smapi_model.v1.skill.simulations.session_mode.SessionMode + + """ + deserialized_types = { + 'mode': 'ask_smapi_model.v1.skill.simulations.session_mode.SessionMode' + } # type: Dict + + attribute_map = { + 'mode': 'mode' + } # type: Dict + supports_multiple_types = False + + def __init__(self, mode=None): + # type: (Optional[SessionMode]) -> None + """Session settings for running current simulation. + + :param mode: + :type mode: (optional) ask_smapi_model.v1.skill.simulations.session_mode.SessionMode + """ + self.__discriminator_value = None # type: str + + self.mode = mode + + 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, Session): + 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/session_mode.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/session_mode.py new file mode 100644 index 0000000..9c8d133 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/session_mode.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 + from datetime import datetime + + +class SessionMode(Enum): + """ + Indicate the session mode of the current simulation is using. + + + + Allowed enum values: [DEFAULT, FORCE_NEW_SESSION] + """ + DEFAULT = "DEFAULT" + FORCE_NEW_SESSION = "FORCE_NEW_SESSION" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SessionMode): + 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 new file mode 100644 index 0000000..8bce836 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulation_result.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 + from datetime import datetime + from ask_smapi_model.v1.error import Error + from ask_smapi_model.v1.skill.simulations.invocations import Invocations + from ask_smapi_model.v1.skill.simulations.alexa_execution_info import AlexaExecutionInfo + + +class SimulationResult(object): + """ + + :param alexa_execution_info: + :type alexa_execution_info: (optional) ask_smapi_model.v1.skill.simulations.alexa_execution_info.AlexaExecutionInfo + :param skill_execution_info: + :type skill_execution_info: (optional) list[ask_smapi_model.v1.skill.simulations.invocations.Invocations] + :param error: + :type error: (optional) ask_smapi_model.v1.error.Error + + """ + deserialized_types = { + 'alexa_execution_info': 'ask_smapi_model.v1.skill.simulations.alexa_execution_info.AlexaExecutionInfo', + 'skill_execution_info': 'list[ask_smapi_model.v1.skill.simulations.invocations.Invocations]', + 'error': 'ask_smapi_model.v1.error.Error' + } # type: Dict + + attribute_map = { + 'alexa_execution_info': 'alexaExecutionInfo', + 'skill_execution_info': 'skillExecutionInfo', + 'error': 'error' + } # type: Dict + supports_multiple_types = False + + def __init__(self, alexa_execution_info=None, skill_execution_info=None, error=None): + # type: (Optional[AlexaExecutionInfo], Optional[List[Invocations]], Optional[Error]) -> None + """ + + :param alexa_execution_info: + :type alexa_execution_info: (optional) ask_smapi_model.v1.skill.simulations.alexa_execution_info.AlexaExecutionInfo + :param skill_execution_info: + :type skill_execution_info: (optional) list[ask_smapi_model.v1.skill.simulations.invocations.Invocations] + :param error: + :type error: (optional) ask_smapi_model.v1.error.Error + """ + self.__discriminator_value = None # type: str + + self.alexa_execution_info = alexa_execution_info + self.skill_execution_info = skill_execution_info + 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, SimulationResult): + 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/simulations_api_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_request.py new file mode 100644 index 0000000..3e44273 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_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 + from datetime import datetime + from ask_smapi_model.v1.skill.simulations.input import Input + from ask_smapi_model.v1.skill.simulations.device import Device + from ask_smapi_model.v1.skill.simulations.session import Session + + +class SimulationsApiRequest(object): + """ + + :param input: + :type input: (optional) ask_smapi_model.v1.skill.simulations.input.Input + :param device: + :type device: (optional) ask_smapi_model.v1.skill.simulations.device.Device + :param session: + :type session: (optional) ask_smapi_model.v1.skill.simulations.session.Session + + """ + 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' + } # type: Dict + + attribute_map = { + 'input': 'input', + 'device': 'device', + 'session': 'session' + } # type: Dict + supports_multiple_types = False + + def __init__(self, input=None, device=None, session=None): + # type: (Optional[Input], Optional[Device], Optional[Session]) -> None + """ + + :param input: + :type input: (optional) ask_smapi_model.v1.skill.simulations.input.Input + :param device: + :type device: (optional) ask_smapi_model.v1.skill.simulations.device.Device + :param session: + :type session: (optional) ask_smapi_model.v1.skill.simulations.session.Session + """ + self.__discriminator_value = None # type: str + + self.input = input + self.device = device + self.session = session + + 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, SimulationsApiRequest): + 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/simulations_api_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response.py new file mode 100644 index 0000000..e9796ea --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response.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 + from datetime import datetime + from ask_smapi_model.v1.skill.simulations.simulation_result import SimulationResult + from ask_smapi_model.v1.skill.simulations.simulations_api_response_status import SimulationsApiResponseStatus + + +class SimulationsApiResponse(object): + """ + + :param id: Id of the simulation resource. + :type id: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.simulations.simulations_api_response_status.SimulationsApiResponseStatus + :param result: + :type result: (optional) ask_smapi_model.v1.skill.simulations.simulation_result.SimulationResult + + """ + deserialized_types = { + 'id': 'str', + 'status': 'ask_smapi_model.v1.skill.simulations.simulations_api_response_status.SimulationsApiResponseStatus', + 'result': 'ask_smapi_model.v1.skill.simulations.simulation_result.SimulationResult' + } # type: Dict + + attribute_map = { + 'id': 'id', + 'status': 'status', + 'result': 'result' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None, status=None, result=None): + # type: (Optional[str], Optional[SimulationsApiResponseStatus], Optional[SimulationResult]) -> None + """ + + :param id: Id of the simulation resource. + :type id: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.simulations.simulations_api_response_status.SimulationsApiResponseStatus + :param result: + :type result: (optional) ask_smapi_model.v1.skill.simulations.simulation_result.SimulationResult + """ + self.__discriminator_value = None # type: str + + self.id = id + self.status = status + 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, SimulationsApiResponse): + 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/simulations_api_response_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response_status.py new file mode 100644 index 0000000..fadaf84 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/simulations/simulations_api_response_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 + from datetime import datetime + + +class SimulationsApiResponseStatus(Enum): + """ + String that specifies the current status of the simulation. Possible values are \"IN_PROGRESS\", \"SUCCESSFUL\", and \"FAILED\". + + + + Allowed enum values: [IN_PROGRESS, SUCCESSFUL, FAILED] + """ + IN_PROGRESS = "IN_PROGRESS" + SUCCESSFUL = "SUCCESSFUL" + FAILED = "FAILED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SimulationsApiResponseStatus): + 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/skill_interaction_model.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_interaction_model.py new file mode 100644 index 0000000..beca11a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_interaction_model.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 + from datetime import datetime + from ask_smapi_model.v1.skill.skill_interaction_model_status import SkillInteractionModelStatus + + +class SkillInteractionModel(object): + """ + Status for available interaction models, keyed by locale. + + + :param locale: + :type locale: (optional) dict(str, ask_smapi_model.v1.skill.skill_interaction_model_status.SkillInteractionModelStatus) + + """ + deserialized_types = { + 'locale': 'dict(str, ask_smapi_model.v1.skill.skill_interaction_model_status.SkillInteractionModelStatus)' + } # type: Dict + + attribute_map = { + 'locale': 'locale' + } # type: Dict + supports_multiple_types = False + + def __init__(self, locale=None): + # type: (Optional[Dict[str, SkillInteractionModelStatus]]) -> None + """Status for available interaction models, keyed by locale. + + :param locale: + :type locale: (optional) dict(str, ask_smapi_model.v1.skill.skill_interaction_model_status.SkillInteractionModelStatus) + """ + self.__discriminator_value = None # type: str + + self.locale = 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, SkillInteractionModel): + 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/skill_interaction_model_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_interaction_model_status.py new file mode 100644 index 0000000..d33802a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_interaction_model_status.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 + + +if typing.TYPE_CHECKING: + from typing import Dict, List, Optional, Union + from datetime import datetime + from ask_smapi_model.v1.skill.standardized_error import StandardizedError + from ask_smapi_model.v1.skill.last_update_request import LastUpdateRequest + + +class SkillInteractionModelStatus(object): + """ + Defines the structure for interaction model build status. + + + :param last_update_request: + :type last_update_request: (optional) ask_smapi_model.v1.skill.last_update_request.LastUpdateRequest + :param e_tag: An opaque identifier for last successfully updated resource. + :type e_tag: (optional) str + :param version: Version for last successfully built model. + :type version: (optional) str + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param warnings: + :type warnings: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + + """ + deserialized_types = { + 'last_update_request': 'ask_smapi_model.v1.skill.last_update_request.LastUpdateRequest', + 'e_tag': 'str', + 'version': 'str', + 'errors': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]', + 'warnings': 'list[ask_smapi_model.v1.skill.standardized_error.StandardizedError]' + } # type: Dict + + attribute_map = { + 'last_update_request': 'lastUpdateRequest', + 'e_tag': 'eTag', + 'version': 'version', + 'errors': 'errors', + 'warnings': 'warnings' + } # type: Dict + supports_multiple_types = False + + def __init__(self, last_update_request=None, e_tag=None, version=None, errors=None, warnings=None): + # type: (Optional[LastUpdateRequest], Optional[str], Optional[str], Optional[List[StandardizedError]], Optional[List[StandardizedError]]) -> None + """Defines the structure for interaction model build status. + + :param last_update_request: + :type last_update_request: (optional) ask_smapi_model.v1.skill.last_update_request.LastUpdateRequest + :param e_tag: An opaque identifier for last successfully updated resource. + :type e_tag: (optional) str + :param version: Version for last successfully built model. + :type version: (optional) str + :param errors: + :type errors: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + :param warnings: + :type warnings: (optional) list[ask_smapi_model.v1.skill.standardized_error.StandardizedError] + """ + self.__discriminator_value = None # type: str + + self.last_update_request = last_update_request + self.e_tag = e_tag + self.version = version + self.errors = errors + self.warnings = warnings + + 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, SkillInteractionModelStatus): + 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/skill_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_status.py new file mode 100644 index 0000000..2f87312 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_status.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 + from datetime import datetime + from ask_smapi_model.v1.skill.resource_status import ResourceStatus + from ask_smapi_model.v1.skill.skill_interaction_model import SkillInteractionModel + + +class SkillStatus(object): + """ + Defines the structure for skill status response. + + + :param manifest: + :type manifest: (optional) ask_smapi_model.v1.skill.resource_status.ResourceStatus + :param interaction_model: + :type interaction_model: (optional) ask_smapi_model.v1.skill.skill_interaction_model.SkillInteractionModel + + """ + deserialized_types = { + 'manifest': 'ask_smapi_model.v1.skill.resource_status.ResourceStatus', + 'interaction_model': 'ask_smapi_model.v1.skill.skill_interaction_model.SkillInteractionModel' + } # type: Dict + + attribute_map = { + 'manifest': 'manifest', + 'interaction_model': 'interactionModel' + } # type: Dict + supports_multiple_types = False + + def __init__(self, manifest=None, interaction_model=None): + # type: (Optional[ResourceStatus], Optional[SkillInteractionModel]) -> None + """Defines the structure for skill status response. + + :param manifest: + :type manifest: (optional) ask_smapi_model.v1.skill.resource_status.ResourceStatus + :param interaction_model: + :type interaction_model: (optional) ask_smapi_model.v1.skill.skill_interaction_model.SkillInteractionModel + """ + self.__discriminator_value = None # type: str + + self.manifest = manifest + self.interaction_model = interaction_model + + 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, SkillStatus): + 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/skill_summary.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary.py new file mode 100644 index 0000000..d41fcd0 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary.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 + from datetime import datetime + from ask_smapi_model.v1.skill.skill_summary_apis import SkillSummaryApis + + +class SkillSummary(object): + """ + Information about the skills. + + + :param skill_id: + :type skill_id: (optional) str + :param apis: List of APIs currently implemented by the skill. + :type apis: (optional) list[ask_smapi_model.v1.skill.skill_summary_apis.SkillSummaryApis] + + """ + deserialized_types = { + 'skill_id': 'str', + 'apis': 'list[ask_smapi_model.v1.skill.skill_summary_apis.SkillSummaryApis]' + } # type: Dict + + attribute_map = { + 'skill_id': 'skillId', + 'apis': 'apis' + } # type: Dict + supports_multiple_types = False + + def __init__(self, skill_id=None, apis=None): + # type: (Optional[str], Optional[List[SkillSummaryApis]]) -> None + """Information about the skills. + + :param skill_id: + :type skill_id: (optional) str + :param apis: List of APIs currently implemented by the skill. + :type apis: (optional) list[ask_smapi_model.v1.skill.skill_summary_apis.SkillSummaryApis] + """ + self.__discriminator_value = None # type: str + + self.skill_id = skill_id + self.apis = apis + + 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, SkillSummary): + 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/skill_summary_apis.py b/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary_apis.py new file mode 100644 index 0000000..8334f79 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/skill_summary_apis.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 + from datetime import datetime + + +class SkillSummaryApis(Enum): + """ + + + Allowed enum values: [custom, smartHome, flashBriefing, video, music, householdList, health, alexaForBusiness] + """ + custom = "custom" + smartHome = "smartHome" + flashBriefing = "flashBriefing" + video = "video" + music = "music" + householdList = "householdList" + health = "health" + alexaForBusiness = "alexaForBusiness" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, SkillSummaryApis): + 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/ssl_certificate_payload.py b/ask-smapi-model/ask_smapi_model/v1/skill/ssl_certificate_payload.py new file mode 100644 index 0000000..c8dde6a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/ssl_certificate_payload.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 + from datetime import datetime + from ask_smapi_model.v1.skill.regional_ssl_certificate import RegionalSSLCertificate + + +class SSLCertificatePayload(object): + """ + + :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. + :type ssl_certificate: (optional) str + :param regions: A map of region to ssl certificate. Keys are string region codes (https://developer.amazon.com/docs/smapi/skill-manifest.html#regions), values are regional ssl certificate objects which contain the ssl certificate blobs as strings. + :type regions: (optional) dict(str, ask_smapi_model.v1.skill.regional_ssl_certificate.RegionalSSLCertificate) + + """ + deserialized_types = { + 'ssl_certificate': 'str', + 'regions': 'dict(str, ask_smapi_model.v1.skill.regional_ssl_certificate.RegionalSSLCertificate)' + } # type: Dict + + attribute_map = { + 'ssl_certificate': 'sslCertificate', + 'regions': 'regions' + } # type: Dict + supports_multiple_types = False + + def __init__(self, ssl_certificate=None, regions=None): + # type: (Optional[str], Optional[Dict[str, RegionalSSLCertificate]]) -> 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. + :type ssl_certificate: (optional) str + :param regions: A map of region to ssl certificate. Keys are string region codes (https://developer.amazon.com/docs/smapi/skill-manifest.html#regions), values are regional ssl certificate objects which contain the ssl certificate blobs as strings. + :type regions: (optional) dict(str, ask_smapi_model.v1.skill.regional_ssl_certificate.RegionalSSLCertificate) + """ + self.__discriminator_value = None # type: str + + self.ssl_certificate = ssl_certificate + self.regions = regions + + 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, SSLCertificatePayload): + 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/standardized_error.py b/ask-smapi-model/ask_smapi_model/v1/skill/standardized_error.py new file mode 100644 index 0000000..ec04afc --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/standardized_error.py @@ -0,0 +1,124 @@ +# 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.standardized_error_code import StandardizedErrorCode + from ask_smapi_model.v1.skill.validation_details import ValidationDetails + + +class StandardizedError(object): + """ + Standardized structure which wraps machine parsable and human readable information about an error. + + + :param code: Standardized structure which wraps machine parsable and human readable information about an error. + :type code: (optional) ask_smapi_model.v1.skill.standardized_error_code.StandardizedErrorCode + :param message: A standardized, human readable message generated from the error code and validation details in ViolationStructure by the AskStandardizedErrorUtil library. + :type message: (optional) str + :param validation_details: + :type validation_details: (optional) ask_smapi_model.v1.skill.validation_details.ValidationDetails + + """ + deserialized_types = { + 'code': 'ask_smapi_model.v1.skill.standardized_error_code.StandardizedErrorCode', + 'message': 'str', + 'validation_details': 'ask_smapi_model.v1.skill.validation_details.ValidationDetails' + } # type: Dict + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'validation_details': 'validationDetails' + } # type: Dict + supports_multiple_types = False + + def __init__(self, code=None, message=None, validation_details=None): + # type: (Optional[StandardizedErrorCode], Optional[str], Optional[ValidationDetails]) -> None + """Standardized structure which wraps machine parsable and human readable information about an error. + + :param code: Standardized structure which wraps machine parsable and human readable information about an error. + :type code: (optional) ask_smapi_model.v1.skill.standardized_error_code.StandardizedErrorCode + :param message: A standardized, human readable message generated from the error code and validation details in ViolationStructure by the AskStandardizedErrorUtil library. + :type message: (optional) str + :param validation_details: + :type validation_details: (optional) ask_smapi_model.v1.skill.validation_details.ValidationDetails + """ + self.__discriminator_value = None # type: str + + self.code = code + self.message = message + self.validation_details = validation_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, StandardizedError): + 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/standardized_error_code.py b/ask-smapi-model/ask_smapi_model/v1/skill/standardized_error_code.py new file mode 100644 index 0000000..d284f62 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/standardized_error_code.py @@ -0,0 +1,85 @@ +# 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 StandardizedErrorCode(Enum): + """ + List of standardized error codes + + + + Allowed enum values: [INVALID_DATA_TYPE, RESOURCE_NOT_FOUND, INVALID_CONTENT_TYPE, INVALID_IMAGE_ATTRIBUTES, DENIED_FEATURE_ACCESS, INVALID_URL_DOMAIN, INVALID_URL_FORMAT, UNEXPECTED_PROPERTY, MISSING_REQUIRED_PROPERTY, UNEXPECTED_EMPTY_OBJECT, INVALID_ARRAY_SIZE, DUPLICATE_ARRAY_ITEMS, INVALID_INTEGER_VALUE, INVALID_STRING_LENGTH, INVALID_ENUM_VALUE, INVALID_STRING_PATTERN, INCONSISTENT_ENDPOINTS, MUTUALLY_EXCLUSIVE_ARRAY_ITEMS, EXPECTED_RELATED_INSTANCE, CONFLICTING_INSTANCES, EXPECTED_COMPLIANCE_AGREEMENT] + """ + INVALID_DATA_TYPE = "INVALID_DATA_TYPE" + RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND" + INVALID_CONTENT_TYPE = "INVALID_CONTENT_TYPE" + INVALID_IMAGE_ATTRIBUTES = "INVALID_IMAGE_ATTRIBUTES" + DENIED_FEATURE_ACCESS = "DENIED_FEATURE_ACCESS" + INVALID_URL_DOMAIN = "INVALID_URL_DOMAIN" + INVALID_URL_FORMAT = "INVALID_URL_FORMAT" + UNEXPECTED_PROPERTY = "UNEXPECTED_PROPERTY" + MISSING_REQUIRED_PROPERTY = "MISSING_REQUIRED_PROPERTY" + UNEXPECTED_EMPTY_OBJECT = "UNEXPECTED_EMPTY_OBJECT" + INVALID_ARRAY_SIZE = "INVALID_ARRAY_SIZE" + DUPLICATE_ARRAY_ITEMS = "DUPLICATE_ARRAY_ITEMS" + INVALID_INTEGER_VALUE = "INVALID_INTEGER_VALUE" + INVALID_STRING_LENGTH = "INVALID_STRING_LENGTH" + INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE" + INVALID_STRING_PATTERN = "INVALID_STRING_PATTERN" + INCONSISTENT_ENDPOINTS = "INCONSISTENT_ENDPOINTS" + MUTUALLY_EXCLUSIVE_ARRAY_ITEMS = "MUTUALLY_EXCLUSIVE_ARRAY_ITEMS" + EXPECTED_RELATED_INSTANCE = "EXPECTED_RELATED_INSTANCE" + CONFLICTING_INSTANCES = "CONFLICTING_INSTANCES" + EXPECTED_COMPLIANCE_AGREEMENT = "EXPECTED_COMPLIANCE_AGREEMENT" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, StandardizedErrorCode): + 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/status.py b/ask-smapi-model/ask_smapi_model/v1/skill/status.py new file mode 100644 index 0000000..676d6ea --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/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 + from datetime import datetime + + +class Status(Enum): + """ + Status of a resource. + + + + Allowed enum values: [FAILED, IN_PROGRESS, SUCCEEDED] + """ + FAILED = "FAILED" + IN_PROGRESS = "IN_PROGRESS" + SUCCEEDED = "SUCCEEDED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, Status): + 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/submit_skill_for_certification_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/submit_skill_for_certification_request.py new file mode 100644 index 0000000..2a96ff8 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/submit_skill_for_certification_request.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 + from datetime import datetime + from ask_smapi_model.v1.skill.publication_method import PublicationMethod + + +class SubmitSkillForCertificationRequest(object): + """ + + :param publication_method: + :type publication_method: (optional) ask_smapi_model.v1.skill.publication_method.PublicationMethod + + """ + deserialized_types = { + 'publication_method': 'ask_smapi_model.v1.skill.publication_method.PublicationMethod' + } # type: Dict + + attribute_map = { + 'publication_method': 'publicationMethod' + } # type: Dict + supports_multiple_types = False + + def __init__(self, publication_method=None): + # type: (Optional[PublicationMethod]) -> None + """ + + :param publication_method: + :type publication_method: (optional) ask_smapi_model.v1.skill.publication_method.PublicationMethod + """ + self.__discriminator_value = None # type: str + + self.publication_method = publication_method + + 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, SubmitSkillForCertificationRequest): + 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/update_skill_with_package_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/update_skill_with_package_request.py new file mode 100644 index 0000000..bcd6556 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/update_skill_with_package_request.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 + from datetime import datetime + + +class UpdateSkillWithPackageRequest(object): + """ + + :param location: Location of the package. + :type location: (optional) str + + """ + deserialized_types = { + 'location': 'str' + } # type: Dict + + attribute_map = { + 'location': 'location' + } # type: Dict + supports_multiple_types = False + + def __init__(self, location=None): + # type: (Optional[str]) -> None + """ + + :param location: Location of the package. + :type location: (optional) str + """ + self.__discriminator_value = None # type: str + + self.location = location + + 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, UpdateSkillWithPackageRequest): + 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/upload_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/upload_response.py new file mode 100644 index 0000000..ff73658 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/upload_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 + from datetime import datetime + + +class UploadResponse(object): + """ + Defines the structure for skill upload response. + + + :param upload_url: The upload URL to upload a skill package. + :type upload_url: (optional) str + :param expires_at: + :type expires_at: (optional) datetime + + """ + deserialized_types = { + 'upload_url': 'str', + 'expires_at': 'datetime' + } # type: Dict + + attribute_map = { + 'upload_url': 'uploadUrl', + 'expires_at': 'expiresAt' + } # type: Dict + supports_multiple_types = False + + def __init__(self, upload_url=None, expires_at=None): + # type: (Optional[str], Optional[datetime]) -> None + """Defines the structure for skill upload response. + + :param upload_url: The upload URL to upload a skill package. + :type upload_url: (optional) str + :param expires_at: + :type expires_at: (optional) datetime + """ + self.__discriminator_value = None # type: str + + self.upload_url = upload_url + self.expires_at = expires_at + + 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, UploadResponse): + 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/validation_data_types.py b/ask-smapi-model/ask_smapi_model/v1/skill/validation_data_types.py new file mode 100644 index 0000000..adbbc8b --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validation_data_types.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 + from datetime import datetime + + +class ValidationDataTypes(Enum): + """ + + + Allowed enum values: [object, boolean, integer, array, string, null] + """ + object = "object" + boolean = "boolean" + integer = "integer" + array = "array" + string = "string" + null = "null" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ValidationDataTypes): + 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/validation_details.py b/ask-smapi-model/ask_smapi_model/v1/skill/validation_details.py new file mode 100644 index 0000000..bbda93a --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validation_details.py @@ -0,0 +1,261 @@ +# 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.validation_endpoint import ValidationEndpoint + from ask_smapi_model.v1.skill.image_attributes import ImageAttributes + from ask_smapi_model.v1.skill.validation_feature import ValidationFeature + from ask_smapi_model.v1.skill.agreement_type import AgreementType + from ask_smapi_model.v1.skill.validation_data_types import ValidationDataTypes + from ask_smapi_model.v1.skill.instance import Instance + + +class ValidationDetails(object): + """ + 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. + :type actual_image_attributes: (optional) ask_smapi_model.v1.skill.image_attributes.ImageAttributes + :param actual_number_of_items: Number of items in an array provided by the customer. + :type actual_number_of_items: (optional) int + :param actual_string_length: Number of characters in a string provided by the customer. + :type actual_string_length: (optional) int + :param allowed_content_types: List of allowed content types for a resource. + :type allowed_content_types: (optional) list[str] + :param allowed_data_types: List of allowed data types for an instance. + :type allowed_data_types: (optional) list[ask_smapi_model.v1.skill.validation_data_types.ValidationDataTypes] + :param allowed_image_attributes: List of set of properties representing all possible allowed images. + :type allowed_image_attributes: (optional) list[ask_smapi_model.v1.skill.image_attributes.ImageAttributes] + :param conflicting_instance: Instance conflicting with another instance. + :type conflicting_instance: (optional) ask_smapi_model.v1.skill.instance.Instance + :param expected_instance: Instance that is expected by a related instance. + :type expected_instance: (optional) ask_smapi_model.v1.skill.instance.Instance + :param expected_regex_pattern: Regular expression that a string instance is expected to match. + :type expected_regex_pattern: (optional) str + :param agreement_type: Type of the agreement that the customer must be compliant to. + :type agreement_type: (optional) ask_smapi_model.v1.skill.agreement_type.AgreementType + :param feature: Properties of a publicly known feature that has restricted access. + :type feature: (optional) ask_smapi_model.v1.skill.validation_feature.ValidationFeature + :param inconsistent_endpoint: Endpoint which has a different value for property named type when compared to original endpoint. + :type inconsistent_endpoint: (optional) ask_smapi_model.v1.skill.validation_endpoint.ValidationEndpoint + :param minimum_integer_value: Minimum allowed value of an integer instance. + :type minimum_integer_value: (optional) int + :param minimum_number_of_items: Minimum allowed number of items in an array. + :type minimum_number_of_items: (optional) int + :param minimum_string_length: Minimum allowed number of characters in a string. + :type minimum_string_length: (optional) int + :param maximum_integer_value: Maximum allowed value of an integer instance. + :type maximum_integer_value: (optional) int + :param maximum_number_of_items: Maximum allowed number of items in an array. + :type maximum_number_of_items: (optional) int + :param maximum_string_length: Maximum allowed number of characters in a string. + :type maximum_string_length: (optional) int + :param original_endpoint: An Endpoint instance + :type original_endpoint: (optional) ask_smapi_model.v1.skill.validation_endpoint.ValidationEndpoint + :param original_instance: An Instance + :type original_instance: (optional) ask_smapi_model.v1.skill.instance.Instance + :param required_property: Property required but missing in the object. + :type required_property: (optional) str + :param unexpected_property: Property not expected but present in the object. + :type unexpected_property: (optional) str + + """ + deserialized_types = { + 'actual_image_attributes': 'ask_smapi_model.v1.skill.image_attributes.ImageAttributes', + 'actual_number_of_items': 'int', + 'actual_string_length': 'int', + 'allowed_content_types': 'list[str]', + 'allowed_data_types': 'list[ask_smapi_model.v1.skill.validation_data_types.ValidationDataTypes]', + 'allowed_image_attributes': 'list[ask_smapi_model.v1.skill.image_attributes.ImageAttributes]', + 'conflicting_instance': 'ask_smapi_model.v1.skill.instance.Instance', + 'expected_instance': 'ask_smapi_model.v1.skill.instance.Instance', + 'expected_regex_pattern': 'str', + 'agreement_type': 'ask_smapi_model.v1.skill.agreement_type.AgreementType', + 'feature': 'ask_smapi_model.v1.skill.validation_feature.ValidationFeature', + 'inconsistent_endpoint': 'ask_smapi_model.v1.skill.validation_endpoint.ValidationEndpoint', + 'minimum_integer_value': 'int', + 'minimum_number_of_items': 'int', + 'minimum_string_length': 'int', + 'maximum_integer_value': 'int', + 'maximum_number_of_items': 'int', + 'maximum_string_length': 'int', + 'original_endpoint': 'ask_smapi_model.v1.skill.validation_endpoint.ValidationEndpoint', + 'original_instance': 'ask_smapi_model.v1.skill.instance.Instance', + 'required_property': 'str', + 'unexpected_property': 'str' + } # type: Dict + + attribute_map = { + 'actual_image_attributes': 'actualImageAttributes', + 'actual_number_of_items': 'actualNumberOfItems', + 'actual_string_length': 'actualStringLength', + 'allowed_content_types': 'allowedContentTypes', + 'allowed_data_types': 'allowedDataTypes', + 'allowed_image_attributes': 'allowedImageAttributes', + 'conflicting_instance': 'conflictingInstance', + 'expected_instance': 'expectedInstance', + 'expected_regex_pattern': 'expectedRegexPattern', + 'agreement_type': 'agreementType', + 'feature': 'feature', + 'inconsistent_endpoint': 'inconsistentEndpoint', + 'minimum_integer_value': 'minimumIntegerValue', + 'minimum_number_of_items': 'minimumNumberOfItems', + 'minimum_string_length': 'minimumStringLength', + 'maximum_integer_value': 'maximumIntegerValue', + 'maximum_number_of_items': 'maximumNumberOfItems', + 'maximum_string_length': 'maximumStringLength', + 'original_endpoint': 'originalEndpoint', + 'original_instance': 'originalInstance', + 'required_property': 'requiredProperty', + 'unexpected_property': 'unexpectedProperty' + } # type: Dict + 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_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, required_property=None, unexpected_property=None): + # type: (Optional[ImageAttributes], Optional[int], Optional[int], Optional[List[object]], Optional[List[ValidationDataTypes]], Optional[List[ImageAttributes]], Optional[Instance], Optional[Instance], Optional[str], Optional[AgreementType], Optional[ValidationFeature], Optional[ValidationEndpoint], Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[ValidationEndpoint], Optional[Instance], 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. + :type actual_image_attributes: (optional) ask_smapi_model.v1.skill.image_attributes.ImageAttributes + :param actual_number_of_items: Number of items in an array provided by the customer. + :type actual_number_of_items: (optional) int + :param actual_string_length: Number of characters in a string provided by the customer. + :type actual_string_length: (optional) int + :param allowed_content_types: List of allowed content types for a resource. + :type allowed_content_types: (optional) list[str] + :param allowed_data_types: List of allowed data types for an instance. + :type allowed_data_types: (optional) list[ask_smapi_model.v1.skill.validation_data_types.ValidationDataTypes] + :param allowed_image_attributes: List of set of properties representing all possible allowed images. + :type allowed_image_attributes: (optional) list[ask_smapi_model.v1.skill.image_attributes.ImageAttributes] + :param conflicting_instance: Instance conflicting with another instance. + :type conflicting_instance: (optional) ask_smapi_model.v1.skill.instance.Instance + :param expected_instance: Instance that is expected by a related instance. + :type expected_instance: (optional) ask_smapi_model.v1.skill.instance.Instance + :param expected_regex_pattern: Regular expression that a string instance is expected to match. + :type expected_regex_pattern: (optional) str + :param agreement_type: Type of the agreement that the customer must be compliant to. + :type agreement_type: (optional) ask_smapi_model.v1.skill.agreement_type.AgreementType + :param feature: Properties of a publicly known feature that has restricted access. + :type feature: (optional) ask_smapi_model.v1.skill.validation_feature.ValidationFeature + :param inconsistent_endpoint: Endpoint which has a different value for property named type when compared to original endpoint. + :type inconsistent_endpoint: (optional) ask_smapi_model.v1.skill.validation_endpoint.ValidationEndpoint + :param minimum_integer_value: Minimum allowed value of an integer instance. + :type minimum_integer_value: (optional) int + :param minimum_number_of_items: Minimum allowed number of items in an array. + :type minimum_number_of_items: (optional) int + :param minimum_string_length: Minimum allowed number of characters in a string. + :type minimum_string_length: (optional) int + :param maximum_integer_value: Maximum allowed value of an integer instance. + :type maximum_integer_value: (optional) int + :param maximum_number_of_items: Maximum allowed number of items in an array. + :type maximum_number_of_items: (optional) int + :param maximum_string_length: Maximum allowed number of characters in a string. + :type maximum_string_length: (optional) int + :param original_endpoint: An Endpoint instance + :type original_endpoint: (optional) ask_smapi_model.v1.skill.validation_endpoint.ValidationEndpoint + :param original_instance: An Instance + :type original_instance: (optional) ask_smapi_model.v1.skill.instance.Instance + :param required_property: Property required but missing in the object. + :type required_property: (optional) str + :param unexpected_property: Property not expected but present in the object. + :type unexpected_property: (optional) str + """ + self.__discriminator_value = None # type: str + + self.actual_image_attributes = actual_image_attributes + self.actual_number_of_items = actual_number_of_items + self.actual_string_length = actual_string_length + self.allowed_content_types = allowed_content_types + self.allowed_data_types = allowed_data_types + self.allowed_image_attributes = allowed_image_attributes + self.conflicting_instance = conflicting_instance + self.expected_instance = expected_instance + self.expected_regex_pattern = expected_regex_pattern + self.agreement_type = agreement_type + self.feature = feature + self.inconsistent_endpoint = inconsistent_endpoint + self.minimum_integer_value = minimum_integer_value + self.minimum_number_of_items = minimum_number_of_items + self.minimum_string_length = minimum_string_length + self.maximum_integer_value = maximum_integer_value + self.maximum_number_of_items = maximum_number_of_items + self.maximum_string_length = maximum_string_length + self.original_endpoint = original_endpoint + self.original_instance = original_instance + self.required_property = required_property + self.unexpected_property = unexpected_property + + 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, ValidationDetails): + 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/validation_endpoint.py b/ask-smapi-model/ask_smapi_model/v1/skill/validation_endpoint.py new file mode 100644 index 0000000..0f96a76 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validation_endpoint.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 + from datetime import datetime + + +class ValidationEndpoint(object): + """ + Structure representing an endpoint. + + + :param property_path: Path to the endpoint URI in the resource. + :type property_path: (optional) str + :param object_type: Type of the endpoint (https, http, arn etc). + :type object_type: (optional) str + :param value: Full URI of the endpoint. + :type value: (optional) str + + """ + deserialized_types = { + 'property_path': 'str', + 'object_type': 'str', + 'value': 'str' + } # type: Dict + + attribute_map = { + 'property_path': 'propertyPath', + 'object_type': 'type', + 'value': 'value' + } # type: Dict + supports_multiple_types = False + + def __init__(self, property_path=None, object_type=None, value=None): + # type: (Optional[str], Optional[str], Optional[str]) -> None + """Structure representing an endpoint. + + :param property_path: Path to the endpoint URI in the resource. + :type property_path: (optional) str + :param object_type: Type of the endpoint (https, http, arn etc). + :type object_type: (optional) str + :param value: Full URI of the endpoint. + :type value: (optional) str + """ + self.__discriminator_value = None # type: str + + self.property_path = property_path + self.object_type = object_type + self.value = 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, ValidationEndpoint): + 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/validation_feature.py b/ask-smapi-model/ask_smapi_model/v1/skill/validation_feature.py new file mode 100644 index 0000000..34ccb5c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validation_feature.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 + from datetime import datetime + + +class ValidationFeature(object): + """ + Structure representing a public feature. + + + :param name: Name of the feature. + :type name: (optional) str + :param contact: Contact URL or email for the feature. + :type contact: (optional) str + + """ + deserialized_types = { + 'name': 'str', + 'contact': 'str' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'contact': 'contact' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, contact=None): + # type: (Optional[str], Optional[str]) -> None + """Structure representing a public feature. + + :param name: Name of the feature. + :type name: (optional) str + :param contact: Contact URL or email for the feature. + :type contact: (optional) str + """ + self.__discriminator_value = None # type: str + + self.name = name + self.contact = contact + + 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, ValidationFeature): + 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/validations/__init__.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/__init__.py new file mode 100644 index 0000000..c7ad187 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/__init__.py @@ -0,0 +1,23 @@ +# 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 .validations_api_response_result import ValidationsApiResponseResult +from .validations_api_request import ValidationsApiRequest +from .validations_api_response import ValidationsApiResponse +from .validations_api_response_status import ValidationsApiResponseStatus +from .response_validation_importance import ResponseValidationImportance +from .response_validation_status import ResponseValidationStatus +from .response_validation import ResponseValidation diff --git a/ask-smapi-model/ask_smapi_model/v1/skill/validations/py.typed b/ask-smapi-model/ask_smapi_model/v1/skill/validations/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..4efd455 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation.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 + from datetime import datetime + from ask_smapi_model.v1.skill.validations.response_validation_importance import ResponseValidationImportance + from ask_smapi_model.v1.skill.validations.response_validation_status import ResponseValidationStatus + + +class ResponseValidation(object): + """ + + :param title: Short, human readable title of the validation performed. + :type title: (optional) str + :param description: Human readable description of the validation performed. May include instructions to address validation failure. + :type description: (optional) str + :param category: Dot-delimited category. + :type category: (optional) str + :param locale: Locale of the validation. + :type locale: (optional) str + :param importance: + :type importance: (optional) ask_smapi_model.v1.skill.validations.response_validation_importance.ResponseValidationImportance + :param status: + :type status: (optional) ask_smapi_model.v1.skill.validations.response_validation_status.ResponseValidationStatus + + """ + deserialized_types = { + 'title': 'str', + 'description': 'str', + 'category': 'str', + 'locale': 'str', + 'importance': 'ask_smapi_model.v1.skill.validations.response_validation_importance.ResponseValidationImportance', + 'status': 'ask_smapi_model.v1.skill.validations.response_validation_status.ResponseValidationStatus' + } # type: Dict + + attribute_map = { + 'title': 'title', + 'description': 'description', + 'category': 'category', + 'locale': 'locale', + 'importance': 'importance', + 'status': 'status' + } # type: Dict + 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[ResponseValidationImportance], Optional[ResponseValidationStatus]) -> None + """ + + :param title: Short, human readable title of the validation performed. + :type title: (optional) str + :param description: Human readable description of the validation performed. May include instructions to address validation failure. + :type description: (optional) str + :param category: Dot-delimited category. + :type category: (optional) str + :param locale: Locale of the validation. + :type locale: (optional) str + :param importance: + :type importance: (optional) ask_smapi_model.v1.skill.validations.response_validation_importance.ResponseValidationImportance + :param status: + :type status: (optional) ask_smapi_model.v1.skill.validations.response_validation_status.ResponseValidationStatus + """ + self.__discriminator_value = None # type: str + + self.title = title + self.description = description + self.category = category + self.locale = locale + self.importance = importance + 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, ResponseValidation): + 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/validations/response_validation_importance.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_importance.py new file mode 100644 index 0000000..41c2c6f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_importance.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 + from datetime import datetime + + +class ResponseValidationImportance(Enum): + """ + String that specifies importance of the validation. Possible values are \"REQUIRED\" and \"RECOMMENDED\" + + + + Allowed enum values: [REQUIRED, RECOMMENDED] + """ + REQUIRED = "REQUIRED" + RECOMMENDED = "RECOMMENDED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ResponseValidationImportance): + 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/validations/response_validation_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_status.py new file mode 100644 index 0000000..a7130eb --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/response_validation_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 + from datetime import datetime + + +class ResponseValidationStatus(Enum): + """ + String that specifies status of the validation. Possible values are \"SUCCESSFUL\" and \"FAILED\" + + + + Allowed enum values: [SUCCESSFUL, FAILED] + """ + SUCCESSFUL = "SUCCESSFUL" + FAILED = "FAILED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ResponseValidationStatus): + 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/validations/validations_api_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_request.py new file mode 100644 index 0000000..630129f --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_request.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 + from datetime import datetime + + +class ValidationsApiRequest(object): + """ + + :param locales: + :type locales: (optional) list[str] + + """ + deserialized_types = { + 'locales': 'list[str]' + } # type: Dict + + attribute_map = { + 'locales': 'locales' + } # type: Dict + supports_multiple_types = False + + def __init__(self, locales=None): + # type: (Optional[List[object]]) -> None + """ + + :param locales: + :type locales: (optional) list[str] + """ + 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, ValidationsApiRequest): + 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/validations/validations_api_response.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response.py new file mode 100644 index 0000000..4ce7947 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response.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 + from datetime import datetime + from ask_smapi_model.v1.skill.validations.validations_api_response_result import ValidationsApiResponseResult + from ask_smapi_model.v1.skill.validations.validations_api_response_status import ValidationsApiResponseStatus + + +class ValidationsApiResponse(object): + """ + + :param id: Id of the validation resource. + :type id: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.validations.validations_api_response_status.ValidationsApiResponseStatus + :param result: + :type result: (optional) ask_smapi_model.v1.skill.validations.validations_api_response_result.ValidationsApiResponseResult + + """ + deserialized_types = { + 'id': 'str', + 'status': 'ask_smapi_model.v1.skill.validations.validations_api_response_status.ValidationsApiResponseStatus', + 'result': 'ask_smapi_model.v1.skill.validations.validations_api_response_result.ValidationsApiResponseResult' + } # type: Dict + + attribute_map = { + 'id': 'id', + 'status': 'status', + 'result': 'result' + } # type: Dict + supports_multiple_types = False + + def __init__(self, id=None, status=None, result=None): + # type: (Optional[str], Optional[ValidationsApiResponseStatus], Optional[ValidationsApiResponseResult]) -> None + """ + + :param id: Id of the validation resource. + :type id: (optional) str + :param status: + :type status: (optional) ask_smapi_model.v1.skill.validations.validations_api_response_status.ValidationsApiResponseStatus + :param result: + :type result: (optional) ask_smapi_model.v1.skill.validations.validations_api_response_result.ValidationsApiResponseResult + """ + self.__discriminator_value = None # type: str + + self.id = id + self.status = status + 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, ValidationsApiResponse): + 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/validations/validations_api_response_result.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_result.py new file mode 100644 index 0000000..16b249c --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_result.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 + from datetime import datetime + from ask_smapi_model.v1.error import Error + from ask_smapi_model.v1.skill.validations.response_validation import ResponseValidation + + +class ValidationsApiResponseResult(object): + """ + + :param validations: + :type validations: (optional) list[ask_smapi_model.v1.skill.validations.response_validation.ResponseValidation] + :param error: + :type error: (optional) ask_smapi_model.v1.error.Error + + """ + deserialized_types = { + 'validations': 'list[ask_smapi_model.v1.skill.validations.response_validation.ResponseValidation]', + 'error': 'ask_smapi_model.v1.error.Error' + } # type: Dict + + attribute_map = { + 'validations': 'validations', + 'error': 'error' + } # type: Dict + supports_multiple_types = False + + def __init__(self, validations=None, error=None): + # type: (Optional[List[ResponseValidation]], Optional[Error]) -> None + """ + + :param validations: + :type validations: (optional) list[ask_smapi_model.v1.skill.validations.response_validation.ResponseValidation] + :param error: + :type error: (optional) ask_smapi_model.v1.error.Error + """ + self.__discriminator_value = None # type: str + + self.validations = validations + 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, ValidationsApiResponseResult): + 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/validations/validations_api_response_status.py b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_status.py new file mode 100644 index 0000000..a6b1a79 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/validations/validations_api_response_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 + from datetime import datetime + + +class ValidationsApiResponseStatus(Enum): + """ + String that specifies the current status of validation execution. Possible values are \"IN_PROGRESS\", \"SUCCESSFUL\", and \"FAILED\". + + + + Allowed enum values: [IN_PROGRESS, SUCCESSFUL, FAILED] + """ + IN_PROGRESS = "IN_PROGRESS" + SUCCESSFUL = "SUCCESSFUL" + FAILED = "FAILED" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, ValidationsApiResponseStatus): + 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/withdraw_request.py b/ask-smapi-model/ask_smapi_model/v1/skill/withdraw_request.py new file mode 100644 index 0000000..78d72e5 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/skill/withdraw_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 + from datetime import datetime + from ask_smapi_model.v1.skill.reason import Reason + + +class WithdrawRequest(object): + """ + The payload for the withdraw operation. + + + :param reason: + :type reason: (optional) ask_smapi_model.v1.skill.reason.Reason + :param message: The message only in case the reason in OTHER. + :type message: (optional) str + + """ + deserialized_types = { + 'reason': 'ask_smapi_model.v1.skill.reason.Reason', + 'message': 'str' + } # type: Dict + + attribute_map = { + 'reason': 'reason', + 'message': 'message' + } # type: Dict + supports_multiple_types = False + + def __init__(self, reason=None, message=None): + # type: (Optional[Reason], Optional[str]) -> None + """The payload for the withdraw operation. + + :param reason: + :type reason: (optional) ask_smapi_model.v1.skill.reason.Reason + :param message: The message only in case the reason in OTHER. + :type message: (optional) str + """ + self.__discriminator_value = None # type: str + + self.reason = reason + 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, WithdrawRequest): + 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/stage_type.py b/ask-smapi-model/ask_smapi_model/v1/stage_type.py new file mode 100644 index 0000000..95d13e6 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/stage_type.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 + from datetime import datetime + + +class StageType(Enum): + """ + + + Allowed enum values: [development, live] + """ + development = "development" + live = "live" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, StageType): + 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/stage_v2_type.py b/ask-smapi-model/ask_smapi_model/v1/stage_v2_type.py new file mode 100644 index 0000000..e7853d7 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/stage_v2_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 + from datetime import datetime + + +class StageV2Type(Enum): + """ + + + Allowed enum values: [live, certified, development] + """ + live = "live" + certified = "certified" + development = "development" + + def to_dict(self): + # type: () -> Dict[str, object] + """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: (object) -> bool + """Returns true if both objects are equal""" + if not isinstance(other, StageV2Type): + 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/vendor_management/__init__.py b/ask-smapi-model/ask_smapi_model/v1/vendor_management/__init__.py new file mode 100644 index 0000000..a0a7002 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/vendor_management/__init__.py @@ -0,0 +1,18 @@ +# 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 .vendors import Vendors +from .vendor import Vendor diff --git a/ask-smapi-model/ask_smapi_model/v1/vendor_management/py.typed b/ask-smapi-model/ask_smapi_model/v1/vendor_management/py.typed new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..c0ed244 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/vendor_management/vendor.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 + from datetime import datetime + + +class Vendor(object): + """ + Vendor Response Object. + + + :param name: Name of vendor. + :type name: (optional) str + :param id: Unique identifier of vendor associated with the API caller account. + :type id: (optional) str + :param roles: Roles that user has for this vendor. + :type roles: (optional) list[str] + + """ + deserialized_types = { + 'name': 'str', + 'id': 'str', + 'roles': 'list[str]' + } # type: Dict + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'roles': 'roles' + } # type: Dict + supports_multiple_types = False + + def __init__(self, name=None, id=None, roles=None): + # type: (Optional[str], Optional[str], Optional[List[object]]) -> None + """Vendor Response Object. + + :param name: Name of vendor. + :type name: (optional) str + :param id: Unique identifier of vendor associated with the API caller account. + :type id: (optional) str + :param roles: Roles that user has for this vendor. + :type roles: (optional) list[str] + """ + self.__discriminator_value = None # type: str + + self.name = name + self.id = id + self.roles = roles + + 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, Vendor): + 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/vendor_management/vendors.py b/ask-smapi-model/ask_smapi_model/v1/vendor_management/vendors.py new file mode 100644 index 0000000..70f9bd9 --- /dev/null +++ b/ask-smapi-model/ask_smapi_model/v1/vendor_management/vendors.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 + from datetime import datetime + from ask_smapi_model.v1.vendor_management.vendor import Vendor + + +class Vendors(object): + """ + List of Vendors. + + + :param vendors: + :type vendors: (optional) list[ask_smapi_model.v1.vendor_management.vendor.Vendor] + + """ + deserialized_types = { + 'vendors': 'list[ask_smapi_model.v1.vendor_management.vendor.Vendor]' + } # type: Dict + + attribute_map = { + 'vendors': 'vendors' + } # type: Dict + supports_multiple_types = False + + def __init__(self, vendors=None): + # type: (Optional[List[Vendor]]) -> None + """List of Vendors. + + :param vendors: + :type vendors: (optional) list[ask_smapi_model.v1.vendor_management.vendor.Vendor] + """ + self.__discriminator_value = None # type: str + + self.vendors = vendors + + 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, Vendors): + 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/requirements.txt b/ask-smapi-model/requirements.txt new file mode 100644 index 0000000..bebdd47 --- /dev/null +++ b/ask-smapi-model/requirements.txt @@ -0,0 +1,6 @@ +six >= 1.10 +setuptools >= 21.0.0 +python_dateutil +enum34; python_version == '2.7' +typing; python_version == '2.7' +ask-sdk-model-runtime >= 1.0 diff --git a/ask-smapi-model/setup.cfg b/ask-smapi-model/setup.cfg new file mode 100644 index 0000000..7c2b287 --- /dev/null +++ b/ask-smapi-model/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal = 1 \ No newline at end of file diff --git a/ask-smapi-model/setup.py b/ask-smapi-model/setup.py new file mode 100644 index 0000000..f2d8a90 --- /dev/null +++ b/ask-smapi-model/setup.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 os +from setuptools import setup, find_packages +from codecs import open + +here = os.path.abspath(os.path.dirname(__file__)) + +about = {} +with open(os.path.join(here, 'ask_smapi_model', '__version__.py'), 'r', 'utf-8') as f: + exec(f.read(), about) + +with open('README.rst', 'r', 'utf-8') as f: + readme = f.read() +with open('CHANGELOG.rst', 'r', 'utf-8') as f: + history = f.read() + +REQUIRES = ["six >= 1.10", "ask-sdk-model-runtime >= 1.0"] + +setup( + name=about['__pip_package_name__'], + version=about['__version__'], + description=about['__description__'], + long_description=readme + '\n\n' + history, + author=about['__author__'], + author_email=about['__author_email__'], + url=about['__url__'], + keywords=about['__keywords__'], + license=about['__license__'], + include_package_data=True, + install_requires=REQUIRES, + extras_require={ + ':python_version == "2.7"': [ + 'enum34', + 'typing' + ], + }, + packages=find_packages(), + zip_safe=False, + classifiers=( + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'Natural Language :: English', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6' + ), + python_requires=">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*", +)